)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"335defc29b9cee7065e766cd010ed6da06af55c2","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     chenglch \u003cchenglch@cn.ibm.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-02-12 02:29:21 -0500"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Stop console at filst if console is enabled when destroy node"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Previously when delete node, if console is enabled , the node will"},{"line_number":10,"context_line":"be deleted but the console process for the node will not stop."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"da86d52c_cd75f4fa","line":7,"updated":"2015-02-12 09:16:03.000000000","message":"s/filst/first/ ?","commit_id":"8da4df7a31a3b3602645ee1849c4bc7b3f0c8630"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"335defc29b9cee7065e766cd010ed6da06af55c2","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Stop console at filst if console is enabled when destroy node"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Previously when delete node, if console is enabled , the node will"},{"line_number":10,"context_line":"be deleted but the console process for the node will not stop."},{"line_number":11,"context_line":"Now stop console at first, then delete the node."},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"da86d52c_2dcdb031","line":9,"updated":"2015-02-12 09:16:03.000000000","message":"nit: \"when node was deleted with console enabled, the console process was not stopped\"","commit_id":"8da4df7a31a3b3602645ee1849c4bc7b3f0c8630"}],"ironic/conductor/manager.py":[{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"1fe398153deb27a723e9ac397cdfbbe2d725e0a4","unresolved":false,"context_lines":[{"line_number":1025,"context_line":"                         \"powered off\") % node.uuid)"},{"line_number":1026,"context_line":"                raise exception.NodeInWrongPowerState(msg)"},{"line_number":1027,"context_line":"            if node.console_enabled:"},{"line_number":1028,"context_line":"                raise exception.NodeInWrongConsoleState(node\u003dnode.uuid)"},{"line_number":1029,"context_line":"            node.destroy()"},{"line_number":1030,"context_line":"            LOG.info(_LI(\u0027Successfully deleted node %(node)s.\u0027),"},{"line_number":1031,"context_line":"                     {\u0027node\u0027: node.uuid})"}],"source_content_type":"text/x-python","patch_set":2,"id":"da86d52c_5b0d753d","line":1028,"updated":"2015-02-11 09:24:37.000000000","message":"I wish we could be a bit smarter here and actually try to stop the console instead of tell the user to go and issue yet another request to do it.\n\nWhat about we try to stop the console in case it\u0027s enabled?\n\n if node.console_enabled:\n     try:\n         self._set_console_mode(node, False)\n     except Exception:\n          LOG.error(_LE(\"Can\u0027t stop the console for node... \"))\n          raise exception.NodeInWrongConsoleState(node\u003dnode.uuid)","commit_id":"72175f0d5b04d8afa2b356eb5921a03d642789bb"},{"author":{"_account_id":11042,"name":"chenglch","email":"chenglch@cn.ibm.com","username":"chenglch"},"change_message_id":"22f692d4d04949998db46df3070d93b7d7cf56ff","unresolved":false,"context_lines":[{"line_number":1025,"context_line":"                         \"powered off\") % node.uuid)"},{"line_number":1026,"context_line":"                raise exception.NodeInWrongPowerState(msg)"},{"line_number":1027,"context_line":"            if node.console_enabled:"},{"line_number":1028,"context_line":"                raise exception.NodeInWrongConsoleState(node\u003dnode.uuid)"},{"line_number":1029,"context_line":"            node.destroy()"},{"line_number":1030,"context_line":"            LOG.info(_LI(\u0027Successfully deleted node %(node)s.\u0027),"},{"line_number":1031,"context_line":"                     {\u0027node\u0027: node.uuid})"}],"source_content_type":"text/x-python","patch_set":2,"id":"da86d52c_c6bb450d","line":1028,"in_reply_to":"da86d52c_5b0d753d","updated":"2015-02-11 11:35:40.000000000","message":"I think this is the safe way , but self._set_console_mode(node, False) \nalways call node.save() before node.destroy() if the console can be stop \nsuccessfully. How about just call the task.driver.console.stop_console(task),\n like this\n\nif node.console_enabled:\n     try:\n          task.driver.console.stop_console(task)\n     except Exception:\n          LOG.error(_LE(\"Can\u0027t stop the console for node... \"))\n          raise exception.NodeInWrongConsoleState(node\u003dnode.uuid)\nnode.destroy()","commit_id":"72175f0d5b04d8afa2b356eb5921a03d642789bb"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"335defc29b9cee7065e766cd010ed6da06af55c2","unresolved":false,"context_lines":[{"line_number":1027,"context_line":"                raise exception.NodeInWrongPowerState(msg)"},{"line_number":1028,"context_line":"            if node.console_enabled:"},{"line_number":1029,"context_line":"                try:"},{"line_number":1030,"context_line":"                    self._set_console_mode(task, False)"},{"line_number":1031,"context_line":"                except Exception as e:"},{"line_number":1032,"context_line":"                    raise exception.FailedToDestroyNodeWithConsole(node\u003dnode,"},{"line_number":1033,"context_line":"                                                                   error\u003de)"}],"source_content_type":"text/x-python","patch_set":3,"id":"da86d52c_8d8bfcc1","line":1030,"updated":"2015-02-12 09:16:03.000000000","message":"it makes sense to directly call\n\n task.driver.console.stop_console(task)\n\nas _set_console_mode will do redundant exception handling.","commit_id":"8da4df7a31a3b3602645ee1849c4bc7b3f0c8630"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"335defc29b9cee7065e766cd010ed6da06af55c2","unresolved":false,"context_lines":[{"line_number":1030,"context_line":"                    self._set_console_mode(task, False)"},{"line_number":1031,"context_line":"                except Exception as e:"},{"line_number":1032,"context_line":"                    raise exception.FailedToDestroyNodeWithConsole(node\u003dnode,"},{"line_number":1033,"context_line":"                                                                   error\u003de)"},{"line_number":1034,"context_line":"            node.destroy()"},{"line_number":1035,"context_line":"            LOG.info(_LI(\u0027Successfully deleted node %(node)s.\u0027),"},{"line_number":1036,"context_line":"                     {\u0027node\u0027: node.uuid})"}],"source_content_type":"text/x-python","patch_set":3,"id":"da86d52c_2d6930f9","line":1033,"updated":"2015-02-12 09:16:03.000000000","message":"I wonder if we really need to raise something here... such node will become undeletable. any opinions?","commit_id":"8da4df7a31a3b3602645ee1849c4bc7b3f0c8630"}],"ironic/tests/conductor/test_manager.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"8c8bfb5584dc7b8beb73bb885965aadfd96870a2","unresolved":false,"context_lines":[{"line_number":1689,"context_line":"        node.refresh()"},{"line_number":1690,"context_line":"        self.assertIsNone(node.reservation)"},{"line_number":1691,"context_line":""},{"line_number":1692,"context_line":"    def test_destroy_node_console_disabled(self):"},{"line_number":1693,"context_line":"        self._start_service()"},{"line_number":1694,"context_line":"        node \u003d obj_utils.create_test_node(self.context,"},{"line_number":1695,"context_line":"                                          console_enabled\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":2,"id":"da86d52c_d02ea48b","line":1692,"updated":"2015-02-11 08:10:42.000000000","message":"this actually duplicates test_destroy_node","commit_id":"72175f0d5b04d8afa2b356eb5921a03d642789bb"}]}
