)]}'
{"ceilometer/agent/base.py":[{"author":{"_account_id":8290,"name":"liusheng","email":"liusheng2048@gmail.com","username":"LiuSheng"},"change_message_id":"3ca51f30ce54fe7cd50573ef8a310c5c123318f8","unresolved":false,"context_lines":[{"line_number":387,"context_line":""},{"line_number":388,"context_line":"            self.pipeline_mtime \u003d mtime"},{"line_number":389,"context_line":"            _hash \u003d publish_pipeline.get_pipeline_hash()"},{"line_number":390,"context_line":""},{"line_number":391,"context_line":"            if _hash !\u003d self.pipeline_hash:"},{"line_number":392,"context_line":"                LOG.info(_(\u0027Detected change in pipeline configuration.\u0027))"},{"line_number":393,"context_line":"                try:"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa32b979_7b528e68","line":390,"updated":"2015-06-19 01:57:41.000000000","message":"personally, I thinks this stuff can be partly extracted to a common method with the same name method in notification.py","commit_id":"8c30c9ae8b58636bdabddfd03184fb8e6519f3fb"},{"author":{"_account_id":13560,"name":"Rohit Jaiswal","email":"rohit.jaiswal@gmail.com","username":"rjaiswal"},"change_message_id":"d8b6bc698c6ccc0626f3b327e06a4eafb2e19961","unresolved":false,"context_lines":[{"line_number":387,"context_line":""},{"line_number":388,"context_line":"            self.pipeline_mtime \u003d mtime"},{"line_number":389,"context_line":"            _hash \u003d publish_pipeline.get_pipeline_hash()"},{"line_number":390,"context_line":""},{"line_number":391,"context_line":"            if _hash !\u003d self.pipeline_hash:"},{"line_number":392,"context_line":"                LOG.info(_(\u0027Detected change in pipeline configuration.\u0027))"},{"line_number":393,"context_line":"                try:"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa32b979_14ac6f8a","line":390,"in_reply_to":"fa32b979_7b528e68","updated":"2015-06-19 04:54:36.000000000","message":"Not sure what is the best place for the common method, both agents extend from Service which is in oslo_incubator..","commit_id":"8c30c9ae8b58636bdabddfd03184fb8e6519f3fb"},{"author":{"_account_id":8290,"name":"liusheng","email":"liusheng2048@gmail.com","username":"LiuSheng"},"change_message_id":"3ca51f30ce54fe7cd50573ef8a310c5c123318f8","unresolved":false,"context_lines":[{"line_number":397,"context_line":"                                    \u0027 configuration: %s\u0027) % err)"},{"line_number":398,"context_line":"                    return"},{"line_number":399,"context_line":""},{"line_number":400,"context_line":"                LOG.info(_(\"Reconfiguring polling tasks.\"))"},{"line_number":401,"context_line":"                self.pipeline_hash \u003d _hash"},{"line_number":402,"context_line":"                # stop existing pollsters and leave partitioning groups"},{"line_number":403,"context_line":"                self.stop_pollsters()"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa32b979_bb0d7690","line":400,"updated":"2015-06-19 01:57:41.000000000","message":"log with info level should be applied with i18n translation hints. like:\n\nfrom ceilometer.i18n import _LI\n...\n\nLOG.info(_LI(\"Reconfiguring polling tasks.\"))","commit_id":"8c30c9ae8b58636bdabddfd03184fb8e6519f3fb"},{"author":{"_account_id":13560,"name":"Rohit Jaiswal","email":"rohit.jaiswal@gmail.com","username":"rjaiswal"},"change_message_id":"d8b6bc698c6ccc0626f3b327e06a4eafb2e19961","unresolved":false,"context_lines":[{"line_number":397,"context_line":"                                    \u0027 configuration: %s\u0027) % err)"},{"line_number":398,"context_line":"                    return"},{"line_number":399,"context_line":""},{"line_number":400,"context_line":"                LOG.info(_(\"Reconfiguring polling tasks.\"))"},{"line_number":401,"context_line":"                self.pipeline_hash \u003d _hash"},{"line_number":402,"context_line":"                # stop existing pollsters and leave partitioning groups"},{"line_number":403,"context_line":"                self.stop_pollsters()"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa32b979_f4a6abbf","line":400,"in_reply_to":"fa32b979_bb0d7690","updated":"2015-06-19 04:54:36.000000000","message":"will do","commit_id":"8c30c9ae8b58636bdabddfd03184fb8e6519f3fb"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"c8e7af7b7dada1711db9dd2e2da80bcb7650c188","unresolved":false,"context_lines":[{"line_number":377,"context_line":"                x.stop()"},{"line_number":378,"context_line":"                self.tg.timer_done(x)"},{"line_number":379,"context_line":"            except Exception:"},{"line_number":380,"context_line":"                LOG.exception(_(\u0027Error stopping pollster.\u0027))"},{"line_number":381,"context_line":"        self.pollster_timers \u003d []"},{"line_number":382,"context_line":""},{"line_number":383,"context_line":"    def poll_pipeline_config(self):"}],"source_content_type":"text/x-python","patch_set":11,"id":"fa32b979_d2b097ff","line":380,"updated":"2015-06-24 14:29:24.000000000","message":"LOG.error(blabla, exc_info\u003dTrue)","commit_id":"e954b42c0e68d21fabd44c5ef187432872f9478c"},{"author":{"_account_id":7478,"name":"Nadya Shakhat","email":"nadmi4@gmail.com","username":"nprivalova"},"change_message_id":"f998f7cd44743b3bbfe88f661e90f0b14c8c4da9","unresolved":false,"context_lines":[{"line_number":255,"context_line":"            on_load_failure_callback\u003d_catch_extension_load_error,"},{"line_number":256,"context_line":"        )"},{"line_number":257,"context_line":""},{"line_number":258,"context_line":"    def join_partitioning_groups(self):"},{"line_number":259,"context_line":"        self.groups \u003d set([self.construct_group_id(d.obj.group_id)"},{"line_number":260,"context_line":"                          for d in self.discovery_manager])"},{"line_number":261,"context_line":"        # let each set of statically-defined resources have its own group"}],"source_content_type":"text/x-python","patch_set":14,"id":"ba3cc151_de0fbddf","line":258,"updated":"2015-06-30 09:42:49.000000000","message":"it\u0027s not related to your change, right? Why do we need it? I\u0027m just asking trying to understand all this coordination stuff again","commit_id":"a55c428d7318ee577286ec66226bd363707c8966"},{"author":{"_account_id":7478,"name":"Nadya Shakhat","email":"nadmi4@gmail.com","username":"nprivalova"},"change_message_id":"f0c386334c77c020a3c372251389b298f6913c6e","unresolved":false,"context_lines":[{"line_number":255,"context_line":"            on_load_failure_callback\u003d_catch_extension_load_error,"},{"line_number":256,"context_line":"        )"},{"line_number":257,"context_line":""},{"line_number":258,"context_line":"    def join_partitioning_groups(self):"},{"line_number":259,"context_line":"        self.groups \u003d set([self.construct_group_id(d.obj.group_id)"},{"line_number":260,"context_line":"                          for d in self.discovery_manager])"},{"line_number":261,"context_line":"        # let each set of statically-defined resources have its own group"}],"source_content_type":"text/x-python","patch_set":14,"id":"ba3cc151_73d7bf23","line":258,"in_reply_to":"ba3cc151_de0fbddf","updated":"2015-06-30 13:49:09.000000000","message":"Aha, I see. We need to keep it in self to leave","commit_id":"a55c428d7318ee577286ec66226bd363707c8966"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"9c2e02cc7aae958e1f76b0c4e9175b23f82b20a2","unresolved":false,"context_lines":[{"line_number":394,"context_line":"                try:"},{"line_number":395,"context_line":"                    self.pipeline_manager \u003d publish_pipeline.setup_pipeline()"},{"line_number":396,"context_line":"                except Exception as err:"},{"line_number":397,"context_line":"                    LOG.exception(_(\u0027Unable to load changed pipeline\u0027"},{"line_number":398,"context_line":"                                    \u0027 configuration: %s\u0027) % err)"},{"line_number":399,"context_line":"                    return"},{"line_number":400,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"ba3cc151_364a73c6","line":397,"updated":"2015-06-30 20:01:15.000000000","message":"_LE","commit_id":"a55c428d7318ee577286ec66226bd363707c8966"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"9c2e02cc7aae958e1f76b0c4e9175b23f82b20a2","unresolved":false,"context_lines":[{"line_number":402,"context_line":"                self.pipeline_hash \u003d _hash"},{"line_number":403,"context_line":"                # stop existing pollsters and leave partitioning groups"},{"line_number":404,"context_line":"                self.stop_pollsters()"},{"line_number":405,"context_line":"                for group in self.groups:"},{"line_number":406,"context_line":"                    self.partition_coordinator.leave_group(group)"},{"line_number":407,"context_line":""},{"line_number":408,"context_line":"                # re-create partitioning groups according to pipeline"}],"source_content_type":"text/x-python","patch_set":14,"id":"ba3cc151_94b818e7","line":405,"updated":"2015-06-30 20:01:15.000000000","message":"why do we need to leave group?","commit_id":"a55c428d7318ee577286ec66226bd363707c8966"},{"author":{"_account_id":7478,"name":"Nadya Shakhat","email":"nadmi4@gmail.com","username":"nprivalova"},"change_message_id":"302d8a19863e76eab4d85e516afaf70e4a1442b7","unresolved":false,"context_lines":[{"line_number":393,"context_line":"                LOG.info(_LI(\u0027Detected change in pipeline configuration.\u0027))"},{"line_number":394,"context_line":"                try:"},{"line_number":395,"context_line":"                    self.pipeline_manager \u003d publish_pipeline.setup_pipeline()"},{"line_number":396,"context_line":"                except Exception as err:"},{"line_number":397,"context_line":"                    LOG.exception(_LE(\u0027Unable to load changed pipeline\u0027"},{"line_number":398,"context_line":"                                      \u0027 configuration: %s\u0027) % err)"},{"line_number":399,"context_line":"                    return"}],"source_content_type":"text/x-python","patch_set":15,"id":"ba3cc151_0b3037e7","line":396,"updated":"2015-07-01 16:11:51.000000000","message":"What should be done in case of incorrect pipeline file? So we cannot start(), how many attempts should we do before stop()? Or we should stop here? Or use the latest successful version?\nAs I understand here we will check the file infinitely, right?","commit_id":"1b66cc6cc99bec152f26b3086d7edd75f105c036"},{"author":{"_account_id":13560,"name":"Rohit Jaiswal","email":"rohit.jaiswal@gmail.com","username":"rjaiswal"},"change_message_id":"e2b1a0610a581ad7311ee8c87ff68dc824fc5e44","unresolved":false,"context_lines":[{"line_number":393,"context_line":"                LOG.info(_LI(\u0027Detected change in pipeline configuration.\u0027))"},{"line_number":394,"context_line":"                try:"},{"line_number":395,"context_line":"                    self.pipeline_manager \u003d publish_pipeline.setup_pipeline()"},{"line_number":396,"context_line":"                except Exception as err:"},{"line_number":397,"context_line":"                    LOG.exception(_LE(\u0027Unable to load changed pipeline\u0027"},{"line_number":398,"context_line":"                                      \u0027 configuration: %s\u0027) % err)"},{"line_number":399,"context_line":"                    return"}],"source_content_type":"text/x-python","patch_set":15,"id":"ba3cc151_094a7c55","line":396,"in_reply_to":"ba3cc151_0b3037e7","updated":"2015-07-01 17:35:52.000000000","message":"@Nadya: Note the return. It will just abort the reload in case of detecting an incorrect pipeline and the agent will continue to use the last successful version. \n\nI think we dont stop since file can be changed anytime and an optimistic approach is to continue to poll the file.","commit_id":"1b66cc6cc99bec152f26b3086d7edd75f105c036"},{"author":{"_account_id":13560,"name":"Rohit Jaiswal","email":"rohit.jaiswal@gmail.com","username":"rjaiswal"},"change_message_id":"7e3f7dab7f47fa0278d2a796643cd2f45667bdb0","unresolved":false,"context_lines":[{"line_number":402,"context_line":"                self.pipeline_hash \u003d _hash"},{"line_number":403,"context_line":"                # stop existing pollsters and leave partitioning groups"},{"line_number":404,"context_line":"                self.stop_pollsters()"},{"line_number":405,"context_line":"                for group in self.groups:"},{"line_number":406,"context_line":"                    self.partition_coordinator.leave_group(group)"},{"line_number":407,"context_line":""},{"line_number":408,"context_line":"                # re-create partitioning groups according to pipeline"}],"source_content_type":"text/x-python","patch_set":15,"id":"ba3cc151_7b245cae","line":405,"updated":"2015-06-30 22:31:10.000000000","message":"gordc: Since group membership of an agent is decided by resources discovered from discovery plugin (specified in pipeline or a default) + resources specified in pipeline and pipeline is being reloaded which sorta invalidates the set of resources and the derived group membership, we leave the group and create new ones.","commit_id":"1b66cc6cc99bec152f26b3086d7edd75f105c036"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"a3347ac0bef28f3c5e7df3ef4fbb71137f9111f7","unresolved":false,"context_lines":[{"line_number":402,"context_line":"                self.pipeline_hash \u003d _hash"},{"line_number":403,"context_line":"                # stop existing pollsters and leave partitioning groups"},{"line_number":404,"context_line":"                self.stop_pollsters()"},{"line_number":405,"context_line":"                for group in self.groups:"},{"line_number":406,"context_line":"                    self.partition_coordinator.leave_group(group)"},{"line_number":407,"context_line":""},{"line_number":408,"context_line":"                # re-create partitioning groups according to pipeline"}],"source_content_type":"text/x-python","patch_set":15,"id":"ba3cc151_23dc0245","line":405,"in_reply_to":"ba3cc151_7b245cae","updated":"2015-07-02 17:58:35.000000000","message":"i\u0027m not sure that\u0027s correct. iiuc, in configure_polling_tasks, it will setup_polling_tasks and it set up an interval_tasks which will poll_and_publish and extract the appropriate set of tasks. i\u0027m not sure leaving and rejoining group will do anything as when it comes to extracting the tasks, it will never know of the leaving/rejoining. \n\ndepending on timing, it may actually appear like a dropped agent to other agents polling which isn\u0027t what we want i think.","commit_id":"1b66cc6cc99bec152f26b3086d7edd75f105c036"},{"author":{"_account_id":13560,"name":"Rohit Jaiswal","email":"rohit.jaiswal@gmail.com","username":"rjaiswal"},"change_message_id":"7398554af1c374e68cd0fe059b84d85cb480d9eb","unresolved":false,"context_lines":[{"line_number":381,"context_line":"        # stop existing pollsters and leave partitioning groups"},{"line_number":382,"context_line":"        self.stop_pollsters()"},{"line_number":383,"context_line":"        for group in self.groups:"},{"line_number":384,"context_line":"            self.partition_coordinator.leave_group(group)"},{"line_number":385,"context_line":""},{"line_number":386,"context_line":"        # re-create partitioning groups according to pipeline"},{"line_number":387,"context_line":"        # and configure polling tasks with latest pipeline conf"}],"source_content_type":"text/x-python","patch_set":19,"id":"ba3cc151_ca3f3486","line":384,"updated":"2015-07-04 07:13:44.000000000","message":"gordc: If the pipeline has a new set of discovery endpoints that now need to be considered, the agents need to subscribe to a new group. Another scenario could be fewer set of discovery endpoints to poll in the pipeline and that could necessitate leaving a group.\nOne way of achieving this is by leaving all groups and rejoining new (computed) set of groups.","commit_id":"70f9e0c8c01d6e9cc3c1a79e57e38bbfa23c1274"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"925e48ceb085d17dcd869cee7f2b994223ba8c28","unresolved":false,"context_lines":[{"line_number":381,"context_line":"        # stop existing pollsters and leave partitioning groups"},{"line_number":382,"context_line":"        self.stop_pollsters()"},{"line_number":383,"context_line":"        for group in self.groups:"},{"line_number":384,"context_line":"            self.partition_coordinator.leave_group(group)"},{"line_number":385,"context_line":""},{"line_number":386,"context_line":"        # re-create partitioning groups according to pipeline"},{"line_number":387,"context_line":"        # and configure polling tasks with latest pipeline conf"}],"source_content_type":"text/x-python","patch_set":19,"id":"ba3cc151_d98850c9","line":384,"in_reply_to":"ba3cc151_ca3f3486","updated":"2015-07-06 14:04:02.000000000","message":"iiuc, all the resources and discover is done when creating the polling task and not related to group joining (unlike notification agent).\n\njust for trial, i remove this group leave/join logic. and all the tests still pass. so there\u0027s probably a gap in test or this isn\u0027t necessary.","commit_id":"70f9e0c8c01d6e9cc3c1a79e57e38bbfa23c1274"},{"author":{"_account_id":13560,"name":"Rohit Jaiswal","email":"rohit.jaiswal@gmail.com","username":"rjaiswal"},"change_message_id":"103b40174ece1d724736c11481bdace489842c14","unresolved":false,"context_lines":[{"line_number":381,"context_line":"        self.stop_pollsters()"},{"line_number":382,"context_line":"        for group in self.groups:"},{"line_number":383,"context_line":"            self.partition_coordinator.leave_group(group)"},{"line_number":384,"context_line":""},{"line_number":385,"context_line":"        # re-create partitioning groups according to pipeline"},{"line_number":386,"context_line":"        # and configure polling tasks with latest pipeline conf"},{"line_number":387,"context_line":"        self.join_partitioning_groups()"}],"source_content_type":"text/x-python","patch_set":20,"id":"ba3cc151_ec0bfb7b","line":384,"updated":"2015-07-06 23:17:49.000000000","message":"gordc: In https://github.com/openstack/ceilometer/blob/master/ceilometer/agent/base.py#L262, the static_resource_groups are based on resources from pipeline (which might change on a refresh).\n\n(It might be better if we can chat and wrap this up..)\n\nYes, the tests do not test for leaving and joining groups. I think none of the tests test for this. test_join_partitioning_groups just tests for the method call.","commit_id":"def6471d5697e45fe897b4ff286326e96f91bdd0"}],"ceilometer/notification.py":[{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"9c2e02cc7aae958e1f76b0c4e9175b23f82b20a2","unresolved":false,"context_lines":[{"line_number":257,"context_line":"        utils.kill_listeners(self.listeners + self.pipeline_listeners)"},{"line_number":258,"context_line":"        super(NotificationService, self).stop()"},{"line_number":259,"context_line":""},{"line_number":260,"context_line":"    def poll_pipeline_config(self):"},{"line_number":261,"context_line":""},{"line_number":262,"context_line":"        mtime \u003d pipeline.get_pipeline_mtime()"},{"line_number":263,"context_line":"        if mtime \u003e self.pipeline_mtime:"}],"source_content_type":"text/x-python","patch_set":14,"id":"ba3cc151_f4e644b3","line":260,"updated":"2015-06-30 20:01:15.000000000","message":"this is the same as poll agent code, i think we should have a common base and they both implement a \u0027refresh_pipeline\u0027 section","commit_id":"a55c428d7318ee577286ec66226bd363707c8966"},{"author":{"_account_id":7478,"name":"Nadya Shakhat","email":"nadmi4@gmail.com","username":"nprivalova"},"change_message_id":"f998f7cd44743b3bbfe88f661e90f0b14c8c4da9","unresolved":false,"context_lines":[{"line_number":260,"context_line":"    def poll_pipeline_config(self):"},{"line_number":261,"context_line":""},{"line_number":262,"context_line":"        mtime \u003d pipeline.get_pipeline_mtime()"},{"line_number":263,"context_line":"        if mtime \u003e self.pipeline_mtime:"},{"line_number":264,"context_line":"            LOG.info(_LI(\u0027Pipeline configuration file has been updated.\u0027))"},{"line_number":265,"context_line":""},{"line_number":266,"context_line":"            self.pipeline_mtime \u003d mtime"}],"source_content_type":"text/x-python","patch_set":14,"id":"ba3cc151_fbb733f3","line":263,"updated":"2015-06-30 09:42:49.000000000","message":"Log message is not clear. Whats the difference between \u0027was updated\u0027 and \u0027detected change\u0027?","commit_id":"a55c428d7318ee577286ec66226bd363707c8966"},{"author":{"_account_id":13560,"name":"Rohit Jaiswal","email":"rohit.jaiswal@gmail.com","username":"rjaiswal"},"change_message_id":"07af84bf2b68097bce1fd21ae0b8281432c7bf6d","unresolved":false,"context_lines":[{"line_number":260,"context_line":"    def poll_pipeline_config(self):"},{"line_number":261,"context_line":""},{"line_number":262,"context_line":"        mtime \u003d pipeline.get_pipeline_mtime()"},{"line_number":263,"context_line":"        if mtime \u003e self.pipeline_mtime:"},{"line_number":264,"context_line":"            LOG.info(_LI(\u0027Pipeline configuration file has been updated.\u0027))"},{"line_number":265,"context_line":""},{"line_number":266,"context_line":"            self.pipeline_mtime \u003d mtime"}],"source_content_type":"text/x-python","patch_set":14,"id":"ba3cc151_49276eb6","line":263,"in_reply_to":"ba3cc151_fbb733f3","updated":"2015-06-30 14:59:03.000000000","message":"The file could be touched to have its last modified-ts changed without changing anything meaningful. \u0027was updated\u0027 captures that at a higher level, and a hash difference of the contents would indicate a real change.","commit_id":"a55c428d7318ee577286ec66226bd363707c8966"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"9c2e02cc7aae958e1f76b0c4e9175b23f82b20a2","unresolved":false,"context_lines":[{"line_number":282,"context_line":"                # re-start the pipeline listeners if workload partitioning"},{"line_number":283,"context_line":"                # is enabled."},{"line_number":284,"context_line":"                if cfg.CONF.notification.workload_partitioning:"},{"line_number":285,"context_line":"                    self._refresh_agent(None)"},{"line_number":286,"context_line":"                else:"},{"line_number":287,"context_line":"                    # re-start the main queue listeners if workload"},{"line_number":288,"context_line":"                    #  partitioning is disabled, as publishing of"}],"source_content_type":"text/x-python","patch_set":14,"id":"ba3cc151_144ba8b1","line":285,"updated":"2015-06-30 20:01:15.000000000","message":"this only refreshes pipelines listeners, you still need to refresh main queue listeners in this case.","commit_id":"a55c428d7318ee577286ec66226bd363707c8966"},{"author":{"_account_id":13560,"name":"Rohit Jaiswal","email":"rohit.jaiswal@gmail.com","username":"rjaiswal"},"change_message_id":"7e3f7dab7f47fa0278d2a796643cd2f45667bdb0","unresolved":false,"context_lines":[{"line_number":257,"context_line":"        utils.kill_listeners(self.listeners + self.pipeline_listeners)"},{"line_number":258,"context_line":"        super(NotificationService, self).stop()"},{"line_number":259,"context_line":""},{"line_number":260,"context_line":"    def poll_pipeline_config(self):"},{"line_number":261,"context_line":""},{"line_number":262,"context_line":"        mtime \u003d pipeline.get_pipeline_mtime()"},{"line_number":263,"context_line":"        if mtime \u003e self.pipeline_mtime:"}],"source_content_type":"text/x-python","patch_set":15,"id":"ba3cc151_7bb8dce5","line":260,"updated":"2015-06-30 22:31:10.000000000","message":"gordc: Yes, i agree there is some commonality but they both do different things. Also the agents extend from oslo.service. We could create a common base in ceilometer - base_service.py. Thoughts?","commit_id":"1b66cc6cc99bec152f26b3086d7edd75f105c036"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"a3347ac0bef28f3c5e7df3ef4fbb71137f9111f7","unresolved":false,"context_lines":[{"line_number":257,"context_line":"        utils.kill_listeners(self.listeners + self.pipeline_listeners)"},{"line_number":258,"context_line":"        super(NotificationService, self).stop()"},{"line_number":259,"context_line":""},{"line_number":260,"context_line":"    def poll_pipeline_config(self):"},{"line_number":261,"context_line":""},{"line_number":262,"context_line":"        mtime \u003d pipeline.get_pipeline_mtime()"},{"line_number":263,"context_line":"        if mtime \u003e self.pipeline_mtime:"}],"source_content_type":"text/x-python","patch_set":15,"id":"ba3cc151_437026a4","line":260,"in_reply_to":"ba3cc151_4b7cff1e","updated":"2015-07-02 17:58:35.000000000","message":"so the idea was more that everything up to \"Reloading notification agent and listeners\" line would be common. and then both notification and base.py files would have their own \u0027reloading\u0027 methods.","commit_id":"1b66cc6cc99bec152f26b3086d7edd75f105c036"},{"author":{"_account_id":7478,"name":"Nadya Shakhat","email":"nadmi4@gmail.com","username":"nprivalova"},"change_message_id":"302d8a19863e76eab4d85e516afaf70e4a1442b7","unresolved":false,"context_lines":[{"line_number":257,"context_line":"        utils.kill_listeners(self.listeners + self.pipeline_listeners)"},{"line_number":258,"context_line":"        super(NotificationService, self).stop()"},{"line_number":259,"context_line":""},{"line_number":260,"context_line":"    def poll_pipeline_config(self):"},{"line_number":261,"context_line":""},{"line_number":262,"context_line":"        mtime \u003d pipeline.get_pipeline_mtime()"},{"line_number":263,"context_line":"        if mtime \u003e self.pipeline_mtime:"}],"source_content_type":"text/x-python","patch_set":15,"id":"ba3cc151_4b7cff1e","line":260,"in_reply_to":"ba3cc151_7bb8dce5","updated":"2015-07-01 16:11:51.000000000","message":"Yep, but it\u0027s not for this patch I believe. I think it may be done during componentisation","commit_id":"1b66cc6cc99bec152f26b3086d7edd75f105c036"}],"ceilometer/openstack/common/threadgroup.py":[{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"e8ba3b812465e293367ed27bd86d89fdac38924d","unresolved":false,"context_lines":[{"line_number":102,"context_line":"            except Exception:"},{"line_number":103,"context_line":"                LOG.exception(_LE(\u0027Error stopping thread.\u0027))"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    def stop_timers(self, timers\u003dNone):"},{"line_number":106,"context_line":"        for x in (timers if timers else self.timers):"},{"line_number":107,"context_line":"            try:"},{"line_number":108,"context_line":"                x.stop()"}],"source_content_type":"text/x-python","patch_set":1,"id":"1af86dd1_f69f81b2","line":105,"updated":"2015-06-12 06:57:53.000000000","message":"You are not supposed to touch this file at all. It comes from oslo-incubator.","commit_id":"e1903cd2b9f984ea201eb35442d6ce71e7532245"},{"author":{"_account_id":13560,"name":"Rohit Jaiswal","email":"rohit.jaiswal@gmail.com","username":"rjaiswal"},"change_message_id":"123586a8f0e44bceb55d9d8d62b89c9a23b0fa27","unresolved":false,"context_lines":[{"line_number":102,"context_line":"            except Exception:"},{"line_number":103,"context_line":"                LOG.exception(_LE(\u0027Error stopping thread.\u0027))"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    def stop_timers(self, timers\u003dNone):"},{"line_number":106,"context_line":"        for x in (timers if timers else self.timers):"},{"line_number":107,"context_line":"            try:"},{"line_number":108,"context_line":"                x.stop()"}],"source_content_type":"text/x-python","patch_set":1,"id":"1af86dd1_432b27ec","line":105,"in_reply_to":"1af86dd1_a33e5bb6","updated":"2015-06-12 15:39:08.000000000","message":"jd: Thanks for the suggestion, i will do that.","commit_id":"e1903cd2b9f984ea201eb35442d6ce71e7532245"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"3bee9c01632932e3cc8d16864425169fe54c26d8","unresolved":false,"context_lines":[{"line_number":102,"context_line":"            except Exception:"},{"line_number":103,"context_line":"                LOG.exception(_LE(\u0027Error stopping thread.\u0027))"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    def stop_timers(self, timers\u003dNone):"},{"line_number":106,"context_line":"        for x in (timers if timers else self.timers):"},{"line_number":107,"context_line":"            try:"},{"line_number":108,"context_line":"                x.stop()"}],"source_content_type":"text/x-python","patch_set":1,"id":"1af86dd1_a33e5bb6","line":105,"in_reply_to":"1af86dd1_a83e38b6","updated":"2015-06-12 14:58:47.000000000","message":"We don\u0027t care, you CANNOT touch this file in any circumstance. You have to submit your patch to oslo-incubator first. :)","commit_id":"e1903cd2b9f984ea201eb35442d6ce71e7532245"},{"author":{"_account_id":13560,"name":"Rohit Jaiswal","email":"rohit.jaiswal@gmail.com","username":"rjaiswal"},"change_message_id":"e79c95e75ce89894025b7f1d8f2ab2a0db464d4a","unresolved":false,"context_lines":[{"line_number":102,"context_line":"            except Exception:"},{"line_number":103,"context_line":"                LOG.exception(_LE(\u0027Error stopping thread.\u0027))"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    def stop_timers(self, timers\u003dNone):"},{"line_number":106,"context_line":"        for x in (timers if timers else self.timers):"},{"line_number":107,"context_line":"            try:"},{"line_number":108,"context_line":"                x.stop()"}],"source_content_type":"text/x-python","patch_set":1,"id":"1af86dd1_a83e38b6","line":105,"in_reply_to":"1af86dd1_f69f81b2","updated":"2015-06-12 14:36:56.000000000","message":"jd: This allows for termination of selective (pollster) timers. In addition to pollster timers, there are others like Tooz heartbeat and watcher timers which we dont want stopped on a reload.","commit_id":"e1903cd2b9f984ea201eb35442d6ce71e7532245"},{"author":{"_account_id":8290,"name":"liusheng","email":"liusheng2048@gmail.com","username":"LiuSheng"},"change_message_id":"3ca51f30ce54fe7cd50573ef8a310c5c123318f8","unresolved":false,"context_lines":[{"line_number":76,"context_line":"        pulse.start(interval\u003dinterval,"},{"line_number":77,"context_line":"                    initial_delay\u003dinitial_delay)"},{"line_number":78,"context_line":"        self.timers.append(pulse)"},{"line_number":79,"context_line":"        return pulse"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"    def add_thread(self, callback, *args, **kwargs):"},{"line_number":82,"context_line":"        gt \u003d self.pool.spawn(callback, *args, **kwargs)"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa32b979_fb045e15","line":79,"updated":"2015-06-19 01:57:41.000000000","message":"this need to be fixed the oslo-incubator[1] firstly, and then sync to ceilometer repo.\n\n[1] http://git.openstack.org/cgit/openstack/oslo-incubator/tree/openstack/common/threadgroup.py#n73","commit_id":"8c30c9ae8b58636bdabddfd03184fb8e6519f3fb"},{"author":{"_account_id":13560,"name":"Rohit Jaiswal","email":"rohit.jaiswal@gmail.com","username":"rjaiswal"},"change_message_id":"d8b6bc698c6ccc0626f3b327e06a4eafb2e19961","unresolved":false,"context_lines":[{"line_number":76,"context_line":"        pulse.start(interval\u003dinterval,"},{"line_number":77,"context_line":"                    initial_delay\u003dinitial_delay)"},{"line_number":78,"context_line":"        self.timers.append(pulse)"},{"line_number":79,"context_line":"        return pulse"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"    def add_thread(self, callback, *args, **kwargs):"},{"line_number":82,"context_line":"        gt \u003d self.pool.spawn(callback, *args, **kwargs)"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa32b979_74c85b55","line":79,"in_reply_to":"fa32b979_fb045e15","updated":"2015-06-19 04:54:36.000000000","message":"Yep, i have a review in progress there for this change - https://review.openstack.org/#/c/193322/.\n\nJust added it here for the unit tests to pass before that change gets reviewed and approved. Will remove it from here once that is done.","commit_id":"8c30c9ae8b58636bdabddfd03184fb8e6519f3fb"}],"ceilometer/pipeline.py":[{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"e8ba3b812465e293367ed27bd86d89fdac38924d","unresolved":false,"context_lines":[{"line_number":46,"context_line":"               help\u003d\"Configuration file for event pipeline definition.\""},{"line_number":47,"context_line":"               ),"},{"line_number":48,"context_line":"    cfg.BoolOpt(\u0027reload_pipeline_config\u0027,"},{"line_number":49,"context_line":"                default\u003dFalse,"},{"line_number":50,"context_line":"                help\u003d\"Reload Pipeline configuration on-the-fly.\""},{"line_number":51,"context_line":"                ),"},{"line_number":52,"context_line":"    cfg.IntOpt(\u0027pipeline_polling_interval\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"1af86dd1_d67b657a","line":49,"updated":"2015-06-12 06:57:53.000000000","message":"Is there any reason to have this configuration option and not to have this to true by default?","commit_id":"e1903cd2b9f984ea201eb35442d6ce71e7532245"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"bf10946fe4368f22c0c4eebf5d9a1ea8890ad5be","unresolved":false,"context_lines":[{"line_number":46,"context_line":"               help\u003d\"Configuration file for event pipeline definition.\""},{"line_number":47,"context_line":"               ),"},{"line_number":48,"context_line":"    cfg.BoolOpt(\u0027reload_pipeline_config\u0027,"},{"line_number":49,"context_line":"                default\u003dFalse,"},{"line_number":50,"context_line":"                help\u003d\"Reload Pipeline configuration on-the-fly.\""},{"line_number":51,"context_line":"                ),"},{"line_number":52,"context_line":"    cfg.IntOpt(\u0027pipeline_polling_interval\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"1af86dd1_3bbbab74","line":49,"in_reply_to":"1af86dd1_076e5a2f","updated":"2015-06-12 17:08:55.000000000","message":"Yeah, the issue I\u0027m concerned with is people who are accustomed to editing the file by hand and _also_ have the habit of saving the file they are in-progress editing frequently.\n\nGiven that situation I think a default to explicit reload is the right thing. But maybe that\u0027s just me.","commit_id":"e1903cd2b9f984ea201eb35442d6ce71e7532245"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"3bee9c01632932e3cc8d16864425169fe54c26d8","unresolved":false,"context_lines":[{"line_number":46,"context_line":"               help\u003d\"Configuration file for event pipeline definition.\""},{"line_number":47,"context_line":"               ),"},{"line_number":48,"context_line":"    cfg.BoolOpt(\u0027reload_pipeline_config\u0027,"},{"line_number":49,"context_line":"                default\u003dFalse,"},{"line_number":50,"context_line":"                help\u003d\"Reload Pipeline configuration on-the-fly.\""},{"line_number":51,"context_line":"                ),"},{"line_number":52,"context_line":"    cfg.IntOpt(\u0027pipeline_polling_interval\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"1af86dd1_e37213ad","line":49,"in_reply_to":"1af86dd1_8dadce8a","updated":"2015-06-12 14:58:47.000000000","message":"I understand what this is about, there\u0027s no need to paraphrase :)\n\nWhy having it off by default? What\u0027s the problem of having this always on?","commit_id":"e1903cd2b9f984ea201eb35442d6ce71e7532245"},{"author":{"_account_id":13560,"name":"Rohit Jaiswal","email":"rohit.jaiswal@gmail.com","username":"rjaiswal"},"change_message_id":"e79c95e75ce89894025b7f1d8f2ab2a0db464d4a","unresolved":false,"context_lines":[{"line_number":46,"context_line":"               help\u003d\"Configuration file for event pipeline definition.\""},{"line_number":47,"context_line":"               ),"},{"line_number":48,"context_line":"    cfg.BoolOpt(\u0027reload_pipeline_config\u0027,"},{"line_number":49,"context_line":"                default\u003dFalse,"},{"line_number":50,"context_line":"                help\u003d\"Reload Pipeline configuration on-the-fly.\""},{"line_number":51,"context_line":"                ),"},{"line_number":52,"context_line":"    cfg.IntOpt(\u0027pipeline_polling_interval\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"1af86dd1_8dadce8a","line":49,"in_reply_to":"1af86dd1_d67b657a","updated":"2015-06-12 14:36:56.000000000","message":"jd: Since this changes the default behavior of a change to service configuration on service restart, the intention is to have this behavior off by default and only enable it explicitly with user/operator knowledge.","commit_id":"e1903cd2b9f984ea201eb35442d6ce71e7532245"},{"author":{"_account_id":13560,"name":"Rohit Jaiswal","email":"rohit.jaiswal@gmail.com","username":"rjaiswal"},"change_message_id":"123586a8f0e44bceb55d9d8d62b89c9a23b0fa27","unresolved":false,"context_lines":[{"line_number":46,"context_line":"               help\u003d\"Configuration file for event pipeline definition.\""},{"line_number":47,"context_line":"               ),"},{"line_number":48,"context_line":"    cfg.BoolOpt(\u0027reload_pipeline_config\u0027,"},{"line_number":49,"context_line":"                default\u003dFalse,"},{"line_number":50,"context_line":"                help\u003d\"Reload Pipeline configuration on-the-fly.\""},{"line_number":51,"context_line":"                ),"},{"line_number":52,"context_line":"    cfg.IntOpt(\u0027pipeline_polling_interval\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"1af86dd1_076e5a2f","line":49,"in_reply_to":"1af86dd1_e37213ad","updated":"2015-06-12 15:39:08.000000000","message":"There isnt any problem, cdent expressed a concern in the bp - https://review.openstack.org/#/c/188613/ regarding enabling this by default, which might come as a surprise to users who expect changes to take effect only on a service restart.","commit_id":"e1903cd2b9f984ea201eb35442d6ce71e7532245"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"e8ba3b812465e293367ed27bd86d89fdac38924d","unresolved":false,"context_lines":[{"line_number":758,"context_line":"    return _setup_pipeline_manager(cfg_file, transformer_manager)"},{"line_number":759,"context_line":""},{"line_number":760,"context_line":""},{"line_number":761,"context_line":"def is_pipeline_reloadable():"},{"line_number":762,"context_line":"    return cfg.CONF.reload_pipeline_config"},{"line_number":763,"context_line":""},{"line_number":764,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"1af86dd1_56909595","line":761,"updated":"2015-06-12 06:57:53.000000000","message":"Not really useful.","commit_id":"e1903cd2b9f984ea201eb35442d6ce71e7532245"},{"author":{"_account_id":13560,"name":"Rohit Jaiswal","email":"rohit.jaiswal@gmail.com","username":"rjaiswal"},"change_message_id":"e79c95e75ce89894025b7f1d8f2ab2a0db464d4a","unresolved":false,"context_lines":[{"line_number":758,"context_line":"    return _setup_pipeline_manager(cfg_file, transformer_manager)"},{"line_number":759,"context_line":""},{"line_number":760,"context_line":""},{"line_number":761,"context_line":"def is_pipeline_reloadable():"},{"line_number":762,"context_line":"    return cfg.CONF.reload_pipeline_config"},{"line_number":763,"context_line":""},{"line_number":764,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"1af86dd1_8df26e99","line":761,"in_reply_to":"1af86dd1_56909595","updated":"2015-06-12 14:36:56.000000000","message":"This allows the pipeline module (pipeline.py) to own the fact that the pipeline is reloadable or not, otherwise other modules that need it will have to import the opt before checking its value.","commit_id":"e1903cd2b9f984ea201eb35442d6ce71e7532245"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"3bee9c01632932e3cc8d16864425169fe54c26d8","unresolved":false,"context_lines":[{"line_number":758,"context_line":"    return _setup_pipeline_manager(cfg_file, transformer_manager)"},{"line_number":759,"context_line":""},{"line_number":760,"context_line":""},{"line_number":761,"context_line":"def is_pipeline_reloadable():"},{"line_number":762,"context_line":"    return cfg.CONF.reload_pipeline_config"},{"line_number":763,"context_line":""},{"line_number":764,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"1af86dd1_83623fd7","line":761,"in_reply_to":"1af86dd1_8df26e99","updated":"2015-06-12 14:58:47.000000000","message":"I don\u0027t see any problem with importing the opt","commit_id":"e1903cd2b9f984ea201eb35442d6ce71e7532245"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"e8ba3b812465e293367ed27bd86d89fdac38924d","unresolved":false,"context_lines":[{"line_number":762,"context_line":"    return cfg.CONF.reload_pipeline_config"},{"line_number":763,"context_line":""},{"line_number":764,"context_line":""},{"line_number":765,"context_line":"def get_hash_of_pipeline_cfg_file():"},{"line_number":766,"context_line":""},{"line_number":767,"context_line":"    cfg_file \u003d cfg.CONF.pipeline_cfg_file"},{"line_number":768,"context_line":"    if not os.path.exists(cfg_file):"}],"source_content_type":"text/x-python","patch_set":1,"id":"1af86dd1_d6f24506","line":765,"updated":"2015-06-12 06:57:53.000000000","message":"Using mtime would be faster and probably enough.","commit_id":"e1903cd2b9f984ea201eb35442d6ce71e7532245"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"3bee9c01632932e3cc8d16864425169fe54c26d8","unresolved":false,"context_lines":[{"line_number":762,"context_line":"    return cfg.CONF.reload_pipeline_config"},{"line_number":763,"context_line":""},{"line_number":764,"context_line":""},{"line_number":765,"context_line":"def get_hash_of_pipeline_cfg_file():"},{"line_number":766,"context_line":""},{"line_number":767,"context_line":"    cfg_file \u003d cfg.CONF.pipeline_cfg_file"},{"line_number":768,"context_line":"    if not os.path.exists(cfg_file):"}],"source_content_type":"text/x-python","patch_set":1,"id":"1af86dd1_c3af17e2","line":765,"in_reply_to":"1af86dd1_6de292a1","updated":"2015-06-12 14:58:47.000000000","message":"You should use both at least to not compute the hash each time :)","commit_id":"e1903cd2b9f984ea201eb35442d6ce71e7532245"},{"author":{"_account_id":13560,"name":"Rohit Jaiswal","email":"rohit.jaiswal@gmail.com","username":"rjaiswal"},"change_message_id":"123586a8f0e44bceb55d9d8d62b89c9a23b0fa27","unresolved":false,"context_lines":[{"line_number":762,"context_line":"    return cfg.CONF.reload_pipeline_config"},{"line_number":763,"context_line":""},{"line_number":764,"context_line":""},{"line_number":765,"context_line":"def get_hash_of_pipeline_cfg_file():"},{"line_number":766,"context_line":""},{"line_number":767,"context_line":"    cfg_file \u003d cfg.CONF.pipeline_cfg_file"},{"line_number":768,"context_line":"    if not os.path.exists(cfg_file):"}],"source_content_type":"text/x-python","patch_set":1,"id":"1af86dd1_87600a37","line":765,"in_reply_to":"1af86dd1_c3af17e2","updated":"2015-06-12 15:39:08.000000000","message":"jd: Yes, that probably more optimal, i will check the mtime before computing the hash.","commit_id":"e1903cd2b9f984ea201eb35442d6ce71e7532245"},{"author":{"_account_id":13560,"name":"Rohit Jaiswal","email":"rohit.jaiswal@gmail.com","username":"rjaiswal"},"change_message_id":"e79c95e75ce89894025b7f1d8f2ab2a0db464d4a","unresolved":false,"context_lines":[{"line_number":762,"context_line":"    return cfg.CONF.reload_pipeline_config"},{"line_number":763,"context_line":""},{"line_number":764,"context_line":""},{"line_number":765,"context_line":"def get_hash_of_pipeline_cfg_file():"},{"line_number":766,"context_line":""},{"line_number":767,"context_line":"    cfg_file \u003d cfg.CONF.pipeline_cfg_file"},{"line_number":768,"context_line":"    if not os.path.exists(cfg_file):"}],"source_content_type":"text/x-python","patch_set":1,"id":"1af86dd1_6de292a1","line":765,"in_reply_to":"1af86dd1_d6f24506","updated":"2015-06-12 14:36:56.000000000","message":"Yes, mtime is a quicker alternative, but it allows for useless reload of service components in cases where the file is modified without causing any real changes to configuration.\nAlso, expect the reload to be less frequent, so the overhead of hashing the file contents should be minimal.","commit_id":"e1903cd2b9f984ea201eb35442d6ce71e7532245"},{"author":{"_account_id":8290,"name":"liusheng","email":"liusheng2048@gmail.com","username":"LiuSheng"},"change_message_id":"3ca51f30ce54fe7cd50573ef8a310c5c123318f8","unresolved":false,"context_lines":[{"line_number":763,"context_line":"    cfg_file \u003d cfg.CONF.pipeline_cfg_file"},{"line_number":764,"context_line":""},{"line_number":765,"context_line":"    if not os.path.exists(cfg_file):"},{"line_number":766,"context_line":"        cfg_file \u003d cfg.CONF.find_file(cfg_file)"},{"line_number":767,"context_line":"    return os.path.getmtime(cfg_file)"},{"line_number":768,"context_line":""},{"line_number":769,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"fa32b979_9bb2f204","line":766,"updated":"2015-06-19 01:57:41.000000000","message":"maybe it is better to merge the above lines with L732 ? (add a global cache to store the cfg file path). for this method will be invoked periodically, it will reduce minor cost.","commit_id":"8c30c9ae8b58636bdabddfd03184fb8e6519f3fb"},{"author":{"_account_id":8290,"name":"liusheng","email":"liusheng2048@gmail.com","username":"LiuSheng"},"change_message_id":"3ca51f30ce54fe7cd50573ef8a310c5c123318f8","unresolved":false,"context_lines":[{"line_number":772,"context_line":"    cfg_file \u003d cfg.CONF.pipeline_cfg_file"},{"line_number":773,"context_line":""},{"line_number":774,"context_line":"    if not os.path.exists(cfg_file):"},{"line_number":775,"context_line":"        cfg_file \u003d cfg.CONF.find_file(cfg_file)"},{"line_number":776,"context_line":"    with open(cfg_file) as fap:"},{"line_number":777,"context_line":"        data \u003d fap.read()"},{"line_number":778,"context_line":"    if six.PY3:"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa32b979_3bc2c653","line":775,"updated":"2015-06-19 01:57:41.000000000","message":"ditto with above comment","commit_id":"8c30c9ae8b58636bdabddfd03184fb8e6519f3fb"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"c8e7af7b7dada1711db9dd2e2da80bcb7650c188","unresolved":false,"context_lines":[{"line_number":52,"context_line":"                ),"},{"line_number":53,"context_line":"    cfg.IntOpt(\u0027pipeline_polling_interval\u0027,"},{"line_number":54,"context_line":"               default\u003d20,"},{"line_number":55,"context_line":"               help\u003d\"Polling interval for pipeline file configuration.(secs)\""},{"line_number":56,"context_line":"               ),"},{"line_number":57,"context_line":"]"},{"line_number":58,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"fa32b979_72c2eb54","line":55,"updated":"2015-06-24 14:29:24.000000000","message":"\"in seconds.\"","commit_id":"e954b42c0e68d21fabd44c5ef187432872f9478c"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"c8e7af7b7dada1711db9dd2e2da80bcb7650c188","unresolved":false,"context_lines":[{"line_number":748,"context_line":"_cfg_file_path \u003d None"},{"line_number":749,"context_line":""},{"line_number":750,"context_line":""},{"line_number":751,"context_line":"def get_cfg_file_path(cfg_file):"},{"line_number":752,"context_line":"    global _cfg_file_path"},{"line_number":753,"context_line":""},{"line_number":754,"context_line":"    if not os.path.exists(cfg_file):"}],"source_content_type":"text/x-python","patch_set":11,"id":"fa32b979_328ea32e","line":751,"updated":"2015-06-24 14:29:24.000000000","message":"This really look unrelated and should not be used, find_file is good enogugh.","commit_id":"e954b42c0e68d21fabd44c5ef187432872f9478c"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"9c2e02cc7aae958e1f76b0c4e9175b23f82b20a2","unresolved":false,"context_lines":[{"line_number":751,"context_line":""},{"line_number":752,"context_line":"def get_cfg_file_path(cfg_file):"},{"line_number":753,"context_line":"    global _cfg_file_path"},{"line_number":754,"context_line":""},{"line_number":755,"context_line":"    if not os.path.exists(cfg_file):"},{"line_number":756,"context_line":"        _cfg_file_path \u003d cfg.CONF.find_file(cfg_file)"},{"line_number":757,"context_line":"    else:"}],"source_content_type":"text/x-python","patch_set":14,"id":"ba3cc151_5474d0cd","line":754,"updated":"2015-06-30 20:01:15.000000000","message":"this should probably be associated with pipelinemanager rather than global no?","commit_id":"a55c428d7318ee577286ec66226bd363707c8966"},{"author":{"_account_id":7478,"name":"Nadya Shakhat","email":"nadmi4@gmail.com","username":"nprivalova"},"change_message_id":"e882aa5a73b2c99943714c00813e152344dd6fcf","unresolved":false,"context_lines":[{"line_number":788,"context_line":"def setup_pipeline(transformer_manager\u003dNone):"},{"line_number":789,"context_line":"    \"\"\"Setup pipeline manager according to yaml config file.\"\"\""},{"line_number":790,"context_line":"    cfg_file \u003d get_cfg_file_path(cfg.CONF.pipeline_cfg_file)"},{"line_number":791,"context_line":"    return _setup_pipeline_manager(cfg_file, transformer_manager)"},{"line_number":792,"context_line":""},{"line_number":793,"context_line":""},{"line_number":794,"context_line":"def get_pipeline_mtime():"}],"source_content_type":"text/x-python","patch_set":14,"id":"ba3cc151_87ed68f1","line":791,"updated":"2015-06-30 11:02:39.000000000","message":"You have extracted the code to get_cfg_file_path method but the following contains a lot of code duplication. Maybe you may reuse get_cfg_file_path here as well?","commit_id":"a55c428d7318ee577286ec66226bd363707c8966"},{"author":{"_account_id":13560,"name":"Rohit Jaiswal","email":"rohit.jaiswal@gmail.com","username":"rjaiswal"},"change_message_id":"07af84bf2b68097bce1fd21ae0b8281432c7bf6d","unresolved":false,"context_lines":[{"line_number":788,"context_line":"def setup_pipeline(transformer_manager\u003dNone):"},{"line_number":789,"context_line":"    \"\"\"Setup pipeline manager according to yaml config file.\"\"\""},{"line_number":790,"context_line":"    cfg_file \u003d get_cfg_file_path(cfg.CONF.pipeline_cfg_file)"},{"line_number":791,"context_line":"    return _setup_pipeline_manager(cfg_file, transformer_manager)"},{"line_number":792,"context_line":""},{"line_number":793,"context_line":""},{"line_number":794,"context_line":"def get_pipeline_mtime():"}],"source_content_type":"text/x-python","patch_set":14,"id":"ba3cc151_ea88b124","line":791,"in_reply_to":"ba3cc151_87ed68f1","updated":"2015-06-30 14:59:03.000000000","message":"get_cfg_file_path method allows a way to cache the sample_pipeline file path in a global. The method setup_pipeline already uses get_cfg_file_path method.","commit_id":"a55c428d7318ee577286ec66226bd363707c8966"},{"author":{"_account_id":13560,"name":"Rohit Jaiswal","email":"rohit.jaiswal@gmail.com","username":"rjaiswal"},"change_message_id":"7e3f7dab7f47fa0278d2a796643cd2f45667bdb0","unresolved":false,"context_lines":[{"line_number":752,"context_line":"def get_cfg_file_path(cfg_file):"},{"line_number":753,"context_line":"    global _cfg_file_path"},{"line_number":754,"context_line":""},{"line_number":755,"context_line":"    if not os.path.exists(cfg_file):"},{"line_number":756,"context_line":"        _cfg_file_path \u003d cfg.CONF.find_file(cfg_file)"},{"line_number":757,"context_line":"    else:"},{"line_number":758,"context_line":"        _cfg_file_path \u003d cfg_file"}],"source_content_type":"text/x-python","patch_set":15,"id":"ba3cc151_1b56705c","line":755,"updated":"2015-06-30 22:31:10.000000000","message":"gordc: Its global to the pipeline module since the cfg_file path is used for purposes external to PipelineManager(which deals with configuration object)","commit_id":"1b66cc6cc99bec152f26b3086d7edd75f105c036"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"a3347ac0bef28f3c5e7df3ef4fbb71137f9111f7","unresolved":false,"context_lines":[{"line_number":752,"context_line":"def get_cfg_file_path(cfg_file):"},{"line_number":753,"context_line":"    global _cfg_file_path"},{"line_number":754,"context_line":""},{"line_number":755,"context_line":"    if not os.path.exists(cfg_file):"},{"line_number":756,"context_line":"        _cfg_file_path \u003d cfg.CONF.find_file(cfg_file)"},{"line_number":757,"context_line":"    else:"},{"line_number":758,"context_line":"        _cfg_file_path \u003d cfg_file"}],"source_content_type":"text/x-python","patch_set":15,"id":"ba3cc151_2382c2c8","line":755,"in_reply_to":"ba3cc151_1b56705c","updated":"2015-07-02 17:58:35.000000000","message":"tbh, this seems odd. just thinking for when we include event_pipeline or any other cfg file, we\u0027ll just keep adding global var here.\n\ni think this should be all under the pipelinemanager (including get_pipeline_hash, get_pipeline_mtime)","commit_id":"1b66cc6cc99bec152f26b3086d7edd75f105c036"},{"author":{"_account_id":8290,"name":"liusheng","email":"liusheng2048@gmail.com","username":"LiuSheng"},"change_message_id":"48942322f9551c82d362707d6c0accdba0f1378b","unresolved":false,"context_lines":[{"line_number":777,"context_line":""},{"line_number":778,"context_line":""},{"line_number":779,"context_line":"def _setup_pipeline_manager(cfg_file, transformer_manager, p_type\u003dSAMPLE_TYPE):"},{"line_number":780,"context_line":"    return PipelineManager(cfg_file,"},{"line_number":781,"context_line":"                           transformer_manager or"},{"line_number":782,"context_line":"                           extension.ExtensionManager("},{"line_number":783,"context_line":"                               \u0027ceilometer.transformer\u0027,"}],"source_content_type":"text/x-python","patch_set":16,"id":"ba3cc151_8d8dedd4","line":780,"updated":"2015-07-03 03:32:13.000000000","message":"this change have broken many tests[1], because the  PipelineManager accepted a cfg dict previously, now a path (string) inputted.\n\n[1] http://logs.openstack.org/42/190842/16/check/gate-ceilometer-python27/d6a11fb/testr_results.html.gz","commit_id":"fbe949342647d8cbc5f43279cce19a1f7db7d66b"}],"ceilometer/service_base.py":[{"author":{"_account_id":7478,"name":"Nadya Shakhat","email":"nadmi4@gmail.com","username":"nprivalova"},"change_message_id":"dd08dea65d6685873c67d8502e51cf7ace7021e4","unresolved":false,"context_lines":[{"line_number":41,"context_line":"    @abc.abstractmethod"},{"line_number":42,"context_line":"    def reload_pipeline(self):"},{"line_number":43,"context_line":"        \"\"\"Reload pipeline in the agents.\"\"\""},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    def refresh_pipeline(self):"},{"line_number":46,"context_line":"        mtime \u003d pipeline.get_pipeline_mtime()"},{"line_number":47,"context_line":"        if mtime \u003e self.pipeline_mtime:"}],"source_content_type":"text/x-python","patch_set":20,"id":"ba3cc151_4ae0bd96","line":44,"updated":"2015-07-07 07:12:09.000000000","message":"Can we add more information to the logs? \nUse case is the following. We want to create integration tests with several iterations. Each new iteration works with a new pipeline.conf. We want to be sure that configuration is updated successfully. \nI guess it would be useful to write hashes in logs. After line 57 we need smth like \"Pipeline has been reloaded. old hash:..., new hash: ...\" . Thus we will be able to grep this line from the test script and keep the current hash inside","commit_id":"def6471d5697e45fe897b4ff286326e96f91bdd0"},{"author":{"_account_id":7478,"name":"Nadya Shakhat","email":"nadmi4@gmail.com","username":"nprivalova"},"change_message_id":"dd08dea65d6685873c67d8502e51cf7ace7021e4","unresolved":false,"context_lines":[{"line_number":55,"context_line":""},{"line_number":56,"context_line":"                try:"},{"line_number":57,"context_line":"                    self.pipeline_manager \u003d pipeline.setup_pipeline()"},{"line_number":58,"context_line":"                except Exception as err:"},{"line_number":59,"context_line":"                    LOG.exception(_LE(\u0027Unable to load changed pipeline: %s\u0027)"},{"line_number":60,"context_line":"                                  % err)"},{"line_number":61,"context_line":"                    return"}],"source_content_type":"text/x-python","patch_set":20,"id":"ba3cc151_ea30b109","line":58,"updated":"2015-07-07 07:12:09.000000000","message":"Here would be useful to have an addition \"the active config\u0027s hash is ... \"","commit_id":"def6471d5697e45fe897b4ff286326e96f91bdd0"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"d7c36759b3c22f60d996665b64f02e231f386f7e","unresolved":false,"context_lines":[{"line_number":55,"context_line":""},{"line_number":56,"context_line":"                try:"},{"line_number":57,"context_line":"                    self.pipeline_manager \u003d pipeline.setup_pipeline()"},{"line_number":58,"context_line":"                except Exception as err:"},{"line_number":59,"context_line":"                    LOG.exception(_LE(\u0027Unable to load changed pipeline: %s\u0027)"},{"line_number":60,"context_line":"                                  % err)"},{"line_number":61,"context_line":"                    return"}],"source_content_type":"text/x-python","patch_set":20,"id":"ba3cc151_29ff71ab","line":58,"in_reply_to":"ba3cc151_2e4a17ad","updated":"2015-07-07 14:35:16.000000000","message":"ah i see... maybe a debug level. i guess it\u0027s not that bad since we don\u0027t expect this to be happening constantly.","commit_id":"def6471d5697e45fe897b4ff286326e96f91bdd0"},{"author":{"_account_id":7478,"name":"Nadya Shakhat","email":"nadmi4@gmail.com","username":"nprivalova"},"change_message_id":"7c95c5f96e5de0c6947033355bfa89272a3ed8fd","unresolved":false,"context_lines":[{"line_number":55,"context_line":""},{"line_number":56,"context_line":"                try:"},{"line_number":57,"context_line":"                    self.pipeline_manager \u003d pipeline.setup_pipeline()"},{"line_number":58,"context_line":"                except Exception as err:"},{"line_number":59,"context_line":"                    LOG.exception(_LE(\u0027Unable to load changed pipeline: %s\u0027)"},{"line_number":60,"context_line":"                                  % err)"},{"line_number":61,"context_line":"                    return"}],"source_content_type":"text/x-python","patch_set":20,"id":"ba3cc151_2e4a17ad","line":58,"in_reply_to":"ba3cc151_b63a03e6","updated":"2015-07-07 14:25:17.000000000","message":"for tests. We may keep \u0027the latest pipeline hash\u0027 inside test script to be sure that after the changing file hash has been changed too. See my comment above also","commit_id":"def6471d5697e45fe897b4ff286326e96f91bdd0"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"56dd2089f00d37afb7d6ee4e677b015db6f973a9","unresolved":false,"context_lines":[{"line_number":55,"context_line":""},{"line_number":56,"context_line":"                try:"},{"line_number":57,"context_line":"                    self.pipeline_manager \u003d pipeline.setup_pipeline()"},{"line_number":58,"context_line":"                except Exception as err:"},{"line_number":59,"context_line":"                    LOG.exception(_LE(\u0027Unable to load changed pipeline: %s\u0027)"},{"line_number":60,"context_line":"                                  % err)"},{"line_number":61,"context_line":"                    return"}],"source_content_type":"text/x-python","patch_set":20,"id":"ba3cc151_b63a03e6","line":58,"in_reply_to":"ba3cc151_ea30b109","updated":"2015-07-07 12:36:18.000000000","message":"in the error? i\u0027m not sure how useful that is as it\u0027s a \u0027randomly\u0027 generated value. what would you use it for?","commit_id":"def6471d5697e45fe897b4ff286326e96f91bdd0"}],"ceilometer/tests/agent/agentbase.py":[{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"9c2e02cc7aae958e1f76b0c4e9175b23f82b20a2","unresolved":false,"context_lines":[{"line_number":24,"context_line":"import abc"},{"line_number":25,"context_line":"import copy"},{"line_number":26,"context_line":"import datetime"},{"line_number":27,"context_line":"import eventlet"},{"line_number":28,"context_line":"import shutil"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"import mock"}],"source_content_type":"text/x-python","patch_set":14,"id":"ba3cc151_9b504a60","line":27,"updated":"2015-06-30 20:01:15.000000000","message":"non-native lib, move down a section","commit_id":"a55c428d7318ee577286ec66226bd363707c8966"}],"ceilometer/tests/test_notification.py":[{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"9c2e02cc7aae958e1f76b0c4e9175b23f82b20a2","unresolved":false,"context_lines":[{"line_number":16,"context_line":""},{"line_number":17,"context_line":"import eventlet"},{"line_number":18,"context_line":"import mock"},{"line_number":19,"context_line":"import shutil"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"from oslo_config import fixture as fixture_config"},{"line_number":22,"context_line":"from oslo_context import context"}],"source_content_type":"text/x-python","patch_set":14,"id":"ba3cc151_bb5aee81","line":19,"updated":"2015-06-30 20:01:15.000000000","message":"native lib, move up to own section","commit_id":"a55c428d7318ee577286ec66226bd363707c8966"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"9c2e02cc7aae958e1f76b0c4e9175b23f82b20a2","unresolved":false,"context_lines":[{"line_number":317,"context_line":""},{"line_number":318,"context_line":"        self.assertEqual(self.expected_samples, len(self.publisher.samples))"},{"line_number":319,"context_line":""},{"line_number":320,"context_line":"        (self.assertIn([\u0027disk.root.size\u0027, \u0027vcpus\u0027], sample.name)"},{"line_number":321,"context_line":"         for sample in self.publisher.samples)"},{"line_number":322,"context_line":""},{"line_number":323,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"ba3cc151_d65b07f5","line":320,"updated":"2015-06-30 20:01:15.000000000","message":"this looks strange. this means \u0027disk.root.size\u0027 and \u0027vcpus\u0027 are in sample.name?","commit_id":"a55c428d7318ee577286ec66226bd363707c8966"},{"author":{"_account_id":13560,"name":"Rohit Jaiswal","email":"rohit.jaiswal@gmail.com","username":"rjaiswal"},"change_message_id":"7e3f7dab7f47fa0278d2a796643cd2f45667bdb0","unresolved":false,"context_lines":[{"line_number":319,"context_line":"        self.assertEqual(self.expected_samples, len(self.publisher.samples))"},{"line_number":320,"context_line":""},{"line_number":321,"context_line":"        (self.assertIn([\u0027disk.root.size\u0027, \u0027vcpus\u0027], sample.name)"},{"line_number":322,"context_line":"         for sample in self.publisher.samples)"},{"line_number":323,"context_line":""},{"line_number":324,"context_line":""},{"line_number":325,"context_line":"class TestRealNotification(BaseRealNotification):"}],"source_content_type":"text/x-python","patch_set":15,"id":"ba3cc151_db9488e3","line":322,"updated":"2015-06-30 22:31:10.000000000","message":"gordc: This tries to validate that published samples have a name that is either \u0027disk.root.size\u0027 or \u0027vcpus\u0027, since that is the updated pipeline content(line 297)","commit_id":"1b66cc6cc99bec152f26b3086d7edd75f105c036"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"a3347ac0bef28f3c5e7df3ef4fbb71137f9111f7","unresolved":false,"context_lines":[{"line_number":319,"context_line":"        self.assertEqual(self.expected_samples, len(self.publisher.samples))"},{"line_number":320,"context_line":""},{"line_number":321,"context_line":"        (self.assertIn([\u0027disk.root.size\u0027, \u0027vcpus\u0027], sample.name)"},{"line_number":322,"context_line":"         for sample in self.publisher.samples)"},{"line_number":323,"context_line":""},{"line_number":324,"context_line":""},{"line_number":325,"context_line":"class TestRealNotification(BaseRealNotification):"}],"source_content_type":"text/x-python","patch_set":15,"id":"ba3cc151_c04f4c32","line":322,"in_reply_to":"ba3cc151_db9488e3","updated":"2015-07-02 17:58:35.000000000","message":"sorry, so i\u0027m just curious why this passes. assertIn(a,b) logic says a in b. not b in a... these two param should be flipped.","commit_id":"1b66cc6cc99bec152f26b3086d7edd75f105c036"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"925e48ceb085d17dcd869cee7f2b994223ba8c28","unresolved":false,"context_lines":[{"line_number":18,"context_line":""},{"line_number":19,"context_line":"import eventlet"},{"line_number":20,"context_line":"import mock"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"from oslo_config import fixture as fixture_config"},{"line_number":23,"context_line":"from oslo_context import context"},{"line_number":24,"context_line":"import oslo_messaging"}],"source_content_type":"text/x-python","patch_set":19,"id":"ba3cc151_e667b3e8","line":21,"updated":"2015-07-06 14:04:02.000000000","message":"eventlet/mock should be grouped with 3rd party lib","commit_id":"70f9e0c8c01d6e9cc3c1a79e57e38bbfa23c1274"}]}
