)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":10206,"name":"Madhuri Kumari","email":"madhuri.kumari@intel.com","username":"Madhuri"},"change_message_id":"33e4bedbb0e7c502708bd43af5f3c60d0f735da2","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     JiWei \u003cji.wei3@zte.com.cn\u003e"},{"line_number":5,"context_line":"CommitDate: 2018-01-23 16:33:38 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"restart the containers which are running before the host reboots"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Some containers are running in a host. If the host reboots, all the running containers will be stopped."},{"line_number":10,"context_line":"It\u0027s better to restart them when zun-compute works."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"5f93b717_c099ca1f","line":7,"updated":"2018-01-25 07:04:24.000000000","message":"Please limit this to 50 chars.","commit_id":"da2c957f16da7fd2a7dbf7c4cec91daae2559c7f"},{"author":{"_account_id":10206,"name":"Madhuri Kumari","email":"madhuri.kumari@intel.com","username":"Madhuri"},"change_message_id":"33e4bedbb0e7c502708bd43af5f3c60d0f735da2","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"restart the containers which are running before the host reboots"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Some containers are running in a host. If the host reboots, all the running containers will be stopped."},{"line_number":10,"context_line":"It\u0027s better to restart them when zun-compute works."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: I7442110fc453e0fa8760038ce213689e630347d2"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"5f93b717_007d72b0","line":9,"updated":"2018-01-25 07:04:24.000000000","message":"And this to 75 chars","commit_id":"da2c957f16da7fd2a7dbf7c4cec91daae2559c7f"},{"author":{"_account_id":10206,"name":"Madhuri Kumari","email":"madhuri.kumari@intel.com","username":"Madhuri"},"change_message_id":"33e4bedbb0e7c502708bd43af5f3c60d0f735da2","unresolved":false,"context_lines":[{"line_number":10,"context_line":"It\u0027s better to restart them when zun-compute works."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: I7442110fc453e0fa8760038ce213689e630347d2"},{"line_number":13,"context_line":"Implements:restart-container-when-host-reboot"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"5f93b717_a0303e09","line":13,"range":{"start_line":13,"start_character":11,"end_line":13,"end_character":45},"updated":"2018-01-25 07:04:24.000000000","message":"s/restart-container-when-host-reboot/blueprint restart-container-when-host-reboot/","commit_id":"da2c957f16da7fd2a7dbf7c4cec91daae2559c7f"}],"zun/compute/manager.py":[{"author":{"_account_id":10206,"name":"Madhuri Kumari","email":"madhuri.kumari@intel.com","username":"Madhuri"},"change_message_id":"33e4bedbb0e7c502708bd43af5f3c60d0f735da2","unresolved":false,"context_lines":[{"line_number":49,"context_line":"        else:"},{"line_number":50,"context_line":"            self.use_sandbox \u003d False"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    def restore_running_container(self, context, container, db_container):"},{"line_number":53,"context_line":"        if (container.status \u003d\u003d consts.RUNNING and"},{"line_number":54,"context_line":"                db_container.status \u003d\u003d consts.STOPPED):"},{"line_number":55,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f93b717_d4e8af17","line":52,"range":{"start_line":52,"start_character":49,"end_line":52,"end_character":72},"updated":"2018-01-25 07:04:24.000000000","message":"What\u0027s the difference between both the objects?","commit_id":"da2c957f16da7fd2a7dbf7c4cec91daae2559c7f"},{"author":{"_account_id":11536,"name":"hongbin","email":"hongbin034@gmail.com","username":"hongbin"},"change_message_id":"4f54bd40c1c08723a36076cb1a3be1fd38bea4a6","unresolved":false,"context_lines":[{"line_number":53,"context_line":"        if (container.status \u003d\u003d consts.RUNNING and"},{"line_number":54,"context_line":"                db_container.status \u003d\u003d consts.STOPPED):"},{"line_number":55,"context_line":"            try:"},{"line_number":56,"context_line":"                self.container_reboot(context, container)"},{"line_number":57,"context_line":"            except Exception:"},{"line_number":58,"context_line":"                LOG.exception(\"Failed to complete a restart for container %s\","},{"line_number":59,"context_line":"                              container.uuid)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f96bb07_64f3d79f","line":56,"range":{"start_line":56,"start_character":21,"end_line":56,"end_character":37},"updated":"2018-01-23 18:00:29.000000000","message":"This misses the \u0027timeout\u0027 parameter. See line #524","commit_id":"da2c957f16da7fd2a7dbf7c4cec91daae2559c7f"},{"author":{"_account_id":11536,"name":"hongbin","email":"hongbin034@gmail.com","username":"hongbin"},"change_message_id":"4f54bd40c1c08723a36076cb1a3be1fd38bea4a6","unresolved":false,"context_lines":[{"line_number":61,"context_line":"    def init_containers(self, context):"},{"line_number":62,"context_line":"        containers \u003d objects.Container.list_by_host(context, self.host)"},{"line_number":63,"context_line":"        db_containers \u003d self.driver.list(context)"},{"line_number":64,"context_line":"        db_container_map \u003d {container.container_id: container"},{"line_number":65,"context_line":"                            for container in db_containers}"},{"line_number":66,"context_line":"        for container in containers:"},{"line_number":67,"context_line":"            self._init_container(context, container)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f96bb07_84df03d5","line":64,"range":{"start_line":64,"start_character":38,"end_line":64,"end_character":50},"updated":"2018-01-23 18:00:29.000000000","message":"There is an issue we found recently and haven\u0027t fixed yet. If the container.container_id is None, this mapping could be incorrect. See here: https://review.openstack.org/#/c/536524/2/zun/container/docker/driver.py . So, we need to ensure the key in this mapping is not None.","commit_id":"da2c957f16da7fd2a7dbf7c4cec91daae2559c7f"},{"author":{"_account_id":11536,"name":"hongbin","email":"hongbin034@gmail.com","username":"hongbin"},"change_message_id":"4f54bd40c1c08723a36076cb1a3be1fd38bea4a6","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        for container in containers:"},{"line_number":67,"context_line":"            self._init_container(context, container)"},{"line_number":68,"context_line":"            if CONF.compute.resume_container_state and db_container_map:"},{"line_number":69,"context_line":"                db_container \u003d db_container_map[container.container_id]"},{"line_number":70,"context_line":"                self.restore_running_container(context,"},{"line_number":71,"context_line":"                                               container,"},{"line_number":72,"context_line":"                                               db_container)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f96bb07_6480b78c","line":69,"range":{"start_line":69,"start_character":31,"end_line":69,"end_character":71},"updated":"2018-01-23 18:00:29.000000000","message":"I am not sure if the key container.container_id is present in db_container_map. If not, it is better to add a check before doing this.","commit_id":"da2c957f16da7fd2a7dbf7c4cec91daae2559c7f"},{"author":{"_account_id":11536,"name":"hongbin","email":"hongbin034@gmail.com","username":"hongbin"},"change_message_id":"237cad592a77bbc8e4cf6e9bf267ee4ba680c9d7","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        for container in containers:"},{"line_number":68,"context_line":"            self._init_container(context, container)"},{"line_number":69,"context_line":"            if CONF.compute.resume_container_state and \\"},{"line_number":70,"context_line":"                   container.container_id is not None:"},{"line_number":71,"context_line":"                db_container \u003d db_container_map[container.container_id]"},{"line_number":72,"context_line":"                self.restore_running_container(context,"},{"line_number":73,"context_line":"                                               container,"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f93b717_90d178fe","line":70,"range":{"start_line":70,"start_character":19,"end_line":70,"end_character":53},"updated":"2018-01-29 15:38:47.000000000","message":"IMHO, a slightly better check is:\n\n    if CONF.compute.resume_container_state and \\\n            container.container_id in db_container_map:\n        ...\n\nHowever, this is optional. I can live with the current logic.","commit_id":"7cd0bae04d945c133539b6d63644a841b1149ab2"}],"zun/tests/unit/compute/test_compute_manager.py":[{"author":{"_account_id":10206,"name":"Madhuri Kumari","email":"madhuri.kumari@intel.com","username":"Madhuri"},"change_message_id":"33e4bedbb0e7c502708bd43af5f3c60d0f735da2","unresolved":false,"context_lines":[{"line_number":120,"context_line":"        container_2.status \u003d consts.STOPPED"},{"line_number":121,"context_line":"        self.compute_manager.restore_running_container(self.context,"},{"line_number":122,"context_line":"                                                       container_1,"},{"line_number":123,"context_line":"                                                       container_2)"},{"line_number":124,"context_line":"        mock_container_reboot.assert_called_once_with(self.context,"},{"line_number":125,"context_line":"                                                      container_1)"},{"line_number":126,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"5f93b717_5469ffbb","line":123,"range":{"start_line":123,"start_character":55,"end_line":123,"end_character":66},"updated":"2018-01-25 07:04:24.000000000","message":"The container_2 here is the same container db object which I got from your method definition of restore_running_container.\nCould you change the test accordingly?","commit_id":"da2c957f16da7fd2a7dbf7c4cec91daae2559c7f"}]}
