)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":25695,"name":"Deepak Mourya","email":"deepakmoriya7@gmail.com","username":"deepak_mourya"},"change_message_id":"89a069c5373beee4df076b8c3fcaf5f02a2f70a1","unresolved":false,"context_lines":[{"line_number":14,"context_line":"* CONTAINER_COMMITTING"},{"line_number":15,"context_line":"* CONTAINER_ADDING_SG"},{"line_number":16,"context_line":"* CONTAINER_REMOVING_SG"},{"line_number":17,"context_line":"* CONTAINER_NETWORK_ATTACHING"},{"line_number":18,"context_line":"* CONTAINER_NETWORK_DETACHING"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Change-Id: Ida0de94ea0db7314e6892cd55e479fca7bbedeaf"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"3fa0c359_d9f01094","line":17,"updated":"2018-02-26 08:33:04.000000000","message":"It should be NETWORK_ATTACHING","commit_id":"458d25c6fcd67b84ec3abea9ae567966320526a2"}],"zun/common/consts.py":[{"author":{"_account_id":11536,"name":"hongbin","email":"hongbin034@gmail.com","username":"hongbin"},"change_message_id":"b54895497e37aa157306946db39bb8b18c6ffd2e","unresolved":false,"context_lines":[{"line_number":32,"context_line":"    \u0027container_stopping\u0027, \u0027container_rebooting\u0027, \u0027container_pausing\u0027,"},{"line_number":33,"context_line":"    \u0027container_unpausing\u0027, \u0027container_killing\u0027, \u0027container_committing\u0027,"},{"line_number":34,"context_line":"    \u0027container_adding_sg\u0027, \u0027container_removing_sg\u0027,"},{"line_number":35,"context_line":"    \u0027network_attach\u0027, \u0027network_detach\u0027"},{"line_number":36,"context_line":"    )"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"RESOURCE_CLASSES \u003d ("}],"source_content_type":"text/x-python","patch_set":5,"id":"3fa0c359_95a9dd7c","line":35,"range":{"start_line":35,"start_character":4,"end_line":35,"end_character":38},"updated":"2018-02-26 23:18:10.000000000","message":"nit: better to change it to network_attaching and network_detaching.","commit_id":"1e9c69aaf2db7b51cedcb861bc2f2a5edabb1a05"}],"zun/compute/manager.py":[{"author":{"_account_id":11536,"name":"hongbin","email":"hongbin034@gmail.com","username":"hongbin"},"change_message_id":"fecfaac04b5c199edfda3f9165960259632b3a37","unresolved":false,"context_lines":[{"line_number":76,"context_line":"                                               container,"},{"line_number":77,"context_line":"                                               db_container)"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    def _init_container(self, context, container):  # noqa: C901"},{"line_number":80,"context_line":"        \"\"\"Initialize this container during zun-compute init.\"\"\""},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"        if (container.status \u003d\u003d consts.CREATING or"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa0c359_650d3134","line":79,"range":{"start_line":79,"start_character":53,"end_line":79,"end_character":64},"updated":"2018-02-17 19:57:25.000000000","message":"Nit: I think it is better to raise the max complexity instead (see: https://github.com/openstack/zun/blob/master/tools/flake8wrap.sh).","commit_id":"085f1416ada3b9d4cf5d82c40bc1d2d8b2f43adf"},{"author":{"_account_id":11536,"name":"hongbin","email":"hongbin034@gmail.com","username":"hongbin"},"change_message_id":"fecfaac04b5c199edfda3f9165960259632b3a37","unresolved":false,"context_lines":[{"line_number":138,"context_line":"                                  container.uuid)"},{"line_number":139,"context_line":"            return"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"        if container.task_state \u003d\u003d consts.CONTAINER_PAUSING:"},{"line_number":142,"context_line":"            if container.status \u003d\u003d consts.PAUSED:"},{"line_number":143,"context_line":"                LOG.info(\"Container %s is already paused\""},{"line_number":144,"context_line":"                         \" when pause is called.\","}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa0c359_a50b3922","line":141,"updated":"2018-02-17 19:57:25.000000000","message":"The recovery of container (line #141 - #236) is a bit involved. I think it might be easier to do it in separated patches. Then, this patch can focus on defining the new task states and setting the task states on their corresponding operations (e.g. setting the task state to CONTAINER_PAUSING when users pause the container).\n\nHowever, if you choose to implement the recovery in this patch, I can continue to review these codes. It is your call.","commit_id":"085f1416ada3b9d4cf5d82c40bc1d2d8b2f43adf"},{"author":{"_account_id":11536,"name":"hongbin","email":"hongbin034@gmail.com","username":"hongbin"},"change_message_id":"fecfaac04b5c199edfda3f9165960259632b3a37","unresolved":false,"context_lines":[{"line_number":647,"context_line":"    @wrap_exception()"},{"line_number":648,"context_line":"    @wrap_container_event(prefix\u003d\u0027compute\u0027)"},{"line_number":649,"context_line":"    def _do_container_pause(self, context, container):"},{"line_number":650,"context_line":"        LOG.debug(\u0027Pausing container: %s\u0027, container.uuid)"},{"line_number":651,"context_line":"        container \u003d self.driver.pause(context, container)"},{"line_number":652,"context_line":"        container.save(context)"},{"line_number":653,"context_line":"        return container"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa0c359_a559f935","line":650,"updated":"2018-02-17 19:57:25.000000000","message":"I saw this patch is [WIP] so I guess you might be already aware of this but I just mentioned it for sanity:\n\nConsider updating the task_state to CONTAINER_PAUSING before calling self.driver.pause and updating the task_state to CONTAINER_PAUSE after. This applies to all the rest of the new task states.","commit_id":"085f1416ada3b9d4cf5d82c40bc1d2d8b2f43adf"},{"author":{"_account_id":11536,"name":"hongbin","email":"hongbin034@gmail.com","username":"hongbin"},"change_message_id":"b54895497e37aa157306946db39bb8b18c6ffd2e","unresolved":false,"context_lines":[{"line_number":118,"context_line":"            self.container_start(context, container)"},{"line_number":119,"context_line":"            return"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"        if container.task_state \u003d\u003d consts.CONTAINER_PAUSING:"},{"line_number":122,"context_line":"            if container.status \u003d\u003d consts.PAUSED:"},{"line_number":123,"context_line":"                LOG.info(\"Container %s is already paused\""},{"line_number":124,"context_line":"                         \" when pause is called.\","},{"line_number":125,"context_line":"                         container.uuid)"},{"line_number":126,"context_line":"                self._update_task_state(context, container, None)"},{"line_number":127,"context_line":"            else:"},{"line_number":128,"context_line":"                try:"},{"line_number":129,"context_line":"                    self.container_pause(context, container)"},{"line_number":130,"context_line":"                except Exception:"},{"line_number":131,"context_line":"                    # Don\u0027t block the init_container"},{"line_number":132,"context_line":"                    LOG.exception(\"Failed to pause container %s\","},{"line_number":133,"context_line":"                                  container.uuid)"},{"line_number":134,"context_line":"            return"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"        if container.task_state \u003d\u003d consts.CONTAINER_UNPAUSING:"}],"source_content_type":"text/x-python","patch_set":5,"id":"3fa0c359_d5952541","line":133,"range":{"start_line":121,"start_character":0,"end_line":133,"end_character":49},"updated":"2018-02-26 23:18:10.000000000","message":"We could follow the pattern in line #107 - line #119 as below (UNTESTED):\n\n        if container.task_state \u003d\u003d consts.CONTAINER_PAUSING:\n            self.container_pause(context, container)\n            return\n\nThe same applies to all the rest below.","commit_id":"1e9c69aaf2db7b51cedcb861bc2f2a5edabb1a05"},{"author":{"_account_id":11536,"name":"hongbin","email":"hongbin034@gmail.com","username":"hongbin"},"change_message_id":"b54895497e37aa157306946db39bb8b18c6ffd2e","unresolved":false,"context_lines":[{"line_number":162,"context_line":"                    LOG.exception(\"Failed to kill container %s\","},{"line_number":163,"context_line":"                                  container.uuid)"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"        if container.task_state \u003d\u003d consts.CONTAINER_COMMITTING:"},{"line_number":166,"context_line":"            try:"},{"line_number":167,"context_line":"                self.container_commit(context, container)"},{"line_number":168,"context_line":"            except Exception:"}],"source_content_type":"text/x-python","patch_set":5,"id":"3fa0c359_3584890a","line":165,"range":{"start_line":165,"start_character":42,"end_line":165,"end_character":62},"updated":"2018-02-26 23:18:10.000000000","message":"Recovery from container-commit is a bit involved. IMHO, we don\u0027t have to do it right now.","commit_id":"1e9c69aaf2db7b51cedcb861bc2f2a5edabb1a05"}]}
