)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"f6ab97512a653f73c722e5b4721203ca6c0edbba","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Add pidfile to the JournalPeriodicProcessor worker"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This will allow to send signals to the worker. As it is right now"},{"line_number":10,"context_line":"sending a SIGHUP would trigger the maintenance task and thus a"},{"line_number":11,"context_line":"full_sync. Something particularly useful for doing new deployments of"},{"line_number":12,"context_line":"ODL. The pidfile will be created under the directory set in \u0027state_path\u0027"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":14,"id":"3f4b6375_b78112fe","line":9,"range":{"start_line":9,"start_character":0,"end_line":9,"end_character":46},"updated":"2017-10-23 19:11:22.000000000","message":"This isn\u0027t normal practice in UNIX.\n\nWhy can\u0027t we create pid file of main process and sending singal to main process?\n\nthe logic in oslo_service which handles child process isn\u0027t enough?","commit_id":"7676ff61545fa0572b43024c2719f81203d5b765"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"0965ba36e9a0d5b6e37e533a401a24ac15b74ee7","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Add pidfile to the JournalPeriodicProcessor worker"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This will allow to send signals to the worker. As it is right now"},{"line_number":10,"context_line":"sending a SIGHUP would trigger the maintenance task and thus a"},{"line_number":11,"context_line":"full_sync. Something particularly useful for doing new deployments of"},{"line_number":12,"context_line":"ODL. The pidfile will be created under the directory set in \u0027state_path\u0027"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":14,"id":"3f4b6375_dfc8f122","line":9,"range":{"start_line":9,"start_character":0,"end_line":9,"end_character":46},"in_reply_to":"3f4b6375_b78112fe","updated":"2017-10-25 11:32:48.000000000","message":"\u003e This isn\u0027t normal practice in UNIX.\n\nCorrect. \n\n\u003e Why can\u0027t we create pid file of main process and sending singal to main process?\n\u003e the logic in oslo_service which handles child process isn\u0027t enough?\n\nBecause this is a pending issue in neutron [1] and what effectively happens is that when you restart neutron all the children are restarted as well and those that can\u0027t be restarted just crash and are never brought back to life again. Therefore, this patch allows us to signal this worker only, until this can be done through the main process, which I agree it\u0027s the best option. \n\n[1]: https://bugs.launchpad.net/oslo-incubator/+bug/1276694","commit_id":"7676ff61545fa0572b43024c2719f81203d5b765"}],"devstack/entry_points":[{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"f6ab97512a653f73c722e5b4721203ca6c0edbba","unresolved":false,"context_lines":[{"line_number":129,"context_line":"    # NOTE(mpeterson): Create the state_path that will be used by neutron"},{"line_number":130,"context_line":"    # refer to: https://github.com/openstack-dev/devstack/blob/master/lib/neutron#L46"},{"line_number":131,"context_line":"    # and: https://github.com/openstack-dev/devstack/blob/master/lib/neutron-legacy#L698"},{"line_number":132,"context_line":"    sudo mkdir -p $DATA_DIR/neutron"},{"line_number":133,"context_line":"    safe_chown -R $STACK_USER $DATA_DIR"},{"line_number":134,"context_line":"    safe_chmod 0755 $DATA_DIR/neutron"},{"line_number":135,"context_line":""}],"source_content_type":"application/x-shellscript","patch_set":14,"id":"3f4b6375_d7348e95","line":132,"range":{"start_line":132,"start_character":18,"end_line":132,"end_character":35},"updated":"2017-10-23 19:11:22.000000000","message":"NEUTRON_STATE_PATH?","commit_id":"7676ff61545fa0572b43024c2719f81203d5b765"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"0965ba36e9a0d5b6e37e533a401a24ac15b74ee7","unresolved":false,"context_lines":[{"line_number":129,"context_line":"    # NOTE(mpeterson): Create the state_path that will be used by neutron"},{"line_number":130,"context_line":"    # refer to: https://github.com/openstack-dev/devstack/blob/master/lib/neutron#L46"},{"line_number":131,"context_line":"    # and: https://github.com/openstack-dev/devstack/blob/master/lib/neutron-legacy#L698"},{"line_number":132,"context_line":"    sudo mkdir -p $DATA_DIR/neutron"},{"line_number":133,"context_line":"    safe_chown -R $STACK_USER $DATA_DIR"},{"line_number":134,"context_line":"    safe_chmod 0755 $DATA_DIR/neutron"},{"line_number":135,"context_line":""}],"source_content_type":"application/x-shellscript","patch_set":14,"id":"3f4b6375_5fdc01e3","line":132,"range":{"start_line":132,"start_character":18,"end_line":132,"end_character":35},"in_reply_to":"3f4b6375_d7348e95","updated":"2017-10-25 11:32:48.000000000","message":"Yeah, I also thought it would work but it does not exist at this point in the execution.","commit_id":"7676ff61545fa0572b43024c2719f81203d5b765"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"43ef5f9105b2d252eb11c2e41770a5f58d977fb5","unresolved":false,"context_lines":[{"line_number":124,"context_line":"function configure_neutron_odl {"},{"line_number":125,"context_line":"    echo \"Configuring ML2 for OpenDaylight\""},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"    # NOTE(mpeterson): Create the state_path that will be used by neutron"},{"line_number":128,"context_line":"    # refer to: https://github.com/openstack-dev/devstack/blob/master/lib/neutron#L46"},{"line_number":129,"context_line":"    # and: https://github.com/openstack-dev/devstack/blob/master/lib/neutron-legacy#L698"},{"line_number":130,"context_line":"    sudo mkdir -p $DATA_DIR/neutron"}],"source_content_type":"application/x-shellscript","patch_set":30,"id":"df87a7cf_2132a511","line":127,"range":{"start_line":127,"start_character":23,"end_line":127,"end_character":73},"updated":"2017-12-07 08:36:38.000000000","message":"I\u0027d also explain why you\u0027re doing it, since it\u0027s not clear","commit_id":"7a16329ad92da65ea775062e72793c3807ece92a"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"a34503d8cd0293881a401283605fb62dde166a22","unresolved":false,"context_lines":[{"line_number":124,"context_line":"function configure_neutron_odl {"},{"line_number":125,"context_line":"    echo \"Configuring ML2 for OpenDaylight\""},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"    # NOTE(mpeterson): Create the state_path that will be used by neutron"},{"line_number":128,"context_line":"    # refer to: https://github.com/openstack-dev/devstack/blob/master/lib/neutron#L46"},{"line_number":129,"context_line":"    # and: https://github.com/openstack-dev/devstack/blob/master/lib/neutron-legacy#L698"},{"line_number":130,"context_line":"    sudo mkdir -p $DATA_DIR/neutron"}],"source_content_type":"application/x-shellscript","patch_set":30,"id":"df87a7cf_480d619f","line":127,"range":{"start_line":127,"start_character":23,"end_line":127,"end_character":73},"in_reply_to":"df87a7cf_2132a511","updated":"2017-12-09 21:07:49.000000000","message":"Done","commit_id":"7a16329ad92da65ea775062e72793c3807ece92a"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"43ef5f9105b2d252eb11c2e41770a5f58d977fb5","unresolved":false,"context_lines":[{"line_number":125,"context_line":"    echo \"Configuring ML2 for OpenDaylight\""},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"    # NOTE(mpeterson): Create the state_path that will be used by neutron"},{"line_number":128,"context_line":"    # refer to: https://github.com/openstack-dev/devstack/blob/master/lib/neutron#L46"},{"line_number":129,"context_line":"    # and: https://github.com/openstack-dev/devstack/blob/master/lib/neutron-legacy#L698"},{"line_number":130,"context_line":"    sudo mkdir -p $DATA_DIR/neutron"},{"line_number":131,"context_line":"    safe_chown -R $STACK_USER $DATA_DIR"}],"source_content_type":"application/x-shellscript","patch_set":30,"id":"df87a7cf_c1adf931","line":128,"range":{"start_line":128,"start_character":63,"end_line":128,"end_character":69},"updated":"2017-12-07 08:36:38.000000000","message":"If you refer to master the line number is not constant, better refer to a tag (so that later on if something breaks its easier to see why)","commit_id":"7a16329ad92da65ea775062e72793c3807ece92a"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"a34503d8cd0293881a401283605fb62dde166a22","unresolved":false,"context_lines":[{"line_number":125,"context_line":"    echo \"Configuring ML2 for OpenDaylight\""},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"    # NOTE(mpeterson): Create the state_path that will be used by neutron"},{"line_number":128,"context_line":"    # refer to: https://github.com/openstack-dev/devstack/blob/master/lib/neutron#L46"},{"line_number":129,"context_line":"    # and: https://github.com/openstack-dev/devstack/blob/master/lib/neutron-legacy#L698"},{"line_number":130,"context_line":"    sudo mkdir -p $DATA_DIR/neutron"},{"line_number":131,"context_line":"    safe_chown -R $STACK_USER $DATA_DIR"}],"source_content_type":"application/x-shellscript","patch_set":30,"id":"df87a7cf_68f14595","line":128,"range":{"start_line":128,"start_character":63,"end_line":128,"end_character":69},"in_reply_to":"df87a7cf_c1adf931","updated":"2017-12-09 21:07:49.000000000","message":"so very true, good catch.","commit_id":"7a16329ad92da65ea775062e72793c3807ece92a"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"43ef5f9105b2d252eb11c2e41770a5f58d977fb5","unresolved":false,"context_lines":[{"line_number":126,"context_line":""},{"line_number":127,"context_line":"    # NOTE(mpeterson): Create the state_path that will be used by neutron"},{"line_number":128,"context_line":"    # refer to: https://github.com/openstack-dev/devstack/blob/master/lib/neutron#L46"},{"line_number":129,"context_line":"    # and: https://github.com/openstack-dev/devstack/blob/master/lib/neutron-legacy#L698"},{"line_number":130,"context_line":"    sudo mkdir -p $DATA_DIR/neutron"},{"line_number":131,"context_line":"    safe_chown -R $STACK_USER $DATA_DIR"},{"line_number":132,"context_line":"    safe_chmod 0755 $DATA_DIR/neutron"}],"source_content_type":"application/x-shellscript","patch_set":30,"id":"df87a7cf_61ac2d34","line":129,"range":{"start_line":129,"start_character":58,"end_line":129,"end_character":64},"updated":"2017-12-07 08:36:38.000000000","message":"ditto","commit_id":"7a16329ad92da65ea775062e72793c3807ece92a"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"a34503d8cd0293881a401283605fb62dde166a22","unresolved":false,"context_lines":[{"line_number":126,"context_line":""},{"line_number":127,"context_line":"    # NOTE(mpeterson): Create the state_path that will be used by neutron"},{"line_number":128,"context_line":"    # refer to: https://github.com/openstack-dev/devstack/blob/master/lib/neutron#L46"},{"line_number":129,"context_line":"    # and: https://github.com/openstack-dev/devstack/blob/master/lib/neutron-legacy#L698"},{"line_number":130,"context_line":"    sudo mkdir -p $DATA_DIR/neutron"},{"line_number":131,"context_line":"    safe_chown -R $STACK_USER $DATA_DIR"},{"line_number":132,"context_line":"    safe_chmod 0755 $DATA_DIR/neutron"}],"source_content_type":"application/x-shellscript","patch_set":30,"id":"df87a7cf_88ee09b2","line":129,"range":{"start_line":129,"start_character":58,"end_line":129,"end_character":64},"in_reply_to":"df87a7cf_61ac2d34","updated":"2017-12-09 21:07:49.000000000","message":"Done","commit_id":"7a16329ad92da65ea775062e72793c3807ece92a"}],"networking_odl/journal/worker.py":[{"author":{"_account_id":13912,"name":"rajiv","email":"thenakliman@gmail.com","username":"rajiv.kumar"},"change_message_id":"ad68bd007e520e79aff871db2596afcd1bc9640a","unresolved":false,"context_lines":[{"line_number":16,"context_line":"import atexit"},{"line_number":17,"context_line":"import os"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"from neutron.agent.linux.daemon import Pidfile"},{"line_number":20,"context_line":"from neutron_lib import worker"},{"line_number":21,"context_line":"from oslo_config import cfg"},{"line_number":22,"context_line":"from oslo_log import log as logging"}],"source_content_type":"text/x-python","patch_set":18,"id":"3f4b6375_4ed8bd1c","line":19,"range":{"start_line":19,"start_character":0,"end_line":19,"end_character":46},"updated":"2017-11-06 09:31:41.000000000","message":"Please import module not class","commit_id":"a18766d2a4ff78207b71dbb536c6da78d9c8adc5"},{"author":{"_account_id":13912,"name":"rajiv","email":"thenakliman@gmail.com","username":"rajiv.kumar"},"change_message_id":"cad101536408f0a02223a85b5a65b571ba01bf9d","unresolved":false,"context_lines":[{"line_number":16,"context_line":"import atexit"},{"line_number":17,"context_line":"import os"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"from neutron.agent.linux.daemon import Pidfile"},{"line_number":20,"context_line":"from neutron_lib import worker"},{"line_number":21,"context_line":"from oslo_config import cfg"},{"line_number":22,"context_line":"from oslo_log import log as logging"}],"source_content_type":"text/x-python","patch_set":18,"id":"1f485f77_458a731b","line":19,"range":{"start_line":19,"start_character":0,"end_line":19,"end_character":46},"in_reply_to":"1f485f77_22652db6","updated":"2017-11-13 10:18:37.000000000","message":"https://docs.openstack.org/hacking/latest/user/hacking.html#imports","commit_id":"a18766d2a4ff78207b71dbb536c6da78d9c8adc5"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"da54c7b6edb108b3bafcbae999152e57eb38197c","unresolved":false,"context_lines":[{"line_number":16,"context_line":"import atexit"},{"line_number":17,"context_line":"import os"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"from neutron.agent.linux.daemon import Pidfile"},{"line_number":20,"context_line":"from neutron_lib import worker"},{"line_number":21,"context_line":"from oslo_config import cfg"},{"line_number":22,"context_line":"from oslo_log import log as logging"}],"source_content_type":"text/x-python","patch_set":18,"id":"ff82abbf_84415f0e","line":19,"range":{"start_line":19,"start_character":0,"end_line":19,"end_character":46},"in_reply_to":"1f485f77_458a731b","updated":"2017-11-23 07:32:53.000000000","message":"happens in 27 as well and many other places... Although I don\u0027t agree with that guideline, I\u0027ve fixed it...\n\nPerhaps that hacking rule should be enabled if we want to enforce it.","commit_id":"a18766d2a4ff78207b71dbb536c6da78d9c8adc5"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"fe1d0ca93deccb30e2b37e291dd3ecd3d218138d","unresolved":false,"context_lines":[{"line_number":16,"context_line":"import atexit"},{"line_number":17,"context_line":"import os"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"from neutron.agent.linux.daemon import Pidfile"},{"line_number":20,"context_line":"from neutron_lib import worker"},{"line_number":21,"context_line":"from oslo_config import cfg"},{"line_number":22,"context_line":"from oslo_log import log as logging"}],"source_content_type":"text/x-python","patch_set":18,"id":"1f485f77_22652db6","line":19,"range":{"start_line":19,"start_character":0,"end_line":19,"end_character":46},"in_reply_to":"3f4b6375_4ed8bd1c","updated":"2017-11-13 09:27:26.000000000","message":"why?","commit_id":"a18766d2a4ff78207b71dbb536c6da78d9c8adc5"},{"author":{"_account_id":13912,"name":"rajiv","email":"thenakliman@gmail.com","username":"rajiv.kumar"},"change_message_id":"ad68bd007e520e79aff871db2596afcd1bc9640a","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        self._timer \u003d None"},{"line_number":52,"context_line":"        self._periodic_task \u003d None"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"        pidfile \u003d os.path.join(cfg.CONF.state_path,"},{"line_number":55,"context_line":"                               type(self).__name__.lower() + \u0027.pid\u0027)"},{"line_number":56,"context_line":"        self.pidfile \u003d Pidfile(pidfile, \u0027python\u0027)"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"        atexit.register(self._delete_pidfile)"},{"line_number":59,"context_line":"        self.pidfile.write(os.getpid())"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"    def _delete_pidfile(self):"},{"line_number":62,"context_line":"        if self.pidfile is not None:"},{"line_number":63,"context_line":"            os.remove(str(self.pidfile))"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    def start(self):"},{"line_number":66,"context_line":"        super(JournalPeriodicProcessor, self).start()"}],"source_content_type":"text/x-python","patch_set":18,"id":"3f4b6375_aeea9170","line":63,"range":{"start_line":54,"start_character":0,"end_line":63,"end_character":40},"updated":"2017-11-06 09:31:41.000000000","message":"instead of having this logic here, what if we create it in separate class and inherit from that class. so this way, we will keep this class untouched at the same time, we provide a way, in future if some other worker wants the same functionality. they just need to inherit from this class.\n\nclass ODLWorker(BaseWorker):\n    # create pidfile here\n    # do x work\n    # do y work\n\nclass JournalPeriodicProcessor(ODLWorker):\n    # Periodic Processoe","commit_id":"a18766d2a4ff78207b71dbb536c6da78d9c8adc5"},{"author":{"_account_id":13912,"name":"rajiv","email":"thenakliman@gmail.com","username":"rajiv.kumar"},"change_message_id":"cad101536408f0a02223a85b5a65b571ba01bf9d","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        self._timer \u003d None"},{"line_number":52,"context_line":"        self._periodic_task \u003d None"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"        pidfile \u003d os.path.join(cfg.CONF.state_path,"},{"line_number":55,"context_line":"                               type(self).__name__.lower() + \u0027.pid\u0027)"},{"line_number":56,"context_line":"        self.pidfile \u003d Pidfile(pidfile, \u0027python\u0027)"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"        atexit.register(self._delete_pidfile)"},{"line_number":59,"context_line":"        self.pidfile.write(os.getpid())"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"    def _delete_pidfile(self):"},{"line_number":62,"context_line":"        if self.pidfile is not None:"},{"line_number":63,"context_line":"            os.remove(str(self.pidfile))"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    def start(self):"},{"line_number":66,"context_line":"        super(JournalPeriodicProcessor, self).start()"}],"source_content_type":"text/x-python","patch_set":18,"id":"1f485f77_45c71314","line":63,"range":{"start_line":54,"start_character":0,"end_line":63,"end_character":40},"in_reply_to":"1f485f77_8202a1b3","updated":"2017-11-13 10:18:37.000000000","message":"sure.","commit_id":"a18766d2a4ff78207b71dbb536c6da78d9c8adc5"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"fe1d0ca93deccb30e2b37e291dd3ecd3d218138d","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        self._timer \u003d None"},{"line_number":52,"context_line":"        self._periodic_task \u003d None"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"        pidfile \u003d os.path.join(cfg.CONF.state_path,"},{"line_number":55,"context_line":"                               type(self).__name__.lower() + \u0027.pid\u0027)"},{"line_number":56,"context_line":"        self.pidfile \u003d Pidfile(pidfile, \u0027python\u0027)"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"        atexit.register(self._delete_pidfile)"},{"line_number":59,"context_line":"        self.pidfile.write(os.getpid())"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"    def _delete_pidfile(self):"},{"line_number":62,"context_line":"        if self.pidfile is not None:"},{"line_number":63,"context_line":"            os.remove(str(self.pidfile))"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    def start(self):"},{"line_number":66,"context_line":"        super(JournalPeriodicProcessor, self).start()"}],"source_content_type":"text/x-python","patch_set":18,"id":"1f485f77_8202a1b3","line":63,"range":{"start_line":54,"start_character":0,"end_line":63,"end_character":40},"in_reply_to":"3f4b6375_aeea9170","updated":"2017-11-13 09:27:26.000000000","message":"Whenever the need rises for another worker to have this, we can then refactor the code. It\u0027s actually not a good practice to overarchitect a solution and it\u0027s not like this is a massive piece of code.","commit_id":"a18766d2a4ff78207b71dbb536c6da78d9c8adc5"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"43ef5f9105b2d252eb11c2e41770a5f58d977fb5","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        self._timer \u003d None"},{"line_number":52,"context_line":"        self._maintenance_task \u003d None"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"        pidfile \u003d os.path.join(cfg.CONF.state_path,"},{"line_number":55,"context_line":"                               type(self).__name__.lower() + \u0027.pid\u0027)"},{"line_number":56,"context_line":"        self.pidfile \u003d daemon.Pidfile(pidfile, \u0027python\u0027)"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"        atexit.register(self._delete_pidfile)"},{"line_number":59,"context_line":"        self.pidfile.write(os.getpid())"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"    def _delete_pidfile(self):"},{"line_number":62,"context_line":"        if self.pidfile is not None:"}],"source_content_type":"text/x-python","patch_set":30,"id":"df87a7cf_86f8487b","line":59,"range":{"start_line":54,"start_character":0,"end_line":59,"end_character":39},"updated":"2017-12-07 08:36:38.000000000","message":"Shouldn\u0027t this live inside start() method?","commit_id":"7a16329ad92da65ea775062e72793c3807ece92a"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"a34503d8cd0293881a401283605fb62dde166a22","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        self._timer \u003d None"},{"line_number":52,"context_line":"        self._maintenance_task \u003d None"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"        pidfile \u003d os.path.join(cfg.CONF.state_path,"},{"line_number":55,"context_line":"                               type(self).__name__.lower() + \u0027.pid\u0027)"},{"line_number":56,"context_line":"        self.pidfile \u003d daemon.Pidfile(pidfile, \u0027python\u0027)"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"        atexit.register(self._delete_pidfile)"},{"line_number":59,"context_line":"        self.pidfile.write(os.getpid())"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"    def _delete_pidfile(self):"},{"line_number":62,"context_line":"        if self.pidfile is not None:"}],"source_content_type":"text/x-python","patch_set":30,"id":"df87a7cf_48f7a160","line":59,"range":{"start_line":54,"start_character":0,"end_line":59,"end_character":39},"in_reply_to":"df87a7cf_86f8487b","updated":"2017-12-09 21:07:49.000000000","message":"WOW, this is a GREAT catch. \n\nJust for posterity. The logic why it should be in the start method and not in the __init__ is because the __init__ is called when the class is instantiated, which happens in the main process of the driver. Whereas what we are looking for, with this change, is to be created from the process that handles the worker itself, which only can be assured in the start.\n\nI\u0027m not sure if the reasoning behind the question is the same to which I arrived, but anyways you couldn\u0027t be more correct.\n\nGreat catch!","commit_id":"7a16329ad92da65ea775062e72793c3807ece92a"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"cc71d35cbfa35b4ffcd9487baf141f16535805fc","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        self._timer \u003d None"},{"line_number":53,"context_line":"        self._maintenance_task \u003d None"},{"line_number":54,"context_line":"        self._running \u003d None"},{"line_number":55,"context_line":"        self.pidfile \u003d None"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    def _create_pidfile(self):"},{"line_number":58,"context_line":"        pidfile \u003d os.path.join(cfg.CONF.state_path,"}],"source_content_type":"text/x-python","patch_set":32,"id":"df87a7cf_3d67c1b9","line":55,"range":{"start_line":55,"start_character":13,"end_line":55,"end_character":20},"updated":"2017-12-11 09:32:50.000000000","message":"nit: _pidfile?","commit_id":"071a4bf2d7a6077af6bd6478240163b1712189e2"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"a6e471fe5447583a77d5063b0dc1f96e2b1a955e","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        self._timer \u003d None"},{"line_number":53,"context_line":"        self._maintenance_task \u003d None"},{"line_number":54,"context_line":"        self._running \u003d None"},{"line_number":55,"context_line":"        self.pidfile \u003d None"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    def _create_pidfile(self):"},{"line_number":58,"context_line":"        pidfile \u003d os.path.join(cfg.CONF.state_path,"}],"source_content_type":"text/x-python","patch_set":32,"id":"df87a7cf_66e4d60d","line":55,"range":{"start_line":55,"start_character":13,"end_line":55,"end_character":20},"in_reply_to":"df87a7cf_3d67c1b9","updated":"2017-12-11 12:03:34.000000000","message":"No, I want to be able to access it from the outside. It makes sense.","commit_id":"071a4bf2d7a6077af6bd6478240163b1712189e2"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"6f4cc6abb13d6840d78292f81d358e3ddb7c5577","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        self._timer \u003d None"},{"line_number":53,"context_line":"        self._maintenance_task \u003d None"},{"line_number":54,"context_line":"        self._running \u003d None"},{"line_number":55,"context_line":"        self.pidfile \u003d None"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    def _create_pidfile(self):"},{"line_number":58,"context_line":"        pidfile \u003d os.path.join(cfg.CONF.state_path,"}],"source_content_type":"text/x-python","patch_set":32,"id":"df87a7cf_f91cd2c2","line":55,"range":{"start_line":55,"start_character":13,"end_line":55,"end_character":20},"in_reply_to":"df87a7cf_569a8861","updated":"2017-12-13 07:53:32.000000000","message":"There are no accesses from other places. It\u0027s just that if you have a class that is a thread -by nature- for which you create a pidfile, that you can access that pidfile from other places in the code.","commit_id":"071a4bf2d7a6077af6bd6478240163b1712189e2"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"85a99235b9981faa9ea0f269d372321ff9e7a477","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        self._timer \u003d None"},{"line_number":53,"context_line":"        self._maintenance_task \u003d None"},{"line_number":54,"context_line":"        self._running \u003d None"},{"line_number":55,"context_line":"        self.pidfile \u003d None"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    def _create_pidfile(self):"},{"line_number":58,"context_line":"        pidfile \u003d os.path.join(cfg.CONF.state_path,"}],"source_content_type":"text/x-python","patch_set":32,"id":"df87a7cf_569a8861","line":55,"range":{"start_line":55,"start_character":13,"end_line":55,"end_character":20},"in_reply_to":"df87a7cf_66e4d60d","updated":"2017-12-12 08:49:54.000000000","message":"Where is this access?\n\nOnly thing I see is from unit tests, which also access \"private\" stuff so not sure what you\u0027re aiming at.","commit_id":"071a4bf2d7a6077af6bd6478240163b1712189e2"},{"author":{"_account_id":22380,"name":"Josh Hershberg","email":"jhershbe@redhat.com","username":"jhershbe"},"change_message_id":"d0a7bb3b5e1065da9df9da046a3283d183d5f5f1","unresolved":false,"context_lines":[{"line_number":60,"context_line":"        self.pidfile \u003d daemon.Pidfile(pidfile, \u0027python\u0027)"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"        # NOTE(mpeterson): We want self._running to be None before the first"},{"line_number":63,"context_line":"        # run so atexit is only registered once and not several times."},{"line_number":64,"context_line":"        # TODO(mpeterson): Once we drop support for PY2 we need to change"},{"line_number":65,"context_line":"        # the logic to use atexit.unregister at stop."},{"line_number":66,"context_line":"        if self._running is None:"}],"source_content_type":"text/x-python","patch_set":38,"id":"df87a7cf_0b6498b8","line":63,"updated":"2017-12-14 09:14:12.000000000","message":"I think you can get rid of this comment. Currently, start checks _running and throws an exception if \u003d\u003d True. It\u0027s still nice to program defensively but I don\u0027t think it requires a comment.","commit_id":"24a349071503a1dad73a5f710bec5c981ae59a77"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"b14cb9e8863bab6ef1c189ed35428cbcb973dc65","unresolved":false,"context_lines":[{"line_number":60,"context_line":"        self.pidfile \u003d daemon.Pidfile(pidfile, \u0027python\u0027)"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"        # NOTE(mpeterson): We want self._running to be None before the first"},{"line_number":63,"context_line":"        # run so atexit is only registered once and not several times."},{"line_number":64,"context_line":"        # TODO(mpeterson): Once we drop support for PY2 we need to change"},{"line_number":65,"context_line":"        # the logic to use atexit.unregister at stop."},{"line_number":66,"context_line":"        if self._running is None:"}],"source_content_type":"text/x-python","patch_set":38,"id":"df87a7cf_97cddc31","line":63,"in_reply_to":"df87a7cf_0b6498b8","updated":"2017-12-18 08:34:49.000000000","message":"It\u0027s to make it explicit so _running won\u0027t be changed to False in the __init__, as we rely in not being None to register the atexit","commit_id":"24a349071503a1dad73a5f710bec5c981ae59a77"}],"networking_odl/tests/functional/base.py":[{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"43ef5f9105b2d252eb11c2e41770a5f58d977fb5","unresolved":false,"context_lines":[{"line_number":105,"context_line":""},{"line_number":106,"context_line":"class V2DriverAdjustment(test_base_db.ODLBaseDbTestCase):"},{"line_number":107,"context_line":"    def setUp(self):"},{"line_number":108,"context_line":"        self.deletepid_mock \u003d mock.patch.object("},{"line_number":109,"context_line":"            worker.JournalPeriodicProcessor,"},{"line_number":110,"context_line":"            \u0027_delete_pidfile\u0027)"},{"line_number":111,"context_line":"        self.deletepid_mock.start()"},{"line_number":112,"context_line":"        super(V2DriverAdjustment, self).setUp()"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    def get_odl_resource(self, resource_type, resource):"}],"source_content_type":"text/x-python","patch_set":30,"id":"df87a7cf_5749abcd","line":111,"range":{"start_line":108,"start_character":7,"end_line":111,"end_character":35},"updated":"2017-12-07 08:36:38.000000000","message":"Why is this necessary?","commit_id":"7a16329ad92da65ea775062e72793c3807ece92a"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"a34503d8cd0293881a401283605fb62dde166a22","unresolved":false,"context_lines":[{"line_number":105,"context_line":""},{"line_number":106,"context_line":"class V2DriverAdjustment(test_base_db.ODLBaseDbTestCase):"},{"line_number":107,"context_line":"    def setUp(self):"},{"line_number":108,"context_line":"        self.deletepid_mock \u003d mock.patch.object("},{"line_number":109,"context_line":"            worker.JournalPeriodicProcessor,"},{"line_number":110,"context_line":"            \u0027_delete_pidfile\u0027)"},{"line_number":111,"context_line":"        self.deletepid_mock.start()"},{"line_number":112,"context_line":"        super(V2DriverAdjustment, self).setUp()"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    def get_odl_resource(self, resource_type, resource):"}],"source_content_type":"text/x-python","patch_set":30,"id":"df87a7cf_59aa1571","line":111,"range":{"start_line":108,"start_character":7,"end_line":111,"end_character":35},"in_reply_to":"df87a7cf_5749abcd","updated":"2017-12-09 21:07:49.000000000","message":"No longer relevant, since the code was changed. Now we mock atexit instead.","commit_id":"7a16329ad92da65ea775062e72793c3807ece92a"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"cc71d35cbfa35b4ffcd9487baf141f16535805fc","unresolved":false,"context_lines":[{"line_number":105,"context_line":""},{"line_number":106,"context_line":"class V2DriverAdjustment(test_base_db.ODLBaseDbTestCase):"},{"line_number":107,"context_line":"    def setUp(self):"},{"line_number":108,"context_line":"        self.deletepid_mock \u003d mock.patch.object("},{"line_number":109,"context_line":"            worker.JournalPeriodicProcessor,"},{"line_number":110,"context_line":"            \u0027_delete_pidfile\u0027)"},{"line_number":111,"context_line":"        self.deletepid_mock.start()"},{"line_number":112,"context_line":"        super(V2DriverAdjustment, self).setUp()"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    def get_odl_resource(self, resource_type, resource):"}],"source_content_type":"text/x-python","patch_set":30,"id":"df87a7cf_7d1f8907","line":111,"range":{"start_line":108,"start_character":7,"end_line":111,"end_character":35},"in_reply_to":"df87a7cf_59aa1571","updated":"2017-12-11 09:32:50.000000000","message":"OK I\u0027m not sure I follow, you don\u0027t want functional tests to delete the PID file?\nOr was it not created to begin with?","commit_id":"7a16329ad92da65ea775062e72793c3807ece92a"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"a6e471fe5447583a77d5063b0dc1f96e2b1a955e","unresolved":false,"context_lines":[{"line_number":105,"context_line":""},{"line_number":106,"context_line":"class V2DriverAdjustment(test_base_db.ODLBaseDbTestCase):"},{"line_number":107,"context_line":"    def setUp(self):"},{"line_number":108,"context_line":"        self.deletepid_mock \u003d mock.patch.object("},{"line_number":109,"context_line":"            worker.JournalPeriodicProcessor,"},{"line_number":110,"context_line":"            \u0027_delete_pidfile\u0027)"},{"line_number":111,"context_line":"        self.deletepid_mock.start()"},{"line_number":112,"context_line":"        super(V2DriverAdjustment, self).setUp()"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    def get_odl_resource(self, resource_type, resource):"}],"source_content_type":"text/x-python","patch_set":30,"id":"df87a7cf_069dca64","line":111,"range":{"start_line":108,"start_character":7,"end_line":111,"end_character":35},"in_reply_to":"df87a7cf_7d1f8907","updated":"2017-12-11 12:03:34.000000000","message":"It doesn\u0027t matter if it\u0027s created or not, as each test gets a temporary space that gets deleted after.\n\nThe problem that this tried to incorrectly solve was that atexit was called on each creation of the pidfile but atexit executes on exit of the interpreters. Therefore, at the moment this delete was to be executed the pid file already didn\u0027t exist and failed.","commit_id":"7a16329ad92da65ea775062e72793c3807ece92a"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"85a99235b9981faa9ea0f269d372321ff9e7a477","unresolved":false,"context_lines":[{"line_number":104,"context_line":"class V2DriverAdjustment(test_base_db.ODLBaseDbTestCase):"},{"line_number":105,"context_line":"    def setUp(self):"},{"line_number":106,"context_line":"        super(V2DriverAdjustment, self).setUp()"},{"line_number":107,"context_line":"        self.atexit_mock \u003d mock.patch("},{"line_number":108,"context_line":"            \u0027networking_odl.journal.worker.atexit.register\u0027"},{"line_number":109,"context_line":"        )"},{"line_number":110,"context_line":"        self.atexit_mock.start()"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"    def get_odl_resource(self, resource_type, resource):"},{"line_number":113,"context_line":"        def no_journal_rows():"}],"source_content_type":"text/x-python","patch_set":34,"id":"df87a7cf_36b024dd","line":110,"range":{"start_line":107,"start_character":8,"end_line":110,"end_character":32},"updated":"2017-12-12 08:49:54.000000000","message":"Please document why this is done as it\u0027s not clear","commit_id":"abf102dd7a21d4dad933d15736440ab400f6e73c"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"6f4cc6abb13d6840d78292f81d358e3ddb7c5577","unresolved":false,"context_lines":[{"line_number":104,"context_line":"class V2DriverAdjustment(test_base_db.ODLBaseDbTestCase):"},{"line_number":105,"context_line":"    def setUp(self):"},{"line_number":106,"context_line":"        super(V2DriverAdjustment, self).setUp()"},{"line_number":107,"context_line":"        self.atexit_mock \u003d mock.patch("},{"line_number":108,"context_line":"            \u0027networking_odl.journal.worker.atexit.register\u0027"},{"line_number":109,"context_line":"        )"},{"line_number":110,"context_line":"        self.atexit_mock.start()"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"    def get_odl_resource(self, resource_type, resource):"},{"line_number":113,"context_line":"        def no_journal_rows():"}],"source_content_type":"text/x-python","patch_set":34,"id":"df87a7cf_39ff9a35","line":110,"range":{"start_line":107,"start_character":8,"end_line":110,"end_character":32},"in_reply_to":"df87a7cf_36b024dd","updated":"2017-12-13 07:53:32.000000000","message":"Done","commit_id":"abf102dd7a21d4dad933d15736440ab400f6e73c"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"6f4cc6abb13d6840d78292f81d358e3ddb7c5577","unresolved":false,"context_lines":[{"line_number":104,"context_line":"class V2DriverAdjustment(test_base_db.ODLBaseDbTestCase):"},{"line_number":105,"context_line":"    def setUp(self):"},{"line_number":106,"context_line":"        super(V2DriverAdjustment, self).setUp()"},{"line_number":107,"context_line":"        self.atexit_mock \u003d mock.patch("},{"line_number":108,"context_line":"            \u0027networking_odl.journal.worker.atexit.register\u0027"},{"line_number":109,"context_line":"        )"},{"line_number":110,"context_line":"        self.atexit_mock.start()"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"    def get_odl_resource(self, resource_type, resource):"},{"line_number":113,"context_line":"        def no_journal_rows():"}],"source_content_type":"text/x-python","patch_set":34,"id":"df87a7cf_7444491c","line":110,"range":{"start_line":107,"start_character":8,"end_line":110,"end_character":32},"in_reply_to":"df87a7cf_36b024dd","updated":"2017-12-13 07:53:32.000000000","message":"Done","commit_id":"abf102dd7a21d4dad933d15736440ab400f6e73c"}],"networking_odl/tests/unit/journal/test_journal.py":[{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"43ef5f9105b2d252eb11c2e41770a5f58d977fb5","unresolved":false,"context_lines":[{"line_number":20,"context_line":"import fixtures"},{"line_number":21,"context_line":"import mock"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"from neutron.agent.linux.daemon import Pidfile"},{"line_number":24,"context_line":"from neutron.common import utils"},{"line_number":25,"context_line":"from oslo_db import exception"},{"line_number":26,"context_line":"from oslo_log import log as logging"}],"source_content_type":"text/x-python","patch_set":30,"id":"df87a7cf_edb6ecfa","line":23,"range":{"start_line":23,"start_character":0,"end_line":23,"end_character":46},"updated":"2017-12-07 08:36:38.000000000","message":"As rajiv said elsewhere \"please import module not class\"","commit_id":"7a16329ad92da65ea775062e72793c3807ece92a"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"a34503d8cd0293881a401283605fb62dde166a22","unresolved":false,"context_lines":[{"line_number":20,"context_line":"import fixtures"},{"line_number":21,"context_line":"import mock"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"from neutron.agent.linux.daemon import Pidfile"},{"line_number":24,"context_line":"from neutron.common import utils"},{"line_number":25,"context_line":"from oslo_db import exception"},{"line_number":26,"context_line":"from oslo_log import log as logging"}],"source_content_type":"text/x-python","patch_set":30,"id":"df87a7cf_99cdfd67","line":23,"range":{"start_line":23,"start_character":0,"end_line":23,"end_character":46},"in_reply_to":"df87a7cf_edb6ecfa","updated":"2017-12-09 21:07:49.000000000","message":"Done","commit_id":"7a16329ad92da65ea775062e72793c3807ece92a"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"43ef5f9105b2d252eb11c2e41770a5f58d977fb5","unresolved":false,"context_lines":[{"line_number":235,"context_line":"    def test_creates_pidfile(self):"},{"line_number":236,"context_line":"        periodic_processor \u003d worker.JournalPeriodicProcessor()"},{"line_number":237,"context_line":""},{"line_number":238,"context_line":"        self.assertIsInstance(periodic_processor.pidfile, Pidfile)"},{"line_number":239,"context_line":"        pidfile \u003d str(periodic_processor.pidfile)"},{"line_number":240,"context_line":"        self.assertTrue(os.path.isfile(pidfile))"},{"line_number":241,"context_line":""}],"source_content_type":"text/x-python","patch_set":30,"id":"df87a7cf_4d503833","line":238,"range":{"start_line":238,"start_character":8,"end_line":238,"end_character":66},"updated":"2017-12-07 08:36:38.000000000","message":"What\u0027s this for?","commit_id":"7a16329ad92da65ea775062e72793c3807ece92a"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"a34503d8cd0293881a401283605fb62dde166a22","unresolved":false,"context_lines":[{"line_number":235,"context_line":"    def test_creates_pidfile(self):"},{"line_number":236,"context_line":"        periodic_processor \u003d worker.JournalPeriodicProcessor()"},{"line_number":237,"context_line":""},{"line_number":238,"context_line":"        self.assertIsInstance(periodic_processor.pidfile, Pidfile)"},{"line_number":239,"context_line":"        pidfile \u003d str(periodic_processor.pidfile)"},{"line_number":240,"context_line":"        self.assertTrue(os.path.isfile(pidfile))"},{"line_number":241,"context_line":""}],"source_content_type":"text/x-python","patch_set":30,"id":"df87a7cf_d9e705ac","line":238,"range":{"start_line":238,"start_character":8,"end_line":238,"end_character":66},"in_reply_to":"df87a7cf_4d503833","updated":"2017-12-09 21:07:49.000000000","message":"Just a failsafe that it\u0027s not another implementation and therefore we can rely on the tests of this particular implementation. Although now that I\u0027m reading the tests again perhaps it\u0027s not needed since the main functionality that we expect is tested anyways.","commit_id":"7a16329ad92da65ea775062e72793c3807ece92a"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"43ef5f9105b2d252eb11c2e41770a5f58d977fb5","unresolved":false,"context_lines":[{"line_number":246,"context_line":""},{"line_number":247,"context_line":"        # NOTE(mpeterson): to avoid showing an expected exception while"},{"line_number":248,"context_line":"        # running the next assert"},{"line_number":249,"context_line":"        mock_log \u003d mock.patch(\u0027neutron.agent.linux.daemon.LOG\u0027,"},{"line_number":250,"context_line":"                              autospec\u003dTrue)"},{"line_number":251,"context_line":"        try:"},{"line_number":252,"context_line":"            mock_log.start()"},{"line_number":253,"context_line":"            self.assertRaises(SystemExit, worker.JournalPeriodicProcessor)"}],"source_content_type":"text/x-python","patch_set":30,"id":"df87a7cf_66cd0465","line":250,"range":{"start_line":249,"start_character":8,"end_line":250,"end_character":44},"updated":"2017-12-07 08:36:38.000000000","message":"Can be replaced by\n\nwith mock.patch(\u0027neutron.agent.linux.daemon.LOG\u0027, autospec\u003dTrue):","commit_id":"7a16329ad92da65ea775062e72793c3807ece92a"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"a34503d8cd0293881a401283605fb62dde166a22","unresolved":false,"context_lines":[{"line_number":246,"context_line":""},{"line_number":247,"context_line":"        # NOTE(mpeterson): to avoid showing an expected exception while"},{"line_number":248,"context_line":"        # running the next assert"},{"line_number":249,"context_line":"        mock_log \u003d mock.patch(\u0027neutron.agent.linux.daemon.LOG\u0027,"},{"line_number":250,"context_line":"                              autospec\u003dTrue)"},{"line_number":251,"context_line":"        try:"},{"line_number":252,"context_line":"            mock_log.start()"},{"line_number":253,"context_line":"            self.assertRaises(SystemExit, worker.JournalPeriodicProcessor)"}],"source_content_type":"text/x-python","patch_set":30,"id":"df87a7cf_79eef9b4","line":250,"range":{"start_line":249,"start_character":8,"end_line":250,"end_character":44},"in_reply_to":"df87a7cf_66cd0465","updated":"2017-12-09 21:07:49.000000000","message":"Done","commit_id":"7a16329ad92da65ea775062e72793c3807ece92a"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"cc71d35cbfa35b4ffcd9487baf141f16535805fc","unresolved":false,"context_lines":[{"line_number":247,"context_line":"        mock_create.assert_called_once()"},{"line_number":248,"context_line":"        mock_delete.assert_called_once()"},{"line_number":249,"context_line":""},{"line_number":250,"context_line":"    def test_deletes_pidfile(self):"},{"line_number":251,"context_line":"        atexit_mock \u003d mock.patch(\u0027atexit.register\u0027).start()"},{"line_number":252,"context_line":""},{"line_number":253,"context_line":"        periodic_processor \u003d worker.JournalPeriodicProcessor()"}],"source_content_type":"text/x-python","patch_set":32,"id":"df87a7cf_fd0b998a","line":250,"range":{"start_line":250,"start_character":4,"end_line":250,"end_character":35},"updated":"2017-12-11 09:32:50.000000000","message":"This test is missing stop for the periodic processor","commit_id":"071a4bf2d7a6077af6bd6478240163b1712189e2"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"a6e471fe5447583a77d5063b0dc1f96e2b1a955e","unresolved":false,"context_lines":[{"line_number":247,"context_line":"        mock_create.assert_called_once()"},{"line_number":248,"context_line":"        mock_delete.assert_called_once()"},{"line_number":249,"context_line":""},{"line_number":250,"context_line":"    def test_deletes_pidfile(self):"},{"line_number":251,"context_line":"        atexit_mock \u003d mock.patch(\u0027atexit.register\u0027).start()"},{"line_number":252,"context_line":""},{"line_number":253,"context_line":"        periodic_processor \u003d worker.JournalPeriodicProcessor()"}],"source_content_type":"text/x-python","patch_set":32,"id":"df87a7cf_2671ee44","line":250,"range":{"start_line":250,"start_character":4,"end_line":250,"end_character":35},"in_reply_to":"df87a7cf_fd0b998a","updated":"2017-12-11 12:03:34.000000000","message":"Done","commit_id":"071a4bf2d7a6077af6bd6478240163b1712189e2"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"cc71d35cbfa35b4ffcd9487baf141f16535805fc","unresolved":false,"context_lines":[{"line_number":263,"context_line":"        atexit_mock.assert_called_once_with(periodic_processor._delete_pidfile)"},{"line_number":264,"context_line":""},{"line_number":265,"context_line":"    def test_atexit_delete_pidfile_registered_only_once(self):"},{"line_number":266,"context_line":"        atexit_mock \u003d mock.patch(\u0027atexit.register\u0027).start()"},{"line_number":267,"context_line":""},{"line_number":268,"context_line":"        periodic_processor \u003d worker.JournalPeriodicProcessor()"},{"line_number":269,"context_line":""}],"source_content_type":"text/x-python","patch_set":32,"id":"df87a7cf_3d710145","line":266,"range":{"start_line":266,"start_character":8,"end_line":266,"end_character":59},"updated":"2017-12-11 09:32:50.000000000","message":"nit: could be a decorator","commit_id":"071a4bf2d7a6077af6bd6478240163b1712189e2"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"a6e471fe5447583a77d5063b0dc1f96e2b1a955e","unresolved":false,"context_lines":[{"line_number":263,"context_line":"        atexit_mock.assert_called_once_with(periodic_processor._delete_pidfile)"},{"line_number":264,"context_line":""},{"line_number":265,"context_line":"    def test_atexit_delete_pidfile_registered_only_once(self):"},{"line_number":266,"context_line":"        atexit_mock \u003d mock.patch(\u0027atexit.register\u0027).start()"},{"line_number":267,"context_line":""},{"line_number":268,"context_line":"        periodic_processor \u003d worker.JournalPeriodicProcessor()"},{"line_number":269,"context_line":""}],"source_content_type":"text/x-python","patch_set":32,"id":"df87a7cf_86979a3a","line":266,"range":{"start_line":266,"start_character":8,"end_line":266,"end_character":59},"in_reply_to":"df87a7cf_3d710145","updated":"2017-12-11 12:03:34.000000000","message":"Done","commit_id":"071a4bf2d7a6077af6bd6478240163b1712189e2"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"85a99235b9981faa9ea0f269d372321ff9e7a477","unresolved":false,"context_lines":[{"line_number":252,"context_line":"        mock_delete.assert_called_once()"},{"line_number":253,"context_line":""},{"line_number":254,"context_line":"    def test_deletes_pidfile(self):"},{"line_number":255,"context_line":"        atexit_mock \u003d mock.patch(\u0027atexit.register\u0027).start()"},{"line_number":256,"context_line":""},{"line_number":257,"context_line":"        periodic_processor \u003d worker.JournalPeriodicProcessor()"},{"line_number":258,"context_line":"        self.addCleanup(periodic_processor.stop)"}],"source_content_type":"text/x-python","patch_set":34,"id":"df87a7cf_76df8c0c","line":255,"range":{"start_line":255,"start_character":8,"end_line":255,"end_character":59},"updated":"2017-12-12 08:49:54.000000000","message":"nit: could be a decorator","commit_id":"abf102dd7a21d4dad933d15736440ab400f6e73c"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"6f4cc6abb13d6840d78292f81d358e3ddb7c5577","unresolved":false,"context_lines":[{"line_number":252,"context_line":"        mock_delete.assert_called_once()"},{"line_number":253,"context_line":""},{"line_number":254,"context_line":"    def test_deletes_pidfile(self):"},{"line_number":255,"context_line":"        atexit_mock \u003d mock.patch(\u0027atexit.register\u0027).start()"},{"line_number":256,"context_line":""},{"line_number":257,"context_line":"        periodic_processor \u003d worker.JournalPeriodicProcessor()"},{"line_number":258,"context_line":"        self.addCleanup(periodic_processor.stop)"}],"source_content_type":"text/x-python","patch_set":34,"id":"df87a7cf_14493d31","line":255,"range":{"start_line":255,"start_character":8,"end_line":255,"end_character":59},"in_reply_to":"df87a7cf_76df8c0c","updated":"2017-12-13 07:53:32.000000000","message":"Done","commit_id":"abf102dd7a21d4dad933d15736440ab400f6e73c"}]}
