)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"59281ffb7b8bd2464efe2de07cd66dadec5fdb81","unresolved":false,"context_lines":[{"line_number":10,"context_line":"Nova scope."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"[Nova] blueprint ironic-serial-console-support"},{"line_number":13,"context_line":"[Ironic] Related-Bug: #1553083"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Change-Id: I38e803021d71fc0760a8ae99b3e97dd0aecb5088"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"3aaa91ec_660d4b37","line":13,"range":{"start_line":13,"start_character":0,"end_line":13,"end_character":30},"updated":"2016-06-28 03:57:07.000000000","message":"should we add depends-on I35a7dcb7e89baf16d096501fd44dbc12adc8c61e\nBecause without that Ironic patch, it will return ConsoleNotAvailable. Mainly my concern is if we say this is available in reno then it should go in with Ironic implementation.","commit_id":"b490603c380107f59c463788f19a51852921a484"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"6064efce97a84df6eee7b60317a10f835bd55b6c","unresolved":false,"context_lines":[{"line_number":10,"context_line":"Nova scope."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"[Nova] blueprint ironic-serial-console-support"},{"line_number":13,"context_line":"[Ironic] spec"},{"line_number":14,"context_line":"    https://review.openstack.org/319505"},{"line_number":15,"context_line":"[Ironic] related patches"},{"line_number":16,"context_line":"    https://review.openstack.org/#/c/293873/"},{"line_number":17,"context_line":"    https://review.openstack.org/#/c/328168/"},{"line_number":18,"context_line":"[Ironic] Related-Bug: #1553083"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Change-Id: I38e803021d71fc0760a8ae99b3e97dd0aecb5088"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"3aaa91ec_55212c9d","line":17,"range":{"start_line":13,"start_character":0,"end_line":17,"end_character":44},"updated":"2016-06-30 18:46:24.000000000","message":"Here should contain\n\n Depends-On: I79ddd83d12cc8111e05b5107359d6db8a8881d61\n\nto wait for implementing the ironic side driver.","commit_id":"e4edd692478b6a45d6ba25271cbbb911775e2214"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"c1215e351b5a93aac4db7eafbc75c1114e03eed4","unresolved":false,"context_lines":[{"line_number":17,"context_line":"    https://review.openstack.org/#/c/328168/"},{"line_number":18,"context_line":"[Ironic] Related-Bug: #1553083"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Depends-On: I79ddd83d12cc8111e05b5107359d6db8a8881d61"},{"line_number":21,"context_line":"Change-Id: I38e803021d71fc0760a8ae99b3e97dd0aecb5088"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":12,"id":"dada55a8_c4ddc171","line":20,"range":{"start_line":20,"start_character":0,"end_line":20,"end_character":53},"updated":"2016-07-25 21:55:37.000000000","message":"nit: The corresponding patch has been merged, and sometimes this message blocks kicking the gate job, I faced.\nIt would be nice to remove here if we have a chance to update this more.","commit_id":"4580a99f68daff9641efc005f0c2eaa0016f8682"},{"author":{"_account_id":7882,"name":"Yuiko Takada Mori","email":"yuiko-mori@nec.com","username":"YuikoTakada"},"change_message_id":"42bde180f6aa7f4b3af6471053cb223559a4593f","unresolved":false,"context_lines":[{"line_number":17,"context_line":"    https://review.openstack.org/#/c/328168/"},{"line_number":18,"context_line":"[Ironic] Related-Bug: #1553083"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Depends-On: I79ddd83d12cc8111e05b5107359d6db8a8881d61"},{"line_number":21,"context_line":"Change-Id: I38e803021d71fc0760a8ae99b3e97dd0aecb5088"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":12,"id":"dada55a8_93fdcd3d","line":20,"range":{"start_line":20,"start_character":0,"end_line":20,"end_character":53},"in_reply_to":"dada55a8_c4ddc171","updated":"2016-07-26 00:28:14.000000000","message":"Done","commit_id":"4580a99f68daff9641efc005f0c2eaa0016f8682"}],"doc/source/support-matrix.ini":[{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"dfc0cedb72597c55f3466e21eb0d6b641b62096a","unresolved":false,"context_lines":[{"line_number":808,"context_line":"driver-impl-libvirt-xen\u003dunknown"},{"line_number":809,"context_line":"driver-impl-vmware\u003dmissing"},{"line_number":810,"context_line":"driver-impl-hyperv\u003dcomplete"},{"line_number":811,"context_line":"driver-impl-ironic\u003dcomplete"},{"line_number":812,"context_line":"driver-impl-libvirt-vz-vm\u003dmissing"},{"line_number":813,"context_line":"driver-impl-libvirt-vz-ct\u003dmissing"},{"line_number":814,"context_line":""}],"source_content_type":"text/x-properties","patch_set":25,"id":"3a98d1f4_44742267","line":811,"updated":"2016-09-30 21:12:52.000000000","message":"Just a thought, does this imply this is tested? Because it isn\u0027t tested.","commit_id":"38ba9d49427b4922fb5a9e1be2c7916e48ff73a4"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ca68e2864712d237a9637dfb61e67198b9cf9824","unresolved":false,"context_lines":[{"line_number":808,"context_line":"driver-impl-libvirt-xen\u003dunknown"},{"line_number":809,"context_line":"driver-impl-vmware\u003dmissing"},{"line_number":810,"context_line":"driver-impl-hyperv\u003dcomplete"},{"line_number":811,"context_line":"driver-impl-ironic\u003dcomplete"},{"line_number":812,"context_line":"driver-impl-libvirt-vz-vm\u003dmissing"},{"line_number":813,"context_line":"driver-impl-libvirt-vz-ct\u003dmissing"},{"line_number":814,"context_line":""}],"source_content_type":"text/x-properties","patch_set":25,"id":"fa6399be_2eb07f8b","line":811,"in_reply_to":"1a95cdbc_49231456","updated":"2016-10-10 21:10:25.000000000","message":"We have plenty of \u0027complete\u0027 things in here that aren\u0027t tested by CI. It\u0027s not ideal, but that\u0027s part of why John has the feature classification work to show what\u0027s not only implemented but what\u0027s actually tested by CI.","commit_id":"38ba9d49427b4922fb5a9e1be2c7916e48ff73a4"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"f559002bb372cac721e326fd3f0e2a1e55adff16","unresolved":false,"context_lines":[{"line_number":808,"context_line":"driver-impl-libvirt-xen\u003dunknown"},{"line_number":809,"context_line":"driver-impl-vmware\u003dmissing"},{"line_number":810,"context_line":"driver-impl-hyperv\u003dcomplete"},{"line_number":811,"context_line":"driver-impl-ironic\u003dcomplete"},{"line_number":812,"context_line":"driver-impl-libvirt-vz-vm\u003dmissing"},{"line_number":813,"context_line":"driver-impl-libvirt-vz-ct\u003dmissing"},{"line_number":814,"context_line":""}],"source_content_type":"text/x-properties","patch_set":25,"id":"3a98d1f4_777c6bb5","line":811,"in_reply_to":"3a98d1f4_44742267","updated":"2016-09-30 23:28:30.000000000","message":"Humm, the other features are marked as \"complete\" when adding the feature like Ia398afadfd9fd9544c5d843338ab25c0930d9f74 .\n\nSo it seems fine to change here on this commit.","commit_id":"38ba9d49427b4922fb5a9e1be2c7916e48ff73a4"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"f5f8c8a19725a32d2b88b47d6c689377b8746bad","unresolved":false,"context_lines":[{"line_number":808,"context_line":"driver-impl-libvirt-xen\u003dunknown"},{"line_number":809,"context_line":"driver-impl-vmware\u003dmissing"},{"line_number":810,"context_line":"driver-impl-hyperv\u003dcomplete"},{"line_number":811,"context_line":"driver-impl-ironic\u003dcomplete"},{"line_number":812,"context_line":"driver-impl-libvirt-vz-vm\u003dmissing"},{"line_number":813,"context_line":"driver-impl-libvirt-vz-ct\u003dmissing"},{"line_number":814,"context_line":""}],"source_content_type":"text/x-properties","patch_set":25,"id":"1a95cdbc_49231456","line":811,"in_reply_to":"3a98d1f4_777c6bb5","updated":"2016-10-10 14:10:43.000000000","message":"Okay, cool. Just thought I would ask :)","commit_id":"38ba9d49427b4922fb5a9e1be2c7916e48ff73a4"}],"nova/conf/ironic.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c12e5cce3177e1924c8de800b1d115cd16c1a002","unresolved":false,"context_lines":[{"line_number":95,"context_line":"        default\u003d10,"},{"line_number":96,"context_line":"        min\u003d0,"},{"line_number":97,"context_line":"        help\u003d\u0027Timeout (seconds) to wait for node serial console state \u0027"},{"line_number":98,"context_line":"             \u0027changed. Set to 0 to disable timeout. (integer value)\u0027),"},{"line_number":99,"context_line":"]"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"fa6399be_27d07953","line":98,"range":{"start_line":98,"start_character":52,"end_line":98,"end_character":67},"updated":"2016-10-11 16:52:07.000000000","message":"This is redundant since it\u0027s an IntOpt, this is how it\u0027s rendered by oslo.config:\n\n  # Timeout (seconds) to wait for node serial console state changed. Set to 0 to\n  # disable timeout. (integer value) (integer value)\n  # Minimum value: 0\n  #serial_console_state_timeout \u003d 10","commit_id":"799d1997694f42f4770f4b2d48eeccbeb77a8856"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"707772077cfb06f4028f64299af58dbc767e1c70","unresolved":false,"context_lines":[{"line_number":95,"context_line":"        default\u003d10,"},{"line_number":96,"context_line":"        min\u003d0,"},{"line_number":97,"context_line":"        help\u003d\u0027Timeout (seconds) to wait for node serial console state \u0027"},{"line_number":98,"context_line":"             \u0027changed. Set to 0 to disable timeout. (integer value)\u0027),"},{"line_number":99,"context_line":"]"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"fa6399be_959fa102","line":98,"range":{"start_line":98,"start_character":52,"end_line":98,"end_character":67},"in_reply_to":"fa6399be_27d07953","updated":"2016-10-12 04:34:52.000000000","message":"Done","commit_id":"799d1997694f42f4770f4b2d48eeccbeb77a8856"}],"nova/conf/serial_console.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3e5d2b13ecac4dde03c4bfb17cae6c7814f1a81b","unresolved":false,"context_lines":[{"line_number":28,"context_line":"        help\u003d\"\"\""},{"line_number":29,"context_line":"The serial console feature allows you to connect to a guest in case a"},{"line_number":30,"context_line":"graphical console like VNC, RDP or SPICE is not available. This is"},{"line_number":31,"context_line":"supported for the libvirt and ironic driver.\"\"\")"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"enabled_opt \u003d cfg.BoolOpt(\u0027enabled\u0027,"},{"line_number":34,"context_line":"        default\u003dFalse,"}],"source_content_type":"text/x-python","patch_set":25,"id":"fa6399be_e998416d","line":31,"updated":"2016-10-10 21:27:37.000000000","message":"Looks like hyper-v also supports remote interactive serial console:\n\nhttp://docs.openstack.org/developer/nova/support-matrix.html#console_serial_interactive\n\nI\u0027ll fix that separately.","commit_id":"38ba9d49427b4922fb5a9e1be2c7916e48ff73a4"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c12e5cce3177e1924c8de800b1d115cd16c1a002","unresolved":false,"context_lines":[{"line_number":28,"context_line":"        help\u003d\"\"\""},{"line_number":29,"context_line":"The serial console feature allows you to connect to a guest in case a"},{"line_number":30,"context_line":"graphical console like VNC, RDP or SPICE is not available. This is"},{"line_number":31,"context_line":"supported for the libvirt and ironic driver.\"\"\")"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"enabled_opt \u003d cfg.BoolOpt(\u0027enabled\u0027,"},{"line_number":34,"context_line":"        default\u003dFalse,"}],"source_content_type":"text/x-python","patch_set":27,"id":"fa6399be_275eb9e9","line":31,"range":{"start_line":31,"start_character":30,"end_line":31,"end_character":36},"updated":"2016-10-11 16:52:07.000000000","message":"nit: s/ironic/Ironic/ so it\u0027s a bit more clear we\u0027re not talking about hipster virtualization.","commit_id":"799d1997694f42f4770f4b2d48eeccbeb77a8856"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"707772077cfb06f4028f64299af58dbc767e1c70","unresolved":false,"context_lines":[{"line_number":28,"context_line":"        help\u003d\"\"\""},{"line_number":29,"context_line":"The serial console feature allows you to connect to a guest in case a"},{"line_number":30,"context_line":"graphical console like VNC, RDP or SPICE is not available. This is"},{"line_number":31,"context_line":"supported for the libvirt and ironic driver.\"\"\")"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"enabled_opt \u003d cfg.BoolOpt(\u0027enabled\u0027,"},{"line_number":34,"context_line":"        default\u003dFalse,"}],"source_content_type":"text/x-python","patch_set":27,"id":"fa6399be_c8689b8a","line":31,"range":{"start_line":31,"start_character":30,"end_line":31,"end_character":36},"in_reply_to":"fa6399be_275eb9e9","updated":"2016-10-12 04:34:52.000000000","message":"Done","commit_id":"799d1997694f42f4770f4b2d48eeccbeb77a8856"}],"nova/tests/unit/virt/ironic/test_driver.py":[{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"840b187ad2e8fb81ddb6c59be73f9160a6a8de7b","unresolved":false,"context_lines":[{"line_number":1658,"context_line":"    def test_network_binding_host_id_none(self):"},{"line_number":1659,"context_line":"        self._test_network_binding_host_id(False)"},{"line_number":1660,"context_line":""},{"line_number":1661,"context_line":"    @mock.patch.object(ironic_driver.IronicDriver,"},{"line_number":1662,"context_line":"                       \u0027_validate_instance_and_node\u0027)"},{"line_number":1663,"context_line":"    @mock.patch.object(FAKE_CLIENT, \u0027node\u0027)"},{"line_number":1664,"context_line":"    def test_get_serial_console_socat(self, mock_node, mock_validate):"}],"source_content_type":"text/x-python","patch_set":10,"id":"1aa78d24_8eb5a5ef","line":1661,"updated":"2016-07-05 19:06:48.000000000","message":"Just a suggestion (since it hasn\u0027t been done much in this file). I\u0027d put these serial console tests in a separate class.","commit_id":"08a4fc8c65bb6fd50483c2f505e09969081e8230"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"3c26e609b5192649bbd777f8958c94d568d9d290","unresolved":false,"context_lines":[{"line_number":1658,"context_line":"    def test_network_binding_host_id_none(self):"},{"line_number":1659,"context_line":"        self._test_network_binding_host_id(False)"},{"line_number":1660,"context_line":""},{"line_number":1661,"context_line":"    @mock.patch.object(ironic_driver.IronicDriver,"},{"line_number":1662,"context_line":"                       \u0027_validate_instance_and_node\u0027)"},{"line_number":1663,"context_line":"    @mock.patch.object(FAKE_CLIENT, \u0027node\u0027)"},{"line_number":1664,"context_line":"    def test_get_serial_console_socat(self, mock_node, mock_validate):"}],"source_content_type":"text/x-python","patch_set":10,"id":"1aa78d24_d2c9bdad","line":1661,"in_reply_to":"1aa78d24_8eb5a5ef","updated":"2016-07-07 08:56:18.000000000","message":"Done","commit_id":"08a4fc8c65bb6fd50483c2f505e09969081e8230"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"840b187ad2e8fb81ddb6c59be73f9160a6a8de7b","unresolved":false,"context_lines":[{"line_number":1696,"context_line":"            }"},{"line_number":1697,"context_line":"        }"},{"line_number":1698,"context_line":""},{"line_number":1699,"context_line":"        self.assertRaises(exception.ConsoleTypeUnavailable,"},{"line_number":1700,"context_line":"                          self.driver.get_serial_console, self.ctx, instance)"},{"line_number":1701,"context_line":"        mock_validate.assert_called_once_with(instance)"},{"line_number":1702,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"1aa78d24_6e1039a9","line":1699,"updated":"2016-07-05 19:06:48.000000000","message":"I suggest using self.assertRaisesRegex() to be more certain that this is the expected one, because this exception is raised in a lot of different places.","commit_id":"08a4fc8c65bb6fd50483c2f505e09969081e8230"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"3c26e609b5192649bbd777f8958c94d568d9d290","unresolved":false,"context_lines":[{"line_number":1696,"context_line":"            }"},{"line_number":1697,"context_line":"        }"},{"line_number":1698,"context_line":""},{"line_number":1699,"context_line":"        self.assertRaises(exception.ConsoleTypeUnavailable,"},{"line_number":1700,"context_line":"                          self.driver.get_serial_console, self.ctx, instance)"},{"line_number":1701,"context_line":"        mock_validate.assert_called_once_with(instance)"},{"line_number":1702,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"1aa78d24_f94815ce","line":1699,"in_reply_to":"1aa78d24_6e1039a9","updated":"2016-07-07 08:56:18.000000000","message":"It seems hard to use assertRaisesRegex() in these cases, because ConsoleTypeUnavailable does not support customizing the message. In our cases, they always are \"Unavailable console type \"serial\".\", so that\u0027s not enough to use assertRaisesRegex().","commit_id":"08a4fc8c65bb6fd50483c2f505e09969081e8230"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"840b187ad2e8fb81ddb6c59be73f9160a6a8de7b","unresolved":false,"context_lines":[{"line_number":1717,"context_line":"            }"},{"line_number":1718,"context_line":"        }"},{"line_number":1719,"context_line":""},{"line_number":1720,"context_line":"        self.assertRaises(exception.ConsoleTypeUnavailable,"},{"line_number":1721,"context_line":"                          self.driver.get_serial_console, self.ctx, instance)"},{"line_number":1722,"context_line":"        mock_validate.assert_called_once_with(instance)"},{"line_number":1723,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"1aa78d24_6ed5d9b7","line":1720,"updated":"2016-07-05 19:06:48.000000000","message":"ditto","commit_id":"08a4fc8c65bb6fd50483c2f505e09969081e8230"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"3c26e609b5192649bbd777f8958c94d568d9d290","unresolved":false,"context_lines":[{"line_number":1717,"context_line":"            }"},{"line_number":1718,"context_line":"        }"},{"line_number":1719,"context_line":""},{"line_number":1720,"context_line":"        self.assertRaises(exception.ConsoleTypeUnavailable,"},{"line_number":1721,"context_line":"                          self.driver.get_serial_console, self.ctx, instance)"},{"line_number":1722,"context_line":"        mock_validate.assert_called_once_with(instance)"},{"line_number":1723,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"1aa78d24_b9984d79","line":1720,"in_reply_to":"1aa78d24_6ed5d9b7","updated":"2016-07-07 08:56:18.000000000","message":"Please see my above answer.","commit_id":"08a4fc8c65bb6fd50483c2f505e09969081e8230"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"840b187ad2e8fb81ddb6c59be73f9160a6a8de7b","unresolved":false,"context_lines":[{"line_number":1759,"context_line":"            }"},{"line_number":1760,"context_line":"        }"},{"line_number":1761,"context_line":""},{"line_number":1762,"context_line":"        self.assertRaises(exception.ConsoleTypeUnavailable,"},{"line_number":1763,"context_line":"                          self.driver.get_serial_console, self.ctx, instance)"},{"line_number":1764,"context_line":"        mock_validate.assert_called_once_with(instance)"},{"line_number":1765,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"1aa78d24_0e50955c","line":1762,"updated":"2016-07-05 19:06:48.000000000","message":"ditto","commit_id":"08a4fc8c65bb6fd50483c2f505e09969081e8230"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"3c26e609b5192649bbd777f8958c94d568d9d290","unresolved":false,"context_lines":[{"line_number":1759,"context_line":"            }"},{"line_number":1760,"context_line":"        }"},{"line_number":1761,"context_line":""},{"line_number":1762,"context_line":"        self.assertRaises(exception.ConsoleTypeUnavailable,"},{"line_number":1763,"context_line":"                          self.driver.get_serial_console, self.ctx, instance)"},{"line_number":1764,"context_line":"        mock_validate.assert_called_once_with(instance)"},{"line_number":1765,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"1aa78d24_f9c77561","line":1762,"in_reply_to":"1aa78d24_0e50955c","updated":"2016-07-07 08:56:18.000000000","message":"Please see my above answer.","commit_id":"08a4fc8c65bb6fd50483c2f505e09969081e8230"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"840b187ad2e8fb81ddb6c59be73f9160a6a8de7b","unresolved":false,"context_lines":[{"line_number":1762,"context_line":"        self.assertRaises(exception.ConsoleTypeUnavailable,"},{"line_number":1763,"context_line":"                          self.driver.get_serial_console, self.ctx, instance)"},{"line_number":1764,"context_line":"        mock_validate.assert_called_once_with(instance)"},{"line_number":1765,"context_line":""},{"line_number":1766,"context_line":""},{"line_number":1767,"context_line":"@mock.patch.object(instance_metadata, \u0027InstanceMetadata\u0027)"},{"line_number":1768,"context_line":"@mock.patch.object(configdrive, \u0027ConfigDriveBuilder\u0027)"}],"source_content_type":"text/x-python","patch_set":10,"id":"1aa78d24_ce784dc7","line":1765,"updated":"2016-07-05 19:06:48.000000000","message":"what about unit tests for _get_console_info_with_reset(.., reset_console\u003dFalse)?\n\nwhen _set_console_mode() raises an exception\n\ntests for _wait_state()\n\ntests for _get_console()\n\nI am not that familiar with this code, I am guessing that whatever level of testing is already here, should be done for this new serial console code too.","commit_id":"08a4fc8c65bb6fd50483c2f505e09969081e8230"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"3c26e609b5192649bbd777f8958c94d568d9d290","unresolved":false,"context_lines":[{"line_number":1762,"context_line":"        self.assertRaises(exception.ConsoleTypeUnavailable,"},{"line_number":1763,"context_line":"                          self.driver.get_serial_console, self.ctx, instance)"},{"line_number":1764,"context_line":"        mock_validate.assert_called_once_with(instance)"},{"line_number":1765,"context_line":""},{"line_number":1766,"context_line":""},{"line_number":1767,"context_line":"@mock.patch.object(instance_metadata, \u0027InstanceMetadata\u0027)"},{"line_number":1768,"context_line":"@mock.patch.object(configdrive, \u0027ConfigDriveBuilder\u0027)"}],"source_content_type":"text/x-python","patch_set":10,"id":"1aa78d24_79b3850a","line":1765,"in_reply_to":"1aa78d24_ce784dc7","updated":"2016-07-07 08:56:18.000000000","message":"I\u0027ve added some tests for _get_console_info_with_reset() with different testing scenarios relevant to the nested functions.","commit_id":"08a4fc8c65bb6fd50483c2f505e09969081e8230"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"352b1b86108538abf7800ddefeac0b65bc40e2a1","unresolved":false,"context_lines":[{"line_number":1705,"context_line":"            network_info\u003dself.network_info, extra_md\u003d{}, content\u003dNone)"},{"line_number":1706,"context_line":""},{"line_number":1707,"context_line":""},{"line_number":1708,"context_line":"class IronicDriverConsoleTestCase(test.NoDBTestCase):"},{"line_number":1709,"context_line":"    CONSOLE_DATA \u003d {"},{"line_number":1710,"context_line":"        \u0027console_enabled\u0027: True,"},{"line_number":1711,"context_line":"        \u0027console_info\u0027: {"}],"source_content_type":"text/x-python","patch_set":11,"id":"1aa78d24_3dc26985","line":1708,"updated":"2016-07-07 17:40:02.000000000","message":"If you subclass this from IronicDriverTestCase(), I think there won\u0027t be any need to copy the setUp() from there.","commit_id":"7440329a625af35218a2dd9efdd71a6256e0dd6f"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"00d213521a6c82705044adbcaf4675b971a49085","unresolved":false,"context_lines":[{"line_number":1705,"context_line":"            network_info\u003dself.network_info, extra_md\u003d{}, content\u003dNone)"},{"line_number":1706,"context_line":""},{"line_number":1707,"context_line":""},{"line_number":1708,"context_line":"class IronicDriverConsoleTestCase(test.NoDBTestCase):"},{"line_number":1709,"context_line":"    CONSOLE_DATA \u003d {"},{"line_number":1710,"context_line":"        \u0027console_enabled\u0027: True,"},{"line_number":1711,"context_line":"        \u0027console_info\u0027: {"}],"source_content_type":"text/x-python","patch_set":11,"id":"1aa78d24_be4f6f90","line":1708,"in_reply_to":"1aa78d24_3dc26985","updated":"2016-07-07 18:56:34.000000000","message":"Subclassing IronicDriverConsoleTestCase will cause all the test functions of the base class to be run again when the subclass is run. If we want to subclass, then we need to create a new base class for the two.","commit_id":"7440329a625af35218a2dd9efdd71a6256e0dd6f"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"352b1b86108538abf7800ddefeac0b65bc40e2a1","unresolved":false,"context_lines":[{"line_number":1730,"context_line":"        CONF.set_default(\u0027api_retry_interval\u0027, default\u003d0, group\u003d\u0027ironic\u0027)"},{"line_number":1731,"context_line":""},{"line_number":1732,"context_line":"    def _create_console_data(self, enabled\u003dTrue, type\u003d\u0027socat\u0027, url\u003dNone):"},{"line_number":1733,"context_line":"        console_data \u003d dict(self.CONSOLE_DATA)"},{"line_number":1734,"context_line":"        console_data[\u0027console_enabled\u0027] \u003d enabled"},{"line_number":1735,"context_line":"        if type is not None:"},{"line_number":1736,"context_line":"            console_data[\u0027console_info\u0027][\u0027type\u0027] \u003d type"}],"source_content_type":"text/x-python","patch_set":11,"id":"1aa78d24_dd62453d","line":1733,"updated":"2016-07-07 17:40:02.000000000","message":"I\u0027m not sure why this is needed. It looks like the code will add the info to this dict anyway. If eg type\u003d\u003dNone, it\u0027ll be set to \u0027socat\u0027, and if url\u003d\u003dNone, it\u0027ll be set to tcp://127.0.0.1:... So you could get the same effect (and it\u0027d be clearer) if you changed L1732 to s/url\u003dNone/url\u003d\u0027tcp://127.0.0.1:10000\u0027/. (And add a bit more code for console_data[\u0027console_info\u0027] \u003d {})","commit_id":"7440329a625af35218a2dd9efdd71a6256e0dd6f"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"00d213521a6c82705044adbcaf4675b971a49085","unresolved":false,"context_lines":[{"line_number":1730,"context_line":"        CONF.set_default(\u0027api_retry_interval\u0027, default\u003d0, group\u003d\u0027ironic\u0027)"},{"line_number":1731,"context_line":""},{"line_number":1732,"context_line":"    def _create_console_data(self, enabled\u003dTrue, type\u003d\u0027socat\u0027, url\u003dNone):"},{"line_number":1733,"context_line":"        console_data \u003d dict(self.CONSOLE_DATA)"},{"line_number":1734,"context_line":"        console_data[\u0027console_enabled\u0027] \u003d enabled"},{"line_number":1735,"context_line":"        if type is not None:"},{"line_number":1736,"context_line":"            console_data[\u0027console_info\u0027][\u0027type\u0027] \u003d type"}],"source_content_type":"text/x-python","patch_set":11,"id":"1aa78d24_12fdd76d","line":1733,"in_reply_to":"1aa78d24_dd62453d","updated":"2016-07-07 18:56:34.000000000","message":"Done","commit_id":"7440329a625af35218a2dd9efdd71a6256e0dd6f"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"352b1b86108538abf7800ddefeac0b65bc40e2a1","unresolved":false,"context_lines":[{"line_number":1755,"context_line":"            instance, reset_console\u003dFalse)"},{"line_number":1756,"context_line":""},{"line_number":1757,"context_line":"        mock_validate.assert_called_once_with(instance)"},{"line_number":1758,"context_line":"        self.assertTrue(mock_node.get_console.called)"},{"line_number":1759,"context_line":"        mock_node.set_console_mode.assert_not_called()"},{"line_number":1760,"context_line":"        self.assertThat(result, matchers.DictMatches(expected))"},{"line_number":1761,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"1aa78d24_18597b8e","line":1758,"updated":"2016-07-07 17:40:02.000000000","message":"If something was only called once, I prefer .assert_called_once_with() because with .called, you don\u0027t know how many times it may have been called.","commit_id":"7440329a625af35218a2dd9efdd71a6256e0dd6f"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"00d213521a6c82705044adbcaf4675b971a49085","unresolved":false,"context_lines":[{"line_number":1755,"context_line":"            instance, reset_console\u003dFalse)"},{"line_number":1756,"context_line":""},{"line_number":1757,"context_line":"        mock_validate.assert_called_once_with(instance)"},{"line_number":1758,"context_line":"        self.assertTrue(mock_node.get_console.called)"},{"line_number":1759,"context_line":"        mock_node.set_console_mode.assert_not_called()"},{"line_number":1760,"context_line":"        self.assertThat(result, matchers.DictMatches(expected))"},{"line_number":1761,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"1aa78d24_52fbdf78","line":1758,"in_reply_to":"1aa78d24_18597b8e","updated":"2016-07-07 18:56:34.000000000","message":"Done","commit_id":"7440329a625af35218a2dd9efdd71a6256e0dd6f"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"352b1b86108538abf7800ddefeac0b65bc40e2a1","unresolved":false,"context_lines":[{"line_number":1814,"context_line":""},{"line_number":1815,"context_line":"        def _fake_set_console_mode(node_uuid, mode):"},{"line_number":1816,"context_line":"            # This causes the _fake_get_console() will return"},{"line_number":1817,"context_line":"            # the expected console mode is set successfully."},{"line_number":1818,"context_line":"            temp_data[\u0027target_mode\u0027] \u003d mode"},{"line_number":1819,"context_line":""},{"line_number":1820,"context_line":"        mock_node.get_console.side_effect \u003d _fake_get_console"}],"source_content_type":"text/x-python","patch_set":11,"id":"1aa78d24_b83ca793","line":1817,"updated":"2016-07-07 17:40:02.000000000","message":"That\u0027s (grammatically) hard to understand.\n\nmaybe \"Set it up so that _fake_get_console() returns \u0027mode\u0027.\" ?","commit_id":"7440329a625af35218a2dd9efdd71a6256e0dd6f"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"00d213521a6c82705044adbcaf4675b971a49085","unresolved":false,"context_lines":[{"line_number":1814,"context_line":""},{"line_number":1815,"context_line":"        def _fake_set_console_mode(node_uuid, mode):"},{"line_number":1816,"context_line":"            # This causes the _fake_get_console() will return"},{"line_number":1817,"context_line":"            # the expected console mode is set successfully."},{"line_number":1818,"context_line":"            temp_data[\u0027target_mode\u0027] \u003d mode"},{"line_number":1819,"context_line":""},{"line_number":1820,"context_line":"        mock_node.get_console.side_effect \u003d _fake_get_console"}],"source_content_type":"text/x-python","patch_set":11,"id":"1aa78d24_120b177e","line":1817,"in_reply_to":"1aa78d24_b83ca793","updated":"2016-07-07 18:56:34.000000000","message":"Done","commit_id":"7440329a625af35218a2dd9efdd71a6256e0dd6f"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"352b1b86108538abf7800ddefeac0b65bc40e2a1","unresolved":false,"context_lines":[{"line_number":1826,"context_line":"            instance, reset_console\u003dTrue)"},{"line_number":1827,"context_line":""},{"line_number":1828,"context_line":"        mock_validate.assert_called_once_with(instance)"},{"line_number":1829,"context_line":"        self.assertTrue(mock_node.get_console.called)"},{"line_number":1830,"context_line":"        self.assertTrue(mock_node.set_console_mode.called)"},{"line_number":1831,"context_line":"        self.assertThat(result, matchers.DictMatches(expected))"},{"line_number":1832,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"1aa78d24_58a663ae","line":1829,"updated":"2016-07-07 17:40:02.000000000","message":"this will be called more than once, right? How many times?","commit_id":"7440329a625af35218a2dd9efdd71a6256e0dd6f"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"00d213521a6c82705044adbcaf4675b971a49085","unresolved":false,"context_lines":[{"line_number":1826,"context_line":"            instance, reset_console\u003dTrue)"},{"line_number":1827,"context_line":""},{"line_number":1828,"context_line":"        mock_validate.assert_called_once_with(instance)"},{"line_number":1829,"context_line":"        self.assertTrue(mock_node.get_console.called)"},{"line_number":1830,"context_line":"        self.assertTrue(mock_node.set_console_mode.called)"},{"line_number":1831,"context_line":"        self.assertThat(result, matchers.DictMatches(expected))"},{"line_number":1832,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"1aa78d24_f20dab8f","line":1829,"in_reply_to":"1aa78d24_58a663ae","updated":"2016-07-07 18:56:34.000000000","message":"Due to node.get_console() is called periodically within _wait_state(), so it\u0027s better not check the exact number of calls. In some case, I think checking get_console.call_count \u003e 1 seems good enough.","commit_id":"7440329a625af35218a2dd9efdd71a6256e0dd6f"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"352b1b86108538abf7800ddefeac0b65bc40e2a1","unresolved":false,"context_lines":[{"line_number":1827,"context_line":""},{"line_number":1828,"context_line":"        mock_validate.assert_called_once_with(instance)"},{"line_number":1829,"context_line":"        self.assertTrue(mock_node.get_console.called)"},{"line_number":1830,"context_line":"        self.assertTrue(mock_node.set_console_mode.called)"},{"line_number":1831,"context_line":"        self.assertThat(result, matchers.DictMatches(expected))"},{"line_number":1832,"context_line":""},{"line_number":1833,"context_line":"    @mock.patch.object(ironic_driver.IronicDriver,"}],"source_content_type":"text/x-python","patch_set":11,"id":"1aa78d24_58d14322","line":1830,"updated":"2016-07-07 17:40:02.000000000","message":"this was called twice? you could check the arguments to mock_node.set_console_mode; one will be False and the other True.","commit_id":"7440329a625af35218a2dd9efdd71a6256e0dd6f"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"00d213521a6c82705044adbcaf4675b971a49085","unresolved":false,"context_lines":[{"line_number":1827,"context_line":""},{"line_number":1828,"context_line":"        mock_validate.assert_called_once_with(instance)"},{"line_number":1829,"context_line":"        self.assertTrue(mock_node.get_console.called)"},{"line_number":1830,"context_line":"        self.assertTrue(mock_node.set_console_mode.called)"},{"line_number":1831,"context_line":"        self.assertThat(result, matchers.DictMatches(expected))"},{"line_number":1832,"context_line":""},{"line_number":1833,"context_line":"    @mock.patch.object(ironic_driver.IronicDriver,"}],"source_content_type":"text/x-python","patch_set":11,"id":"1aa78d24_3224530b","line":1830,"in_reply_to":"1aa78d24_58d14322","updated":"2016-07-07 18:56:34.000000000","message":"Done","commit_id":"7440329a625af35218a2dd9efdd71a6256e0dd6f"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"352b1b86108538abf7800ddefeac0b65bc40e2a1","unresolved":false,"context_lines":[{"line_number":1869,"context_line":""},{"line_number":1870,"context_line":"        mock_validate.assert_called_once_with(instance)"},{"line_number":1871,"context_line":"        self.assertTrue(mock_node.get_console.called)"},{"line_number":1872,"context_line":"        self.assertTrue(mock_node.set_console_mode.called)"},{"line_number":1873,"context_line":""},{"line_number":1874,"context_line":"    @mock.patch.object(ironic_driver.IronicDriver,"},{"line_number":1875,"context_line":"                       \u0027_validate_instance_and_node\u0027)"}],"source_content_type":"text/x-python","patch_set":11,"id":"1aa78d24_388717b6","line":1872,"updated":"2016-07-07 17:40:02.000000000","message":"how many times are the above two called?","commit_id":"7440329a625af35218a2dd9efdd71a6256e0dd6f"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"00d213521a6c82705044adbcaf4675b971a49085","unresolved":false,"context_lines":[{"line_number":1869,"context_line":""},{"line_number":1870,"context_line":"        mock_validate.assert_called_once_with(instance)"},{"line_number":1871,"context_line":"        self.assertTrue(mock_node.get_console.called)"},{"line_number":1872,"context_line":"        self.assertTrue(mock_node.set_console_mode.called)"},{"line_number":1873,"context_line":""},{"line_number":1874,"context_line":"    @mock.patch.object(ironic_driver.IronicDriver,"},{"line_number":1875,"context_line":"                       \u0027_validate_instance_and_node\u0027)"}],"source_content_type":"text/x-python","patch_set":11,"id":"1aa78d24_12e797ac","line":1872,"in_reply_to":"1aa78d24_388717b6","updated":"2016-07-07 18:56:34.000000000","message":"Done","commit_id":"7440329a625af35218a2dd9efdd71a6256e0dd6f"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"5b1af8c0fe7010317220dfeba32985bdae1a6373","unresolved":false,"context_lines":[{"line_number":1725,"context_line":"            }"},{"line_number":1726,"context_line":"        }"},{"line_number":1727,"context_line":""},{"line_number":1728,"context_line":"    @mock.patch.object(ironic_driver.IronicDriver,"},{"line_number":1729,"context_line":"                       \u0027_validate_instance_and_node\u0027)"},{"line_number":1730,"context_line":"    @mock.patch.object(FAKE_CLIENT, \u0027node\u0027)"},{"line_number":1731,"context_line":"    def test__get_console_info_with_no_reset(self, mock_node, mock_validate):"},{"line_number":1732,"context_line":"        node \u003d ironic_utils.get_test_node()"},{"line_number":1733,"context_line":"        instance \u003d fake_instance.fake_instance_obj(self.ctx, node\u003dnode.uuid)"}],"source_content_type":"text/x-python","patch_set":15,"id":"9ad45d7e_5250aa5e","line":1730,"range":{"start_line":1728,"start_character":0,"end_line":1730,"end_character":43},"updated":"2016-08-09 10:07:05.000000000","message":"these mocks are the same for all tests and should be moved to the class level","commit_id":"f66fa153b1dd57aa3fa46cfaf291f695ce71466b"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"1b95288888a808522d2d2d6851bae695a80a5ec1","unresolved":false,"context_lines":[{"line_number":1725,"context_line":"            }"},{"line_number":1726,"context_line":"        }"},{"line_number":1727,"context_line":""},{"line_number":1728,"context_line":"    @mock.patch.object(ironic_driver.IronicDriver,"},{"line_number":1729,"context_line":"                       \u0027_validate_instance_and_node\u0027)"},{"line_number":1730,"context_line":"    @mock.patch.object(FAKE_CLIENT, \u0027node\u0027)"},{"line_number":1731,"context_line":"    def test__get_console_info_with_no_reset(self, mock_node, mock_validate):"},{"line_number":1732,"context_line":"        node \u003d ironic_utils.get_test_node()"},{"line_number":1733,"context_line":"        instance \u003d fake_instance.fake_instance_obj(self.ctx, node\u003dnode.uuid)"}],"source_content_type":"text/x-python","patch_set":15,"id":"9ad45d7e_b278d02c","line":1730,"range":{"start_line":1728,"start_character":0,"end_line":1730,"end_character":43},"in_reply_to":"9ad45d7e_5250aa5e","updated":"2016-08-10 07:01:09.000000000","message":"IMO, setting mocks in class level may cause troubles to someone else that wants to add new test functions without expecting the fake version of the mocked ones. Besides, when I tried to do that, I didn\u0027t see the lines of code reduced much. Please re-consider this.","commit_id":"f66fa153b1dd57aa3fa46cfaf291f695ce71466b"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"fa89539c947211eb7716a95c8dd7bee6e188029b","unresolved":false,"context_lines":[{"line_number":1725,"context_line":"            }"},{"line_number":1726,"context_line":"        }"},{"line_number":1727,"context_line":""},{"line_number":1728,"context_line":"    @mock.patch.object(ironic_driver.IronicDriver,"},{"line_number":1729,"context_line":"                       \u0027_validate_instance_and_node\u0027)"},{"line_number":1730,"context_line":"    @mock.patch.object(FAKE_CLIENT, \u0027node\u0027)"},{"line_number":1731,"context_line":"    def test__get_console_info_with_no_reset(self, mock_node, mock_validate):"},{"line_number":1732,"context_line":"        node \u003d ironic_utils.get_test_node()"},{"line_number":1733,"context_line":"        instance \u003d fake_instance.fake_instance_obj(self.ctx, node\u003dnode.uuid)"}],"source_content_type":"text/x-python","patch_set":15,"id":"9ad45d7e_d9fab674","line":1730,"range":{"start_line":1728,"start_character":0,"end_line":1730,"end_character":43},"in_reply_to":"9ad45d7e_b278d02c","updated":"2016-08-10 13:21:44.000000000","message":"I can see Dmitry\u0027s point. These tests are only testing the console code; they should never be using actual calls instead of those mocked calls. If you look at the rest of the file, a similar thing is being done with class IronicDriverGenerateConfigDriveTestCase, so for consistency too, it makes sense to make this change.","commit_id":"f66fa153b1dd57aa3fa46cfaf291f695ce71466b"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"8f19157b8776b66bec0f774e26d4f0b0f0657d04","unresolved":false,"context_lines":[{"line_number":1725,"context_line":"            }"},{"line_number":1726,"context_line":"        }"},{"line_number":1727,"context_line":""},{"line_number":1728,"context_line":"    @mock.patch.object(ironic_driver.IronicDriver,"},{"line_number":1729,"context_line":"                       \u0027_validate_instance_and_node\u0027)"},{"line_number":1730,"context_line":"    @mock.patch.object(FAKE_CLIENT, \u0027node\u0027)"},{"line_number":1731,"context_line":"    def test__get_console_info_with_no_reset(self, mock_node, mock_validate):"},{"line_number":1732,"context_line":"        node \u003d ironic_utils.get_test_node()"},{"line_number":1733,"context_line":"        instance \u003d fake_instance.fake_instance_obj(self.ctx, node\u003dnode.uuid)"}],"source_content_type":"text/x-python","patch_set":15,"id":"9ad45d7e_2b2d53fe","line":1730,"range":{"start_line":1728,"start_character":0,"end_line":1730,"end_character":43},"in_reply_to":"9ad45d7e_d9fab674","updated":"2016-08-11 04:24:04.000000000","message":"Done","commit_id":"f66fa153b1dd57aa3fa46cfaf291f695ce71466b"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"db73e5fef3fef1aa995c6130103809cc2642cedd","unresolved":false,"context_lines":[{"line_number":1939,"context_line":"        mock_node.get_console.assert_called_once_with(self.node.uuid)"},{"line_number":1940,"context_line":"        mock_node.set_console_mode.assert_not_called()"},{"line_number":1941,"context_line":"        self.assertThat(result[\u0027console_info\u0027],"},{"line_number":1942,"context_line":"                        matchers.DictMatches(expected))"},{"line_number":1943,"context_line":""},{"line_number":1944,"context_line":"    def test__get_node_console_with_no_reset_get_failed(self, mock_node):"},{"line_number":1945,"context_line":"        mock_node.get_console.side_effect \u003d exception.NovaException()"}],"source_content_type":"text/x-python","patch_set":17,"id":"9ad45d7e_fcc928ad","line":1942,"updated":"2016-08-11 13:25:47.000000000","message":"should we also check that result[\u0027node\u0027] exists?","commit_id":"52ee94cb243911c37177b2bdfb20e418d70f41a1"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"fcc7a9d90be3bb799f19dfd64918e97d475df8e9","unresolved":false,"context_lines":[{"line_number":1939,"context_line":"        mock_node.get_console.assert_called_once_with(self.node.uuid)"},{"line_number":1940,"context_line":"        mock_node.set_console_mode.assert_not_called()"},{"line_number":1941,"context_line":"        self.assertThat(result[\u0027console_info\u0027],"},{"line_number":1942,"context_line":"                        matchers.DictMatches(expected))"},{"line_number":1943,"context_line":""},{"line_number":1944,"context_line":"    def test__get_node_console_with_no_reset_get_failed(self, mock_node):"},{"line_number":1945,"context_line":"        mock_node.get_console.side_effect \u003d exception.NovaException()"}],"source_content_type":"text/x-python","patch_set":17,"id":"9ad45d7e_4b02230b","line":1942,"in_reply_to":"9ad45d7e_fcc928ad","updated":"2016-08-11 15:54:11.000000000","message":"Done","commit_id":"52ee94cb243911c37177b2bdfb20e418d70f41a1"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"e9db6cf3115b0a9371372bde78c2805e743efaa8","unresolved":false,"context_lines":[{"line_number":2035,"context_line":"        self.assertEqual(2, mock_node.set_console_mode.call_count)"},{"line_number":2036,"context_line":""},{"line_number":2037,"context_line":"    @mock.patch.object(ironic_driver, \u0027_CONSOLE_STATE_CHECKING_INTERVAL\u0027, 0.5)"},{"line_number":2038,"context_line":"    @mock.patch.object(ironic_driver, \u0027_CONSOLE_STATE_TIMEOUT\u0027, 1)"},{"line_number":2039,"context_line":"    def test__get_node_console_with_reset_wait_timeout(self, mock_node):"},{"line_number":2040,"context_line":"        temp_data \u003d {\u0027target_mode\u0027: True}"},{"line_number":2041,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"9ad45d7e_7dd36860","line":2038,"updated":"2016-08-11 16:30:00.000000000","message":"OH. That\u0027s going to cause the test to take 2 or so seconds. Is there any way to reduce the time?","commit_id":"b18b8d979d8ad463ffe08bfe1b9ce186c3dbab81"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"e5ce224bdc70cd22db8bc68c5e81215bfe69bae4","unresolved":false,"context_lines":[{"line_number":2035,"context_line":"        self.assertEqual(2, mock_node.set_console_mode.call_count)"},{"line_number":2036,"context_line":""},{"line_number":2037,"context_line":"    @mock.patch.object(ironic_driver, \u0027_CONSOLE_STATE_CHECKING_INTERVAL\u0027, 0.5)"},{"line_number":2038,"context_line":"    @mock.patch.object(ironic_driver, \u0027_CONSOLE_STATE_TIMEOUT\u0027, 1)"},{"line_number":2039,"context_line":"    def test__get_node_console_with_reset_wait_timeout(self, mock_node):"},{"line_number":2040,"context_line":"        temp_data \u003d {\u0027target_mode\u0027: True}"},{"line_number":2041,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"9ad45d7e_ee57a055","line":2038,"in_reply_to":"9ad45d7e_7dd36860","updated":"2016-08-11 17:25:36.000000000","message":"I tried to reduce the values 10 times, and it seemed OK. Now this function only takes about 0.25s to finish. I think it\u0027s acceptable now.","commit_id":"b18b8d979d8ad463ffe08bfe1b9ce186c3dbab81"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"66a60b3ab263582b8b82b4e377db89b0d8177bb1","unresolved":false,"context_lines":[{"line_number":37,"context_line":"from nova import servicegroup"},{"line_number":38,"context_line":"from nova import test"},{"line_number":39,"context_line":"from nova.tests.unit import fake_instance"},{"line_number":40,"context_line":"from nova.tests.unit import matchers"},{"line_number":41,"context_line":"from nova.tests.unit import utils"},{"line_number":42,"context_line":"from nova.tests.unit.virt.ironic import utils as ironic_utils"},{"line_number":43,"context_line":"from nova.virt import configdrive"}],"source_content_type":"text/x-python","patch_set":26,"id":"fa6399be_34c45091","line":40,"updated":"2016-10-10 21:57:39.000000000","message":"This is masking the matches import on L26.","commit_id":"2562454827407184ae2606e27d143616e4d8f498"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"58ed0d98610254f17764e8eab85357576bbb011b","unresolved":false,"context_lines":[{"line_number":37,"context_line":"from nova import servicegroup"},{"line_number":38,"context_line":"from nova import test"},{"line_number":39,"context_line":"from nova.tests.unit import fake_instance"},{"line_number":40,"context_line":"from nova.tests.unit import matchers"},{"line_number":41,"context_line":"from nova.tests.unit import utils"},{"line_number":42,"context_line":"from nova.tests.unit.virt.ironic import utils as ironic_utils"},{"line_number":43,"context_line":"from nova.virt import configdrive"}],"source_content_type":"text/x-python","patch_set":26,"id":"fa6399be_6679b32f","line":40,"in_reply_to":"fa6399be_34c45091","updated":"2016-10-11 09:24:30.000000000","message":"Done","commit_id":"2562454827407184ae2606e27d143616e4d8f498"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c12e5cce3177e1924c8de800b1d115cd16c1a002","unresolved":false,"context_lines":[{"line_number":1943,"context_line":"        CONF.set_default(\u0027api_max_retries\u0027, default\u003d1, group\u003d\u0027ironic\u0027)"},{"line_number":1944,"context_line":"        CONF.set_default(\u0027api_retry_interval\u0027, default\u003d0, group\u003d\u0027ironic\u0027)"},{"line_number":1945,"context_line":""},{"line_number":1946,"context_line":"        self.stub_out(\u0027nova.virt.ironic.driver.IronicDriver.\u0027"},{"line_number":1947,"context_line":"                      \u0027_validate_instance_and_node\u0027,"},{"line_number":1948,"context_line":"                      lambda _, inst: self.node)"},{"line_number":1949,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"fa6399be_4731eda1","line":1946,"range":{"start_line":1946,"start_character":8,"end_line":1946,"end_character":21},"updated":"2016-10-11 16:52:07.000000000","message":"Can we use mock for this instead?","commit_id":"799d1997694f42f4770f4b2d48eeccbeb77a8856"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"707772077cfb06f4028f64299af58dbc767e1c70","unresolved":false,"context_lines":[{"line_number":1943,"context_line":"        CONF.set_default(\u0027api_max_retries\u0027, default\u003d1, group\u003d\u0027ironic\u0027)"},{"line_number":1944,"context_line":"        CONF.set_default(\u0027api_retry_interval\u0027, default\u003d0, group\u003d\u0027ironic\u0027)"},{"line_number":1945,"context_line":""},{"line_number":1946,"context_line":"        self.stub_out(\u0027nova.virt.ironic.driver.IronicDriver.\u0027"},{"line_number":1947,"context_line":"                      \u0027_validate_instance_and_node\u0027,"},{"line_number":1948,"context_line":"                      lambda _, inst: self.node)"},{"line_number":1949,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"fa6399be_e85e3fe8","line":1946,"range":{"start_line":1946,"start_character":8,"end_line":1946,"end_character":21},"in_reply_to":"fa6399be_4731eda1","updated":"2016-10-12 04:34:52.000000000","message":"At first, I used mock decorator for every functions. Then a reviewer suggested moving that mock into setUp(). I\u0027m not sure which is better.","commit_id":"799d1997694f42f4770f4b2d48eeccbeb77a8856"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8d6b760d82e042955f76f396666638aef4b954bb","unresolved":false,"context_lines":[{"line_number":1943,"context_line":"        CONF.set_default(\u0027api_max_retries\u0027, default\u003d1, group\u003d\u0027ironic\u0027)"},{"line_number":1944,"context_line":"        CONF.set_default(\u0027api_retry_interval\u0027, default\u003d0, group\u003d\u0027ironic\u0027)"},{"line_number":1945,"context_line":""},{"line_number":1946,"context_line":"        self.stub_out(\u0027nova.virt.ironic.driver.IronicDriver.\u0027"},{"line_number":1947,"context_line":"                      \u0027_validate_instance_and_node\u0027,"},{"line_number":1948,"context_line":"                      lambda _, inst: self.node)"},{"line_number":1949,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"fa6399be_44837698","line":1946,"range":{"start_line":1946,"start_character":8,"end_line":1946,"end_character":21},"in_reply_to":"fa6399be_e85e3fe8","updated":"2016-10-12 17:15:24.000000000","message":"There are ways to decorate the class such that you don\u0027t get a mock parameter passed to every test case. I think you just have to set the new\u003d kwarg on the mock.\n\nIf we\u0027re going to use stub_out, we could also do that for:\n\n@mock.patch.object(cw, \u0027IronicClientWrapper\u0027,\n                       lambda *_: FAKE_CLIENT_WRAPPER)\n\nOn setUp so we don\u0027t have mock_node passed to every test.","commit_id":"799d1997694f42f4770f4b2d48eeccbeb77a8856"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c12e5cce3177e1924c8de800b1d115cd16c1a002","unresolved":false,"context_lines":[{"line_number":2048,"context_line":"    @mock.patch.object(ironic_driver, \u0027LOG\u0027, autospec\u003dTrue)"},{"line_number":2049,"context_line":"    def test__get_node_console_with_reset_wait_timeout(self, mock_log,"},{"line_number":2050,"context_line":"                                                       mock_node):"},{"line_number":2051,"context_line":"        CONF.set_default(\u0027serial_console_state_timeout\u0027,"},{"line_number":2052,"context_line":"                         default\u003d0.1, group\u003d\u0027ironic\u0027)"},{"line_number":2053,"context_line":"        temp_data \u003d {\u0027target_mode\u0027: True}"},{"line_number":2054,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"fa6399be_07e375a4","line":2051,"range":{"start_line":2051,"start_character":8,"end_line":2051,"end_character":24},"updated":"2016-10-11 16:52:07.000000000","message":"To avoid mucking with global state I think you should use self.flags instead:\n\n self.flags(serial_console_state_timeout\u003d0.1, group\u003d\u0027ironic\u0027)","commit_id":"799d1997694f42f4770f4b2d48eeccbeb77a8856"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"707772077cfb06f4028f64299af58dbc767e1c70","unresolved":false,"context_lines":[{"line_number":2048,"context_line":"    @mock.patch.object(ironic_driver, \u0027LOG\u0027, autospec\u003dTrue)"},{"line_number":2049,"context_line":"    def test__get_node_console_with_reset_wait_timeout(self, mock_log,"},{"line_number":2050,"context_line":"                                                       mock_node):"},{"line_number":2051,"context_line":"        CONF.set_default(\u0027serial_console_state_timeout\u0027,"},{"line_number":2052,"context_line":"                         default\u003d0.1, group\u003d\u0027ironic\u0027)"},{"line_number":2053,"context_line":"        temp_data \u003d {\u0027target_mode\u0027: True}"},{"line_number":2054,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"fa6399be_d5267915","line":2051,"range":{"start_line":2051,"start_character":8,"end_line":2051,"end_character":24},"in_reply_to":"fa6399be_07e375a4","updated":"2016-10-12 04:34:52.000000000","message":"self.flags() call to CONF.set_override() with enforce_type\u003dTrue, then I can\u0027t set a floating number for an integer param. So I use set_override() directly.","commit_id":"799d1997694f42f4770f4b2d48eeccbeb77a8856"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"cb19a8190f85f86bb1b4db8c202f2bbbf4680ca1","unresolved":false,"context_lines":[{"line_number":1932,"context_line":"        super(IronicDriverConsoleTestCase, self).setUp()"},{"line_number":1933,"context_line":""},{"line_number":1934,"context_line":"        self.driver \u003d ironic_driver.IronicDriver(None)"},{"line_number":1935,"context_line":"        self.driver.virtapi \u003d fake.FakeVirtAPI()"},{"line_number":1936,"context_line":"        self.ctx \u003d nova_context.get_admin_context()"},{"line_number":1937,"context_line":"        node_uuid \u003d uuidutils.generate_uuid()"},{"line_number":1938,"context_line":"        self.node \u003d ironic_utils.get_test_node(driver\u003d\u0027fake\u0027, uuid\u003dnode_uuid)"}],"source_content_type":"text/x-python","patch_set":28,"id":"fa6399be_7203dc0f","line":1935,"updated":"2016-10-12 18:13:20.000000000","message":"nit: you can pass the fake virtapi to the IronicDriver constructor instead of None.","commit_id":"ec76f6317552f7fa32a50cc9d31e310ac116c9f0"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"9005441dafc9e3eccd23077db107d532d3880112","unresolved":false,"context_lines":[{"line_number":1932,"context_line":"        super(IronicDriverConsoleTestCase, self).setUp()"},{"line_number":1933,"context_line":""},{"line_number":1934,"context_line":"        self.driver \u003d ironic_driver.IronicDriver(None)"},{"line_number":1935,"context_line":"        self.driver.virtapi \u003d fake.FakeVirtAPI()"},{"line_number":1936,"context_line":"        self.ctx \u003d nova_context.get_admin_context()"},{"line_number":1937,"context_line":"        node_uuid \u003d uuidutils.generate_uuid()"},{"line_number":1938,"context_line":"        self.node \u003d ironic_utils.get_test_node(driver\u003d\u0027fake\u0027, uuid\u003dnode_uuid)"}],"source_content_type":"text/x-python","patch_set":28,"id":"fa6399be_86366050","line":1935,"in_reply_to":"fa6399be_7203dc0f","updated":"2016-10-13 04:04:02.000000000","message":"Done","commit_id":"ec76f6317552f7fa32a50cc9d31e310ac116c9f0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"beb6afaf685b798276dac1f404183f9e1e73ee92","unresolved":false,"context_lines":[{"line_number":1947,"context_line":"                      \u0027_validate_instance_and_node\u0027,"},{"line_number":1948,"context_line":"                      lambda _, inst: self.node)"},{"line_number":1949,"context_line":""},{"line_number":1950,"context_line":"    def _create_console_data(self, enabled\u003dTrue, type\u003d\u0027socat\u0027,"},{"line_number":1951,"context_line":"                             url\u003d\u0027tcp://127.0.0.1:10000\u0027):"},{"line_number":1952,"context_line":"        return {"},{"line_number":1953,"context_line":"            \u0027console_enabled\u0027: enabled,"}],"source_content_type":"text/x-python","patch_set":28,"id":"fa6399be_f2a36c4d","line":1950,"range":{"start_line":1950,"start_character":49,"end_line":1950,"end_character":53},"updated":"2016-10-12 17:52:05.000000000","message":"This is masking the type builtin. Maybe call the parameter console_type.","commit_id":"ec76f6317552f7fa32a50cc9d31e310ac116c9f0"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"9005441dafc9e3eccd23077db107d532d3880112","unresolved":false,"context_lines":[{"line_number":1947,"context_line":"                      \u0027_validate_instance_and_node\u0027,"},{"line_number":1948,"context_line":"                      lambda _, inst: self.node)"},{"line_number":1949,"context_line":""},{"line_number":1950,"context_line":"    def _create_console_data(self, enabled\u003dTrue, type\u003d\u0027socat\u0027,"},{"line_number":1951,"context_line":"                             url\u003d\u0027tcp://127.0.0.1:10000\u0027):"},{"line_number":1952,"context_line":"        return {"},{"line_number":1953,"context_line":"            \u0027console_enabled\u0027: enabled,"}],"source_content_type":"text/x-python","patch_set":28,"id":"fa6399be_a639a443","line":1950,"range":{"start_line":1950,"start_character":49,"end_line":1950,"end_character":53},"in_reply_to":"fa6399be_f2a36c4d","updated":"2016-10-13 04:04:02.000000000","message":"Done","commit_id":"ec76f6317552f7fa32a50cc9d31e310ac116c9f0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"cb19a8190f85f86bb1b4db8c202f2bbbf4680ca1","unresolved":false,"context_lines":[{"line_number":2051,"context_line":"        # Set timeout to a small value to reduce testing time"},{"line_number":2052,"context_line":"        # Note: timeout value is integer, use enforce_type\u003dFalse to set it"},{"line_number":2053,"context_line":"        # to a floating number."},{"line_number":2054,"context_line":"        CONF.set_override(\u0027serial_console_state_timeout\u0027, 0.1,"},{"line_number":2055,"context_line":"                          group\u003d\u0027ironic\u0027, enforce_type\u003dFalse)"},{"line_number":2056,"context_line":"        temp_data \u003d {\u0027target_mode\u0027: True}"},{"line_number":2057,"context_line":""}],"source_content_type":"text/x-python","patch_set":28,"id":"fa6399be_2d790530","line":2054,"range":{"start_line":2054,"start_character":58,"end_line":2054,"end_character":61},"updated":"2016-10-12 18:13:20.000000000","message":"I wonder if this value messes with the jitter\u003d0.5 kwarg and the looping call never happens?","commit_id":"ec76f6317552f7fa32a50cc9d31e310ac116c9f0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"37d88eeffe7a7046fbc69ff2d9c6a51b523a20ab","unresolved":false,"context_lines":[{"line_number":2051,"context_line":"        # Set timeout to a small value to reduce testing time"},{"line_number":2052,"context_line":"        # Note: timeout value is integer, use enforce_type\u003dFalse to set it"},{"line_number":2053,"context_line":"        # to a floating number."},{"line_number":2054,"context_line":"        CONF.set_override(\u0027serial_console_state_timeout\u0027, 0.1,"},{"line_number":2055,"context_line":"                          group\u003d\u0027ironic\u0027, enforce_type\u003dFalse)"},{"line_number":2056,"context_line":"        temp_data \u003d {\u0027target_mode\u0027: True}"},{"line_number":2057,"context_line":""}],"source_content_type":"text/x-python","patch_set":28,"id":"fa6399be_586439e3","line":2054,"range":{"start_line":2054,"start_character":58,"end_line":2054,"end_character":61},"in_reply_to":"fa6399be_2d790530","updated":"2016-10-12 18:22:14.000000000","message":"Nevermind, it\u0027s not.","commit_id":"ec76f6317552f7fa32a50cc9d31e310ac116c9f0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"cb19a8190f85f86bb1b4db8c202f2bbbf4680ca1","unresolved":false,"context_lines":[{"line_number":2077,"context_line":""},{"line_number":2078,"context_line":"        self.assertTrue(mock_node.get_console.call_count \u003e 1)"},{"line_number":2079,"context_line":"        self.assertEqual(2, mock_node.set_console_mode.call_count)"},{"line_number":2080,"context_line":"        self.assertTrue(mock_log.error.called)"},{"line_number":2081,"context_line":""},{"line_number":2082,"context_line":"    def test_get_serial_console_socat(self, mock_node):"},{"line_number":2083,"context_line":"        temp_data \u003d {\u0027target_mode\u0027: True}"}],"source_content_type":"text/x-python","patch_set":28,"id":"fa6399be_2dce655a","line":2080,"updated":"2016-10-12 18:13:20.000000000","message":"I\u0027m not sure how this wouldn\u0027t be hitting the timeout though if we passed this check.","commit_id":"ec76f6317552f7fa32a50cc9d31e310ac116c9f0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"37d88eeffe7a7046fbc69ff2d9c6a51b523a20ab","unresolved":false,"context_lines":[{"line_number":2077,"context_line":""},{"line_number":2078,"context_line":"        self.assertTrue(mock_node.get_console.call_count \u003e 1)"},{"line_number":2079,"context_line":"        self.assertEqual(2, mock_node.set_console_mode.call_count)"},{"line_number":2080,"context_line":"        self.assertTrue(mock_log.error.called)"},{"line_number":2081,"context_line":""},{"line_number":2082,"context_line":"    def test_get_serial_console_socat(self, mock_node):"},{"line_number":2083,"context_line":"        temp_data \u003d {\u0027target_mode\u0027: True}"}],"source_content_type":"text/x-python","patch_set":28,"id":"fa6399be_b89f15b3","line":2080,"in_reply_to":"fa6399be_2dce655a","updated":"2016-10-12 18:22:14.000000000","message":"This test is OK, I checked it manually.","commit_id":"ec76f6317552f7fa32a50cc9d31e310ac116c9f0"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"fec44130de4d15a0f4c632c9eef6058d05aebd24","unresolved":false,"context_lines":[{"line_number":1984,"context_line":"                                                           mock_node):"},{"line_number":1985,"context_line":"        def _fake_log_debug(msg, *args, **kwargs):"},{"line_number":1986,"context_line":"            regex \u003d r\u0027Console is disabled for instance .*\u0027"},{"line_number":1987,"context_line":"            self.assertTrue(re.match(regex, msg))"},{"line_number":1988,"context_line":""},{"line_number":1989,"context_line":"        mock_node.get_console.return_value \u003d \\"},{"line_number":1990,"context_line":"            self._create_console_data(enabled\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":29,"id":"fa6399be_6f9d7565","line":1987,"updated":"2016-10-13 21:06:10.000000000","message":"this assert is going to be really tough to debug if it goes wrong, please at least use the 2nd parameter to show how things failed other than True !\u003d False\n\nThis is a real -1 point for me.","commit_id":"4b15a366c211acab4b31ea46eb70c2c669764f33"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"34d01d1ba197634e98820c43d262767a9241498f","unresolved":false,"context_lines":[{"line_number":1984,"context_line":"                                                           mock_node):"},{"line_number":1985,"context_line":"        def _fake_log_debug(msg, *args, **kwargs):"},{"line_number":1986,"context_line":"            regex \u003d r\u0027Console is disabled for instance .*\u0027"},{"line_number":1987,"context_line":"            self.assertTrue(re.match(regex, msg))"},{"line_number":1988,"context_line":""},{"line_number":1989,"context_line":"        mock_node.get_console.return_value \u003d \\"},{"line_number":1990,"context_line":"            self._create_console_data(enabled\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":29,"id":"fa6399be_214d493e","line":1987,"in_reply_to":"fa6399be_6f9d7565","updated":"2016-10-14 03:04:05.000000000","message":"Done","commit_id":"4b15a366c211acab4b31ea46eb70c2c669764f33"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"fec44130de4d15a0f4c632c9eef6058d05aebd24","unresolved":false,"context_lines":[{"line_number":2039,"context_line":"                          self.driver._get_node_console_with_reset,"},{"line_number":2040,"context_line":"                          self.instance)"},{"line_number":2041,"context_line":""},{"line_number":2042,"context_line":"        self.assertTrue(mock_node.get_console.call_count \u003e 1)"},{"line_number":2043,"context_line":"        self.assertEqual(2, mock_node.set_console_mode.call_count)"},{"line_number":2044,"context_line":"        self.assertTrue(mock_log.error.called)"},{"line_number":2045,"context_line":""}],"source_content_type":"text/x-python","patch_set":29,"id":"fa6399be_6fe3b5a4","line":2042,"updated":"2016-10-13 21:06:10.000000000","message":"nit: it\u0027s better to use assertGreaterThan instead of comparisons inside asserts, mostly to make it clear what was wrong when it fails","commit_id":"4b15a366c211acab4b31ea46eb70c2c669764f33"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"34d01d1ba197634e98820c43d262767a9241498f","unresolved":false,"context_lines":[{"line_number":2039,"context_line":"                          self.driver._get_node_console_with_reset,"},{"line_number":2040,"context_line":"                          self.instance)"},{"line_number":2041,"context_line":""},{"line_number":2042,"context_line":"        self.assertTrue(mock_node.get_console.call_count \u003e 1)"},{"line_number":2043,"context_line":"        self.assertEqual(2, mock_node.set_console_mode.call_count)"},{"line_number":2044,"context_line":"        self.assertTrue(mock_log.error.called)"},{"line_number":2045,"context_line":""}],"source_content_type":"text/x-python","patch_set":29,"id":"fa6399be_2122a952","line":2042,"in_reply_to":"fa6399be_6fe3b5a4","updated":"2016-10-14 03:04:05.000000000","message":"Done","commit_id":"4b15a366c211acab4b31ea46eb70c2c669764f33"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"fec44130de4d15a0f4c632c9eef6058d05aebd24","unresolved":false,"context_lines":[{"line_number":2074,"context_line":"                          self.driver._get_node_console_with_reset,"},{"line_number":2075,"context_line":"                          self.instance)"},{"line_number":2076,"context_line":""},{"line_number":2077,"context_line":"        self.assertTrue(mock_node.get_console.call_count \u003e 1)"},{"line_number":2078,"context_line":"        self.assertEqual(2, mock_node.set_console_mode.call_count)"},{"line_number":2079,"context_line":"        self.assertTrue(mock_log.error.called)"},{"line_number":2080,"context_line":""}],"source_content_type":"text/x-python","patch_set":29,"id":"fa6399be_ef9c2510","line":2077,"updated":"2016-10-13 21:06:10.000000000","message":"nit: dito","commit_id":"4b15a366c211acab4b31ea46eb70c2c669764f33"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"34d01d1ba197634e98820c43d262767a9241498f","unresolved":false,"context_lines":[{"line_number":2074,"context_line":"                          self.driver._get_node_console_with_reset,"},{"line_number":2075,"context_line":"                          self.instance)"},{"line_number":2076,"context_line":""},{"line_number":2077,"context_line":"        self.assertTrue(mock_node.get_console.call_count \u003e 1)"},{"line_number":2078,"context_line":"        self.assertEqual(2, mock_node.set_console_mode.call_count)"},{"line_number":2079,"context_line":"        self.assertTrue(mock_log.error.called)"},{"line_number":2080,"context_line":""}],"source_content_type":"text/x-python","patch_set":29,"id":"fa6399be_01292537","line":2077,"in_reply_to":"fa6399be_ef9c2510","updated":"2016-10-14 03:04:05.000000000","message":"Done","commit_id":"4b15a366c211acab4b31ea46eb70c2c669764f33"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"fec44130de4d15a0f4c632c9eef6058d05aebd24","unresolved":false,"context_lines":[{"line_number":2092,"context_line":""},{"line_number":2093,"context_line":"        result \u003d self.driver.get_serial_console(self.ctx, self.instance)"},{"line_number":2094,"context_line":""},{"line_number":2095,"context_line":"        self.assertTrue(mock_node.get_console.call_count \u003e 1)"},{"line_number":2096,"context_line":"        self.assertEqual(2, mock_node.set_console_mode.call_count)"},{"line_number":2097,"context_line":"        self.assertIsInstance(result, console_type.ConsoleSerial)"},{"line_number":2098,"context_line":"        self.assertEqual(\u0027127.0.0.1\u0027, result.host)"}],"source_content_type":"text/x-python","patch_set":29,"id":"fa6399be_4f88b1c5","line":2095,"updated":"2016-10-13 21:06:10.000000000","message":"nit: dito","commit_id":"4b15a366c211acab4b31ea46eb70c2c669764f33"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"34d01d1ba197634e98820c43d262767a9241498f","unresolved":false,"context_lines":[{"line_number":2092,"context_line":""},{"line_number":2093,"context_line":"        result \u003d self.driver.get_serial_console(self.ctx, self.instance)"},{"line_number":2094,"context_line":""},{"line_number":2095,"context_line":"        self.assertTrue(mock_node.get_console.call_count \u003e 1)"},{"line_number":2096,"context_line":"        self.assertEqual(2, mock_node.set_console_mode.call_count)"},{"line_number":2097,"context_line":"        self.assertIsInstance(result, console_type.ConsoleSerial)"},{"line_number":2098,"context_line":"        self.assertEqual(\u0027127.0.0.1\u0027, result.host)"}],"source_content_type":"text/x-python","patch_set":29,"id":"fa6399be_e1235156","line":2095,"in_reply_to":"fa6399be_4f88b1c5","updated":"2016-10-14 03:04:05.000000000","message":"Done","commit_id":"4b15a366c211acab4b31ea46eb70c2c669764f33"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"fec44130de4d15a0f4c632c9eef6058d05aebd24","unresolved":false,"context_lines":[{"line_number":2131,"context_line":"                          self.driver.get_serial_console,"},{"line_number":2132,"context_line":"                          self.ctx, self.instance)"},{"line_number":2133,"context_line":""},{"line_number":2134,"context_line":"        self.assertTrue(mock_node.get_console.call_count \u003e 1)"},{"line_number":2135,"context_line":"        self.assertEqual(2, mock_node.set_console_mode.call_count)"},{"line_number":2136,"context_line":"        self.assertTrue(mock_log.error.called)"},{"line_number":2137,"context_line":""}],"source_content_type":"text/x-python","patch_set":29,"id":"fa6399be_6f91f5f0","line":2134,"updated":"2016-10-13 21:06:10.000000000","message":"nit: dito","commit_id":"4b15a366c211acab4b31ea46eb70c2c669764f33"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"34d01d1ba197634e98820c43d262767a9241498f","unresolved":false,"context_lines":[{"line_number":2131,"context_line":"                          self.driver.get_serial_console,"},{"line_number":2132,"context_line":"                          self.ctx, self.instance)"},{"line_number":2133,"context_line":""},{"line_number":2134,"context_line":"        self.assertTrue(mock_node.get_console.call_count \u003e 1)"},{"line_number":2135,"context_line":"        self.assertEqual(2, mock_node.set_console_mode.call_count)"},{"line_number":2136,"context_line":"        self.assertTrue(mock_log.error.called)"},{"line_number":2137,"context_line":""}],"source_content_type":"text/x-python","patch_set":29,"id":"fa6399be_a12dd947","line":2134,"in_reply_to":"fa6399be_6f91f5f0","updated":"2016-10-14 03:04:05.000000000","message":"Done","commit_id":"4b15a366c211acab4b31ea46eb70c2c669764f33"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"fec44130de4d15a0f4c632c9eef6058d05aebd24","unresolved":false,"context_lines":[{"line_number":2157,"context_line":"        self.assertRaises(exception.ConsoleTypeUnavailable,"},{"line_number":2158,"context_line":"                          self.driver.get_serial_console,"},{"line_number":2159,"context_line":"                          self.ctx, self.instance)"},{"line_number":2160,"context_line":""},{"line_number":2161,"context_line":"        self.assertTrue(mock_node.get_console.call_count \u003e 1)"},{"line_number":2162,"context_line":"        self.assertEqual(2, mock_node.set_console_mode.call_count)"},{"line_number":2163,"context_line":"        self.assertTrue(mock_log.error.called)"}],"source_content_type":"text/x-python","patch_set":29,"id":"fa6399be_8f8e49ce","line":2160,"updated":"2016-10-13 21:06:10.000000000","message":"nit: dito","commit_id":"4b15a366c211acab4b31ea46eb70c2c669764f33"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"34d01d1ba197634e98820c43d262767a9241498f","unresolved":false,"context_lines":[{"line_number":2157,"context_line":"        self.assertRaises(exception.ConsoleTypeUnavailable,"},{"line_number":2158,"context_line":"                          self.driver.get_serial_console,"},{"line_number":2159,"context_line":"                          self.ctx, self.instance)"},{"line_number":2160,"context_line":""},{"line_number":2161,"context_line":"        self.assertTrue(mock_node.get_console.call_count \u003e 1)"},{"line_number":2162,"context_line":"        self.assertEqual(2, mock_node.set_console_mode.call_count)"},{"line_number":2163,"context_line":"        self.assertTrue(mock_log.error.called)"}],"source_content_type":"text/x-python","patch_set":29,"id":"fa6399be_81fe15ac","line":2160,"in_reply_to":"fa6399be_8f8e49ce","updated":"2016-10-14 03:04:05.000000000","message":"Done","commit_id":"4b15a366c211acab4b31ea46eb70c2c669764f33"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"fec44130de4d15a0f4c632c9eef6058d05aebd24","unresolved":false,"context_lines":[{"line_number":2186,"context_line":"                          self.driver.get_serial_console,"},{"line_number":2187,"context_line":"                          self.ctx, self.instance)"},{"line_number":2188,"context_line":""},{"line_number":2189,"context_line":"        self.assertTrue(mock_node.get_console.call_count \u003e 1)"},{"line_number":2190,"context_line":"        self.assertEqual(2, mock_node.set_console_mode.call_count)"},{"line_number":2191,"context_line":"        self.assertTrue(mock_log.warning.called)"},{"line_number":2192,"context_line":""}],"source_content_type":"text/x-python","patch_set":29,"id":"fa6399be_cfc201e9","line":2189,"updated":"2016-10-13 21:06:10.000000000","message":"nit: dito","commit_id":"4b15a366c211acab4b31ea46eb70c2c669764f33"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"34d01d1ba197634e98820c43d262767a9241498f","unresolved":false,"context_lines":[{"line_number":2186,"context_line":"                          self.driver.get_serial_console,"},{"line_number":2187,"context_line":"                          self.ctx, self.instance)"},{"line_number":2188,"context_line":""},{"line_number":2189,"context_line":"        self.assertTrue(mock_node.get_console.call_count \u003e 1)"},{"line_number":2190,"context_line":"        self.assertEqual(2, mock_node.set_console_mode.call_count)"},{"line_number":2191,"context_line":"        self.assertTrue(mock_log.warning.called)"},{"line_number":2192,"context_line":""}],"source_content_type":"text/x-python","patch_set":29,"id":"fa6399be_610101af","line":2189,"in_reply_to":"fa6399be_cfc201e9","updated":"2016-10-14 03:04:05.000000000","message":"Done","commit_id":"4b15a366c211acab4b31ea46eb70c2c669764f33"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"fec44130de4d15a0f4c632c9eef6058d05aebd24","unresolved":false,"context_lines":[{"line_number":2205,"context_line":""},{"line_number":2206,"context_line":"        result \u003d self.driver.get_serial_console(self.ctx, self.instance)"},{"line_number":2207,"context_line":""},{"line_number":2208,"context_line":"        self.assertTrue(mock_node.get_console.call_count \u003e 1)"},{"line_number":2209,"context_line":"        self.assertEqual(2, mock_node.set_console_mode.call_count)"},{"line_number":2210,"context_line":"        self.assertIsInstance(result, console_type.ConsoleSerial)"},{"line_number":2211,"context_line":"        self.assertEqual(\u0027::1\u0027, result.host)"}],"source_content_type":"text/x-python","patch_set":29,"id":"fa6399be_0fb95979","line":2208,"updated":"2016-10-13 21:06:10.000000000","message":"nit: dito","commit_id":"4b15a366c211acab4b31ea46eb70c2c669764f33"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"34d01d1ba197634e98820c43d262767a9241498f","unresolved":false,"context_lines":[{"line_number":2205,"context_line":""},{"line_number":2206,"context_line":"        result \u003d self.driver.get_serial_console(self.ctx, self.instance)"},{"line_number":2207,"context_line":""},{"line_number":2208,"context_line":"        self.assertTrue(mock_node.get_console.call_count \u003e 1)"},{"line_number":2209,"context_line":"        self.assertEqual(2, mock_node.set_console_mode.call_count)"},{"line_number":2210,"context_line":"        self.assertIsInstance(result, console_type.ConsoleSerial)"},{"line_number":2211,"context_line":"        self.assertEqual(\u0027::1\u0027, result.host)"}],"source_content_type":"text/x-python","patch_set":29,"id":"fa6399be_41f87dc3","line":2208,"in_reply_to":"fa6399be_0fb95979","updated":"2016-10-14 03:04:05.000000000","message":"Done","commit_id":"4b15a366c211acab4b31ea46eb70c2c669764f33"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"fec44130de4d15a0f4c632c9eef6058d05aebd24","unresolved":false,"context_lines":[{"line_number":2228,"context_line":"                          self.driver.get_serial_console,"},{"line_number":2229,"context_line":"                          self.ctx, self.instance)"},{"line_number":2230,"context_line":""},{"line_number":2231,"context_line":"        self.assertTrue(mock_node.get_console.call_count \u003e 1)"},{"line_number":2232,"context_line":"        self.assertEqual(2, mock_node.set_console_mode.call_count)"}],"source_content_type":"text/x-python","patch_set":29,"id":"fa6399be_8fa56948","line":2231,"updated":"2016-10-13 21:06:10.000000000","message":"nit: dito","commit_id":"4b15a366c211acab4b31ea46eb70c2c669764f33"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"34d01d1ba197634e98820c43d262767a9241498f","unresolved":false,"context_lines":[{"line_number":2228,"context_line":"                          self.driver.get_serial_console,"},{"line_number":2229,"context_line":"                          self.ctx, self.instance)"},{"line_number":2230,"context_line":""},{"line_number":2231,"context_line":"        self.assertTrue(mock_node.get_console.call_count \u003e 1)"},{"line_number":2232,"context_line":"        self.assertEqual(2, mock_node.set_console_mode.call_count)"}],"source_content_type":"text/x-python","patch_set":29,"id":"fa6399be_21fb89c2","line":2231,"in_reply_to":"fa6399be_8fa56948","updated":"2016-10-14 03:04:05.000000000","message":"Done","commit_id":"4b15a366c211acab4b31ea46eb70c2c669764f33"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5dacf410394ee3dde572ee400c9b98d42af1a422","unresolved":false,"context_lines":[{"line_number":1984,"context_line":"                                                           mock_node):"},{"line_number":1985,"context_line":"        def _fake_log_debug(msg, *args, **kwargs):"},{"line_number":1986,"context_line":"            regex \u003d r\u0027Console is disabled for instance .*\u0027"},{"line_number":1987,"context_line":"            self.assertTrue(re.match(regex, msg),"},{"line_number":1988,"context_line":"                \u0027Expect log msg \"Console is disabled for instance \". \u0027"},{"line_number":1989,"context_line":"                \u0027Actual is \"%s\"\u0027 % msg)"},{"line_number":1990,"context_line":""},{"line_number":1991,"context_line":"        mock_node.get_console.return_value \u003d \\"},{"line_number":1992,"context_line":"            self._create_console_data(enabled\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":30,"id":"fa6399be_e716e84a","line":1989,"range":{"start_line":1987,"start_character":12,"end_line":1989,"end_character":39},"updated":"2016-10-14 15:17:31.000000000","message":"Sorry I don\u0027t mean to keep this thread going, but if we\u0027re going to do this, I\u0027d rather just see us use testtools.matchers.MatchesRegex, that also gives the nice error message:\n\nhttps://github.com/testing-cabal/testtools/blob/testtools-1.4.0/testtools/matchers/_basic.py#L318\n\nYou use the matcher with self.assertThat:\n\nhttps://github.com/testing-cabal/testtools/blob/testtools-1.4.0/testtools/testcase.py#L424","commit_id":"861161f01d21b141bd57ac2d5d4b4a6647e9701c"}],"nova/virt/ironic/driver.py":[{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"b48e19bf1e4b8c6d3d5cba5725836be63f5f8b8c","unresolved":false,"context_lines":[{"line_number":1175,"context_line":"        \"\"\""},{"line_number":1176,"context_line":"        node \u003d self._validate_instance_and_node(instance)"},{"line_number":1177,"context_line":"        try:"},{"line_number":1178,"context_line":"            node_uuid \u003d node.uuid"},{"line_number":1179,"context_line":"            console \u003d self.ironicclient.call(\"node.get_console\", node_uuid)"},{"line_number":1180,"context_line":""},{"line_number":1181,"context_line":"            if console[\"console_enabled\"]:"}],"source_content_type":"text/x-python","patch_set":1,"id":"7aa08908_d9186878","line":1178,"range":{"start_line":1178,"start_character":12,"end_line":1178,"end_character":33},"updated":"2016-06-15 19:29:49.000000000","message":"This line can be moved to outside(just after line 1176) of try-except block for small block.","commit_id":"8a586064b9db91aa98836033365ed00c7eee5b69"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"b7154480466280916b95d083135686e67401bf9d","unresolved":false,"context_lines":[{"line_number":1175,"context_line":"        \"\"\""},{"line_number":1176,"context_line":"        node \u003d self._validate_instance_and_node(instance)"},{"line_number":1177,"context_line":"        try:"},{"line_number":1178,"context_line":"            node_uuid \u003d node.uuid"},{"line_number":1179,"context_line":"            console \u003d self.ironicclient.call(\"node.get_console\", node_uuid)"},{"line_number":1180,"context_line":""},{"line_number":1181,"context_line":"            if console[\"console_enabled\"]:"}],"source_content_type":"text/x-python","patch_set":1,"id":"7aa08908_6fb997cb","line":1178,"range":{"start_line":1178,"start_character":12,"end_line":1178,"end_character":33},"in_reply_to":"7aa08908_d9186878","updated":"2016-06-16 05:39:27.000000000","message":"Thanks.","commit_id":"8a586064b9db91aa98836033365ed00c7eee5b69"},{"author":{"_account_id":7882,"name":"Yuiko Takada Mori","email":"yuiko-mori@nec.com","username":"YuikoTakada"},"change_message_id":"1f94cea872bd1eee31ef09b0c78a67490df5892c","unresolved":false,"context_lines":[{"line_number":1181,"context_line":"            if console[\"console_enabled\"]:"},{"line_number":1182,"context_line":"                # Disable Ironic serial console when already enabled because"},{"line_number":1183,"context_line":"                # usual serial consoles don\u0027t support multiple connection."},{"line_number":1184,"context_line":"                self.ironicclient.call(\"node.set_console_mode\", node_uuid,"},{"line_number":1185,"context_line":"                                       False)"},{"line_number":1186,"context_line":"                # And re-enable it"},{"line_number":1187,"context_line":"                self.ironicclient.call(\"node.set_console_mode\", node_uuid,"},{"line_number":1188,"context_line":"                                       True)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7aa08908_9409afdf","line":1185,"range":{"start_line":1184,"start_character":16,"end_line":1185,"end_character":45},"updated":"2016-06-15 06:20:29.000000000","message":"To set console mode takes some seconds because this is not sync. So I\u0027ve put\n\n time.sleep(5)\n\nbelow here. Otherwise, console will be returned as Null, so that exception will be raised.","commit_id":"8a586064b9db91aa98836033365ed00c7eee5b69"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"b7154480466280916b95d083135686e67401bf9d","unresolved":false,"context_lines":[{"line_number":1181,"context_line":"            if console[\"console_enabled\"]:"},{"line_number":1182,"context_line":"                # Disable Ironic serial console when already enabled because"},{"line_number":1183,"context_line":"                # usual serial consoles don\u0027t support multiple connection."},{"line_number":1184,"context_line":"                self.ironicclient.call(\"node.set_console_mode\", node_uuid,"},{"line_number":1185,"context_line":"                                       False)"},{"line_number":1186,"context_line":"                # And re-enable it"},{"line_number":1187,"context_line":"                self.ironicclient.call(\"node.set_console_mode\", node_uuid,"},{"line_number":1188,"context_line":"                                       True)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7aa08908_fad8a781","line":1185,"range":{"start_line":1184,"start_character":16,"end_line":1185,"end_character":45},"in_reply_to":"7aa08908_9409afdf","updated":"2016-06-16 05:39:27.000000000","message":"I can\u0027t reproduce the issue, it works well in my testing env. As I understand, RPC calls are synchronous. Putting a sleep(5) seems like a work around, and 5 seconds seem a little bit long.","commit_id":"8a586064b9db91aa98836033365ed00c7eee5b69"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"b48e19bf1e4b8c6d3d5cba5725836be63f5f8b8c","unresolved":false,"context_lines":[{"line_number":1181,"context_line":"            if console[\"console_enabled\"]:"},{"line_number":1182,"context_line":"                # Disable Ironic serial console when already enabled because"},{"line_number":1183,"context_line":"                # usual serial consoles don\u0027t support multiple connection."},{"line_number":1184,"context_line":"                self.ironicclient.call(\"node.set_console_mode\", node_uuid,"},{"line_number":1185,"context_line":"                                       False)"},{"line_number":1186,"context_line":"                # And re-enable it"},{"line_number":1187,"context_line":"                self.ironicclient.call(\"node.set_console_mode\", node_uuid,"},{"line_number":1188,"context_line":"                                       True)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7aa08908_9946e01f","line":1185,"range":{"start_line":1184,"start_character":16,"end_line":1185,"end_character":45},"in_reply_to":"7aa08908_9409afdf","updated":"2016-06-15 19:29:49.000000000","message":"This seems like a lock. Don\u0027t we need a rollback action(set True again) if an exception happens later?","commit_id":"8a586064b9db91aa98836033365ed00c7eee5b69"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"b7154480466280916b95d083135686e67401bf9d","unresolved":false,"context_lines":[{"line_number":1181,"context_line":"            if console[\"console_enabled\"]:"},{"line_number":1182,"context_line":"                # Disable Ironic serial console when already enabled because"},{"line_number":1183,"context_line":"                # usual serial consoles don\u0027t support multiple connection."},{"line_number":1184,"context_line":"                self.ironicclient.call(\"node.set_console_mode\", node_uuid,"},{"line_number":1185,"context_line":"                                       False)"},{"line_number":1186,"context_line":"                # And re-enable it"},{"line_number":1187,"context_line":"                self.ironicclient.call(\"node.set_console_mode\", node_uuid,"},{"line_number":1188,"context_line":"                                       True)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7aa08908_c76cefd2","line":1185,"range":{"start_line":1184,"start_character":16,"end_line":1185,"end_character":45},"in_reply_to":"7aa08908_9946e01f","updated":"2016-06-16 05:39:27.000000000","message":"Thanks, we may need that. I plan to extract the source code to a separated method, says _get_console_info(), with a handling for this situation.","commit_id":"8a586064b9db91aa98836033365ed00c7eee5b69"},{"author":{"_account_id":7882,"name":"Yuiko Takada Mori","email":"yuiko-mori@nec.com","username":"YuikoTakada"},"change_message_id":"09a078154318c59ddcd029b824c7497196b94234","unresolved":false,"context_lines":[{"line_number":1181,"context_line":"            if console[\"console_enabled\"]:"},{"line_number":1182,"context_line":"                # Disable Ironic serial console when already enabled because"},{"line_number":1183,"context_line":"                # usual serial consoles don\u0027t support multiple connection."},{"line_number":1184,"context_line":"                self.ironicclient.call(\"node.set_console_mode\", node_uuid,"},{"line_number":1185,"context_line":"                                       False)"},{"line_number":1186,"context_line":"                # And re-enable it"},{"line_number":1187,"context_line":"                self.ironicclient.call(\"node.set_console_mode\", node_uuid,"},{"line_number":1188,"context_line":"                                       True)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3aaa91ec_15466f7a","line":1185,"range":{"start_line":1184,"start_character":16,"end_line":1185,"end_character":45},"in_reply_to":"7aa08908_fad8a781","updated":"2016-06-27 00:07:00.000000000","message":"then, how about waiting until node.console_mode has been true like https://github.com/openstack/ironic/blob/master/ironic/drivers/modules/console_utils.py#L202-L230 ?","commit_id":"8a586064b9db91aa98836033365ed00c7eee5b69"},{"author":{"_account_id":7882,"name":"Yuiko Takada Mori","email":"yuiko-mori@nec.com","username":"YuikoTakada"},"change_message_id":"1f94cea872bd1eee31ef09b0c78a67490df5892c","unresolved":false,"context_lines":[{"line_number":1184,"context_line":"                self.ironicclient.call(\"node.set_console_mode\", node_uuid,"},{"line_number":1185,"context_line":"                                       False)"},{"line_number":1186,"context_line":"                # And re-enable it"},{"line_number":1187,"context_line":"                self.ironicclient.call(\"node.set_console_mode\", node_uuid,"},{"line_number":1188,"context_line":"                                       True)"},{"line_number":1189,"context_line":""},{"line_number":1190,"context_line":"                # Then acquire console information"},{"line_number":1191,"context_line":"                console \u003d self.ironicclient.call(\"node.get_console\", node_uuid)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7aa08908_f40c73ed","line":1188,"range":{"start_line":1187,"start_character":16,"end_line":1188,"end_character":44},"updated":"2016-06-15 06:20:29.000000000","message":"ditto. I\u0027ve put time.sleep(5) below here also, and it works well.","commit_id":"8a586064b9db91aa98836033365ed00c7eee5b69"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"b7154480466280916b95d083135686e67401bf9d","unresolved":false,"context_lines":[{"line_number":1184,"context_line":"                self.ironicclient.call(\"node.set_console_mode\", node_uuid,"},{"line_number":1185,"context_line":"                                       False)"},{"line_number":1186,"context_line":"                # And re-enable it"},{"line_number":1187,"context_line":"                self.ironicclient.call(\"node.set_console_mode\", node_uuid,"},{"line_number":1188,"context_line":"                                       True)"},{"line_number":1189,"context_line":""},{"line_number":1190,"context_line":"                # Then acquire console information"},{"line_number":1191,"context_line":"                console \u003d self.ironicclient.call(\"node.get_console\", node_uuid)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7aa08908_07aef7e6","line":1188,"range":{"start_line":1187,"start_character":16,"end_line":1188,"end_character":44},"in_reply_to":"7aa08908_f40c73ed","updated":"2016-06-16 05:39:27.000000000","message":"Please see my prev answer.","commit_id":"8a586064b9db91aa98836033365ed00c7eee5b69"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"b48e19bf1e4b8c6d3d5cba5725836be63f5f8b8c","unresolved":false,"context_lines":[{"line_number":1217,"context_line":"                LOG.warning(_LW(\u0027Socat serial console only supports \"tcp\".\u0027),"},{"line_number":1218,"context_line":"                            instance\u003dinstance)"},{"line_number":1219,"context_line":"                raise exception.ConsoleTypeUnavailable(console_type\u003d\u0027serial\u0027)"},{"line_number":1220,"context_line":"        else:  # Other console types"},{"line_number":1221,"context_line":"            LOG.warning(_LW(\u0027Console type \"%s\" does not support Nova \u0027"},{"line_number":1222,"context_line":"                            \u0027serial console\u0027), console_info[\"type\"],"},{"line_number":1223,"context_line":"                        instance\u003dinstance)"},{"line_number":1224,"context_line":"            raise exception.ConsoleTypeUnavailable(console_type\u003d\u0027serial\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7aa08908_39b88ce8","line":1224,"range":{"start_line":1220,"start_character":0,"end_line":1224,"end_character":73},"updated":"2016-06-15 19:29:49.000000000","message":"it is nice to move this block before(line 1205) like\n\n if console_info[\"type\"] !\u003d \"socat\":\n     LOG.warning(_LW(\u0027Console type \"%s\" does not support Nova \u0027\n     ...\n\n try:\n    url \u003d urlparse.urlparse(console_info[\"url\"], \"\")\n    ...\n\nfor less indents.","commit_id":"8a586064b9db91aa98836033365ed00c7eee5b69"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"b7154480466280916b95d083135686e67401bf9d","unresolved":false,"context_lines":[{"line_number":1217,"context_line":"                LOG.warning(_LW(\u0027Socat serial console only supports \"tcp\".\u0027),"},{"line_number":1218,"context_line":"                            instance\u003dinstance)"},{"line_number":1219,"context_line":"                raise exception.ConsoleTypeUnavailable(console_type\u003d\u0027serial\u0027)"},{"line_number":1220,"context_line":"        else:  # Other console types"},{"line_number":1221,"context_line":"            LOG.warning(_LW(\u0027Console type \"%s\" does not support Nova \u0027"},{"line_number":1222,"context_line":"                            \u0027serial console\u0027), console_info[\"type\"],"},{"line_number":1223,"context_line":"                        instance\u003dinstance)"},{"line_number":1224,"context_line":"            raise exception.ConsoleTypeUnavailable(console_type\u003d\u0027serial\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7aa08908_271cd3c0","line":1224,"range":{"start_line":1220,"start_character":0,"end_line":1224,"end_character":73},"in_reply_to":"7aa08908_39b88ce8","updated":"2016-06-16 05:39:27.000000000","message":"OK.","commit_id":"8a586064b9db91aa98836033365ed00c7eee5b69"},{"author":{"_account_id":7882,"name":"Yuiko Takada Mori","email":"yuiko-mori@nec.com","username":"YuikoTakada"},"change_message_id":"fcbd695df7ad1ba609cf162f17bad3d450fe7176","unresolved":false,"context_lines":[{"line_number":1204,"context_line":"                result[\u0027error\u0027] \u003d error"},{"line_number":1205,"context_line":"                raise loopingcall.LoopingCallDone()"},{"line_number":1206,"context_line":""},{"line_number":1207,"context_line":"        def _set_console(mode):"},{"line_number":1208,"context_line":"            try:"},{"line_number":1209,"context_line":"                self.ironicclient.call(\u0027node.set_console_mode\u0027, node_uuid,"},{"line_number":1210,"context_line":"                                       mode)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3aaa91ec_646623ee","line":1207,"range":{"start_line":1207,"start_character":12,"end_line":1207,"end_character":24},"updated":"2016-06-27 06:33:25.000000000","message":"nit: it seems better s/_set_console/_set_serial_console_mode considering to support VNC in the future","commit_id":"de56478f1df7280a7d3d19e30c773e289850498e"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"ef420134961ba6e386e2d119726025d410273b91","unresolved":false,"context_lines":[{"line_number":1204,"context_line":"                result[\u0027error\u0027] \u003d error"},{"line_number":1205,"context_line":"                raise loopingcall.LoopingCallDone()"},{"line_number":1206,"context_line":""},{"line_number":1207,"context_line":"        def _set_console(mode):"},{"line_number":1208,"context_line":"            try:"},{"line_number":1209,"context_line":"                self.ironicclient.call(\u0027node.set_console_mode\u0027, node_uuid,"},{"line_number":1210,"context_line":"                                       mode)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3aaa91ec_ded646c2","line":1207,"range":{"start_line":1207,"start_character":12,"end_line":1207,"end_character":24},"in_reply_to":"3aaa91ec_46d2cf35","updated":"2016-06-29 05:31:55.000000000","message":"Done","commit_id":"de56478f1df7280a7d3d19e30c773e289850498e"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"58bfbd50898af620b684cf222ce8df2c360efc45","unresolved":false,"context_lines":[{"line_number":1204,"context_line":"                result[\u0027error\u0027] \u003d error"},{"line_number":1205,"context_line":"                raise loopingcall.LoopingCallDone()"},{"line_number":1206,"context_line":""},{"line_number":1207,"context_line":"        def _set_console(mode):"},{"line_number":1208,"context_line":"            try:"},{"line_number":1209,"context_line":"                self.ironicclient.call(\u0027node.set_console_mode\u0027, node_uuid,"},{"line_number":1210,"context_line":"                                       mode)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3aaa91ec_eb8f46ca","line":1207,"range":{"start_line":1207,"start_character":12,"end_line":1207,"end_character":24},"in_reply_to":"3aaa91ec_646623ee","updated":"2016-06-28 03:52:03.000000000","message":"I think this name is ok because it\u0027s just an inner function. If change, I prefer \"_set_console_mode\" due to the actual call \"node.set_console_mode\".","commit_id":"de56478f1df7280a7d3d19e30c773e289850498e"},{"author":{"_account_id":7882,"name":"Yuiko Takada Mori","email":"yuiko-mori@nec.com","username":"YuikoTakada"},"change_message_id":"608773a6955fa5c6ae30970cef5b26598d5e8731","unresolved":false,"context_lines":[{"line_number":1204,"context_line":"                result[\u0027error\u0027] \u003d error"},{"line_number":1205,"context_line":"                raise loopingcall.LoopingCallDone()"},{"line_number":1206,"context_line":""},{"line_number":1207,"context_line":"        def _set_console(mode):"},{"line_number":1208,"context_line":"            try:"},{"line_number":1209,"context_line":"                self.ironicclient.call(\u0027node.set_console_mode\u0027, node_uuid,"},{"line_number":1210,"context_line":"                                       mode)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3aaa91ec_46d2cf35","line":1207,"range":{"start_line":1207,"start_character":12,"end_line":1207,"end_character":24},"in_reply_to":"3aaa91ec_eb8f46ca","updated":"2016-06-28 04:14:21.000000000","message":"As you say, _set_console_mode is better :)","commit_id":"de56478f1df7280a7d3d19e30c773e289850498e"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"59281ffb7b8bd2464efe2de07cd66dadec5fdb81","unresolved":false,"context_lines":[{"line_number":1281,"context_line":"            raise exception.ConsoleTypeUnavailable(console_type\u003d\u0027serial\u0027)"},{"line_number":1282,"context_line":""},{"line_number":1283,"context_line":"        try:"},{"line_number":1284,"context_line":"            url \u003d urlparse.urlparse(console_info[\"url\"], \"\")"},{"line_number":1285,"context_line":"        except AttributeError:"},{"line_number":1286,"context_line":"            LOG.warning(_LW(\u0027Socat console url is invalid.\u0027),"},{"line_number":1287,"context_line":"                        instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3aaa91ec_4625afac","line":1284,"range":{"start_line":1284,"start_character":57,"end_line":1284,"end_character":59},"updated":"2016-06-28 03:57:07.000000000","message":"this is not needed, schema by default is empty string.","commit_id":"b490603c380107f59c463788f19a51852921a484"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"22ed79b5a8c0bf733c66b982957a7da7be8bda69","unresolved":false,"context_lines":[{"line_number":1281,"context_line":"            raise exception.ConsoleTypeUnavailable(console_type\u003d\u0027serial\u0027)"},{"line_number":1282,"context_line":""},{"line_number":1283,"context_line":"        try:"},{"line_number":1284,"context_line":"            url \u003d urlparse.urlparse(console_info[\"url\"], \"\")"},{"line_number":1285,"context_line":"        except AttributeError:"},{"line_number":1286,"context_line":"            LOG.warning(_LW(\u0027Socat console url is invalid.\u0027),"},{"line_number":1287,"context_line":"                        instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3aaa91ec_63bcd66c","line":1284,"range":{"start_line":1284,"start_character":57,"end_line":1284,"end_character":59},"in_reply_to":"3aaa91ec_4625afac","updated":"2016-06-29 08:36:04.000000000","message":"Done","commit_id":"b490603c380107f59c463788f19a51852921a484"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"59281ffb7b8bd2464efe2de07cd66dadec5fdb81","unresolved":false,"context_lines":[{"line_number":1291,"context_line":"            return console_type.ConsoleSerial(host\u003durl.hostname,"},{"line_number":1292,"context_line":"                                              port\u003durl.port)"},{"line_number":1293,"context_line":"        else:"},{"line_number":1294,"context_line":"            LOG.warning(_LW(\u0027Socat serial console only supports \"tcp\".\u0027),"},{"line_number":1295,"context_line":"                        instance\u003dinstance)"},{"line_number":1296,"context_line":"            raise exception.ConsoleTypeUnavailable(console_type\u003d\u0027serial\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3aaa91ec_c6399fda","line":1294,"range":{"start_line":1294,"start_character":28,"end_line":1294,"end_character":71},"updated":"2016-06-28 03:57:07.000000000","message":"(\u0027Invalid url schema \"%s\". Socat serial console only supports \"tcp\". \u0027), url.scheme","commit_id":"b490603c380107f59c463788f19a51852921a484"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"22ed79b5a8c0bf733c66b982957a7da7be8bda69","unresolved":false,"context_lines":[{"line_number":1291,"context_line":"            return console_type.ConsoleSerial(host\u003durl.hostname,"},{"line_number":1292,"context_line":"                                              port\u003durl.port)"},{"line_number":1293,"context_line":"        else:"},{"line_number":1294,"context_line":"            LOG.warning(_LW(\u0027Socat serial console only supports \"tcp\".\u0027),"},{"line_number":1295,"context_line":"                        instance\u003dinstance)"},{"line_number":1296,"context_line":"            raise exception.ConsoleTypeUnavailable(console_type\u003d\u0027serial\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3aaa91ec_fedb42eb","line":1294,"range":{"start_line":1294,"start_character":28,"end_line":1294,"end_character":71},"in_reply_to":"3aaa91ec_c6399fda","updated":"2016-06-29 08:36:04.000000000","message":"Done","commit_id":"b490603c380107f59c463788f19a51852921a484"},{"author":{"_account_id":7882,"name":"Yuiko Takada Mori","email":"yuiko-mori@nec.com","username":"YuikoTakada"},"change_message_id":"f4d6ec212a3ffe8e4fc5fadc0d11db99a47162ba","unresolved":false,"context_lines":[{"line_number":1281,"context_line":"            raise exception.ConsoleTypeUnavailable(console_type\u003d\u0027serial\u0027)"},{"line_number":1282,"context_line":""},{"line_number":1283,"context_line":"        try:"},{"line_number":1284,"context_line":"            url \u003d urlparse.urlparse(console_info[\"url\"], \"\")"},{"line_number":1285,"context_line":"        except AttributeError:"},{"line_number":1286,"context_line":"            LOG.warning(_LW(\u0027Socat console url is invalid.\u0027),"},{"line_number":1287,"context_line":"                        instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":4,"id":"3aaa91ec_beb6da87","line":1284,"range":{"start_line":1284,"start_character":57,"end_line":1284,"end_character":59},"updated":"2016-06-29 05:22:41.000000000","message":"Could you please fix here as Ghanshyam commented in previous patch set?","commit_id":"178d94b6834be1e11da1de1ff6cdf08a910ab612"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"5297bfc816a4828cb657731288e0e9bfe288d527","unresolved":false,"context_lines":[{"line_number":1165,"context_line":"        return None"},{"line_number":1166,"context_line":""},{"line_number":1167,"context_line":"    def _get_console_info(self, instance, reset_console\u003dFalse):"},{"line_number":1168,"context_line":"        \"\"\"Acquire console information for an instance."},{"line_number":1169,"context_line":""},{"line_number":1170,"context_line":"        :param instance: nova instance"},{"line_number":1171,"context_line":"        :param reset_console: if True, reset the console when the console"}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_ee11b153","line":1168,"updated":"2016-06-29 16:12:08.000000000","message":"This method is called _get_console_info() so I am a bit lost as to why you\u0027re trying to enable it only if reset_console is set to True.\n\nMaybe it is _get_console() ?","commit_id":"b480de8dd3fdfea21cb532a004f6aada77721cd5"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"ebe242cc38f30229c82d0bd1c5d6502f358c3d11","unresolved":false,"context_lines":[{"line_number":1165,"context_line":"        return None"},{"line_number":1166,"context_line":""},{"line_number":1167,"context_line":"    def _get_console_info(self, instance, reset_console\u003dFalse):"},{"line_number":1168,"context_line":"        \"\"\"Acquire console information for an instance."},{"line_number":1169,"context_line":""},{"line_number":1170,"context_line":"        :param instance: nova instance"},{"line_number":1171,"context_line":"        :param reset_console: if True, reset the console when the console"}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_95b3c24c","line":1168,"in_reply_to":"3aaa91ec_ee11b153","updated":"2016-06-30 03:39:11.000000000","message":"It is actually _get_console_info(), because it returns console[\u0027console_info\u0027] when console[\u0027console_enabled\u0027] is True. For what you are concerning about, please see the below answers.","commit_id":"b480de8dd3fdfea21cb532a004f6aada77721cd5"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"5297bfc816a4828cb657731288e0e9bfe288d527","unresolved":false,"context_lines":[{"line_number":1184,"context_line":"                    ironic.exc.InternalServerError,  # Validations"},{"line_number":1185,"context_line":"                    ironic.exc.BadRequest) as e:  # Maintenance"},{"line_number":1186,"context_line":"                msg \u003d (_LW(\u0027Failed to request Ironic to acquire console \u0027"},{"line_number":1187,"context_line":"                           \u0027%(inst)s: %(reason)s\u0027) %"},{"line_number":1188,"context_line":"                       {\u0027inst\u0027: instance.uuid,"},{"line_number":1189,"context_line":"                        \u0027reason\u0027: six.text_type(e)})"},{"line_number":1190,"context_line":"                LOG.warning(msg)"}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_cd931e5a","line":1187,"updated":"2016-06-29 16:12:08.000000000","message":"s/console/console information for instance /\n\nactually, this might be grammatically better, if you want to mention that it was the ironic request.\n\n    Ironic request failed, to acquire ...\n\nBut would it be sufficient to do:\n    Failed to acquire console information ...","commit_id":"b480de8dd3fdfea21cb532a004f6aada77721cd5"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"ebe242cc38f30229c82d0bd1c5d6502f358c3d11","unresolved":false,"context_lines":[{"line_number":1184,"context_line":"                    ironic.exc.InternalServerError,  # Validations"},{"line_number":1185,"context_line":"                    ironic.exc.BadRequest) as e:  # Maintenance"},{"line_number":1186,"context_line":"                msg \u003d (_LW(\u0027Failed to request Ironic to acquire console \u0027"},{"line_number":1187,"context_line":"                           \u0027%(inst)s: %(reason)s\u0027) %"},{"line_number":1188,"context_line":"                       {\u0027inst\u0027: instance.uuid,"},{"line_number":1189,"context_line":"                        \u0027reason\u0027: six.text_type(e)})"},{"line_number":1190,"context_line":"                LOG.warning(msg)"}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_75de166e","line":1187,"in_reply_to":"3aaa91ec_cd931e5a","updated":"2016-06-30 03:39:11.000000000","message":"Done","commit_id":"b480de8dd3fdfea21cb532a004f6aada77721cd5"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"5297bfc816a4828cb657731288e0e9bfe288d527","unresolved":false,"context_lines":[{"line_number":1196,"context_line":"                raise loopingcall.LoopingCallDone()"},{"line_number":1197,"context_line":""},{"line_number":1198,"context_line":"            if time.time() \u003e expiration:"},{"line_number":1199,"context_line":"                error \u003d (_LW(\u0027Timeout while waiting for console mode \u0027"},{"line_number":1200,"context_line":"                             \u0027\"%(mode)s\" on node %(node)s\u0027) %"},{"line_number":1201,"context_line":"                         {\u0027mode\u0027: str(state),"},{"line_number":1202,"context_line":"                          \u0027node\u0027: node_uuid})"}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_28ef30ea","line":1199,"updated":"2016-06-29 16:12:08.000000000","message":"s/mode/mode to be set to /","commit_id":"b480de8dd3fdfea21cb532a004f6aada77721cd5"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"ebe242cc38f30229c82d0bd1c5d6502f358c3d11","unresolved":false,"context_lines":[{"line_number":1196,"context_line":"                raise loopingcall.LoopingCallDone()"},{"line_number":1197,"context_line":""},{"line_number":1198,"context_line":"            if time.time() \u003e expiration:"},{"line_number":1199,"context_line":"                error \u003d (_LW(\u0027Timeout while waiting for console mode \u0027"},{"line_number":1200,"context_line":"                             \u0027\"%(mode)s\" on node %(node)s\u0027) %"},{"line_number":1201,"context_line":"                         {\u0027mode\u0027: str(state),"},{"line_number":1202,"context_line":"                          \u0027node\u0027: node_uuid})"}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_75c5768c","line":1199,"in_reply_to":"3aaa91ec_28ef30ea","updated":"2016-06-30 03:39:11.000000000","message":"Done","commit_id":"b480de8dd3fdfea21cb532a004f6aada77721cd5"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"5297bfc816a4828cb657731288e0e9bfe288d527","unresolved":false,"context_lines":[{"line_number":1220,"context_line":"                if result[\u0027error\u0027] is not None:"},{"line_number":1221,"context_line":"                    raise exception.ConsoleNotAvailable()"},{"line_number":1222,"context_line":""},{"line_number":1223,"context_line":"            except (exception.NovaException,  # Retry failed"},{"line_number":1224,"context_line":"                    ironic.exc.InternalServerError,  # Validations"},{"line_number":1225,"context_line":"                    ironic.exc.BadRequest) as e:  # Maintenance"},{"line_number":1226,"context_line":"                msg \u003d (_LW(\u0027Failed to request Ironic to set console mode \u0027"}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_c8930c5a","line":1223,"updated":"2016-06-29 16:12:08.000000000","message":"If this is only related to the self.ironicclient.call() in line 1209, I\u0027d prefer if you moved this up.\n\nIf it is not only related to that call, then I\u0027d prefer if you split it up to have two try/excepts. (And looking at this, it seems like _wait_state could cause exception.ConsoleNotAvailable() to be raised, so it doesn\u0027t make sense to catch that here.","commit_id":"b480de8dd3fdfea21cb532a004f6aada77721cd5"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"ebe242cc38f30229c82d0bd1c5d6502f358c3d11","unresolved":false,"context_lines":[{"line_number":1220,"context_line":"                if result[\u0027error\u0027] is not None:"},{"line_number":1221,"context_line":"                    raise exception.ConsoleNotAvailable()"},{"line_number":1222,"context_line":""},{"line_number":1223,"context_line":"            except (exception.NovaException,  # Retry failed"},{"line_number":1224,"context_line":"                    ironic.exc.InternalServerError,  # Validations"},{"line_number":1225,"context_line":"                    ironic.exc.BadRequest) as e:  # Maintenance"},{"line_number":1226,"context_line":"                msg \u003d (_LW(\u0027Failed to request Ironic to set console mode \u0027"}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_15435214","line":1223,"in_reply_to":"3aaa91ec_c8930c5a","updated":"2016-06-30 03:39:11.000000000","message":"Done","commit_id":"b480de8dd3fdfea21cb532a004f6aada77721cd5"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"5297bfc816a4828cb657731288e0e9bfe288d527","unresolved":false,"context_lines":[{"line_number":1224,"context_line":"                    ironic.exc.InternalServerError,  # Validations"},{"line_number":1225,"context_line":"                    ironic.exc.BadRequest) as e:  # Maintenance"},{"line_number":1226,"context_line":"                msg \u003d (_LW(\u0027Failed to request Ironic to set console mode \u0027"},{"line_number":1227,"context_line":"                           \u0027%(inst)s: %(reason)s\u0027) %"},{"line_number":1228,"context_line":"                       {\u0027inst\u0027: instance.uuid,"},{"line_number":1229,"context_line":"                        \u0027reason\u0027: six.text_type(e)})"},{"line_number":1230,"context_line":"                LOG.warning(msg)"}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_28d9f022","line":1227,"updated":"2016-06-29 16:12:08.000000000","message":"would be good to know what mode you\u0027re trying to set it to.","commit_id":"b480de8dd3fdfea21cb532a004f6aada77721cd5"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"ebe242cc38f30229c82d0bd1c5d6502f358c3d11","unresolved":false,"context_lines":[{"line_number":1224,"context_line":"                    ironic.exc.InternalServerError,  # Validations"},{"line_number":1225,"context_line":"                    ironic.exc.BadRequest) as e:  # Maintenance"},{"line_number":1226,"context_line":"                msg \u003d (_LW(\u0027Failed to request Ironic to set console mode \u0027"},{"line_number":1227,"context_line":"                           \u0027%(inst)s: %(reason)s\u0027) %"},{"line_number":1228,"context_line":"                       {\u0027inst\u0027: instance.uuid,"},{"line_number":1229,"context_line":"                        \u0027reason\u0027: six.text_type(e)})"},{"line_number":1230,"context_line":"                LOG.warning(msg)"}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_d5638aaf","line":1227,"in_reply_to":"3aaa91ec_28d9f022","updated":"2016-06-30 03:39:11.000000000","message":"Done","commit_id":"b480de8dd3fdfea21cb532a004f6aada77721cd5"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"5297bfc816a4828cb657731288e0e9bfe288d527","unresolved":false,"context_lines":[{"line_number":1233,"context_line":"        # Acquire the console"},{"line_number":1234,"context_line":"        console \u003d _get_console()"},{"line_number":1235,"context_line":""},{"line_number":1236,"context_line":"        # NOTE: Resetting console is a workaround for force acquiring"},{"line_number":1237,"context_line":"        # console when it is acquired by another user/operator."},{"line_number":1238,"context_line":"        # IPMI serial console does not support multi session, so"},{"line_number":1239,"context_line":"        # resetting console will deactivate any active one without"}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_0d724611","line":1236,"updated":"2016-06-29 16:12:08.000000000","message":"s/for/to/","commit_id":"b480de8dd3fdfea21cb532a004f6aada77721cd5"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"ebe242cc38f30229c82d0bd1c5d6502f358c3d11","unresolved":false,"context_lines":[{"line_number":1233,"context_line":"        # Acquire the console"},{"line_number":1234,"context_line":"        console \u003d _get_console()"},{"line_number":1235,"context_line":""},{"line_number":1236,"context_line":"        # NOTE: Resetting console is a workaround for force acquiring"},{"line_number":1237,"context_line":"        # console when it is acquired by another user/operator."},{"line_number":1238,"context_line":"        # IPMI serial console does not support multi session, so"},{"line_number":1239,"context_line":"        # resetting console will deactivate any active one without"}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_95c2a251","line":1236,"in_reply_to":"3aaa91ec_0d724611","updated":"2016-06-30 03:39:11.000000000","message":"Done","commit_id":"b480de8dd3fdfea21cb532a004f6aada77721cd5"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"5297bfc816a4828cb657731288e0e9bfe288d527","unresolved":false,"context_lines":[{"line_number":1234,"context_line":"        console \u003d _get_console()"},{"line_number":1235,"context_line":""},{"line_number":1236,"context_line":"        # NOTE: Resetting console is a workaround for force acquiring"},{"line_number":1237,"context_line":"        # console when it is acquired by another user/operator."},{"line_number":1238,"context_line":"        # IPMI serial console does not support multi session, so"},{"line_number":1239,"context_line":"        # resetting console will deactivate any active one without"},{"line_number":1240,"context_line":"        # warning the operator."}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_0de08695","line":1237,"updated":"2016-06-29 16:12:08.000000000","message":"s/is/has already been/","commit_id":"b480de8dd3fdfea21cb532a004f6aada77721cd5"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"ebe242cc38f30229c82d0bd1c5d6502f358c3d11","unresolved":false,"context_lines":[{"line_number":1234,"context_line":"        console \u003d _get_console()"},{"line_number":1235,"context_line":""},{"line_number":1236,"context_line":"        # NOTE: Resetting console is a workaround for force acquiring"},{"line_number":1237,"context_line":"        # console when it is acquired by another user/operator."},{"line_number":1238,"context_line":"        # IPMI serial console does not support multi session, so"},{"line_number":1239,"context_line":"        # resetting console will deactivate any active one without"},{"line_number":1240,"context_line":"        # warning the operator."}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_7596164d","line":1237,"in_reply_to":"3aaa91ec_0de08695","updated":"2016-06-30 03:39:11.000000000","message":"Done","commit_id":"b480de8dd3fdfea21cb532a004f6aada77721cd5"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"5297bfc816a4828cb657731288e0e9bfe288d527","unresolved":false,"context_lines":[{"line_number":1237,"context_line":"        # console when it is acquired by another user/operator."},{"line_number":1238,"context_line":"        # IPMI serial console does not support multi session, so"},{"line_number":1239,"context_line":"        # resetting console will deactivate any active one without"},{"line_number":1240,"context_line":"        # warning the operator."},{"line_number":1241,"context_line":"        if reset_console and console[\u0027console_enabled\u0027]:"},{"line_number":1242,"context_line":"            try:"},{"line_number":1243,"context_line":"                # Disable console"}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_6e7f81e0","line":1240,"updated":"2016-06-29 16:12:08.000000000","message":"I\u0027m not convinced about this. But I don\u0027t know much about horizon and nova and how the user interacts with them.\n\nIf user gets a console via horizon, can the same user request a console for the same instance again via horizon? (because eg they were impatient and click on some button, or they don\u0027t remember that they have a console and click on some button or ...).\n\nAnd if another user has access to the console, wouldn\u0027t it be a better user experience to return a message saying that the console is already being used or something, instead of cutting off the other user?","commit_id":"b480de8dd3fdfea21cb532a004f6aada77721cd5"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"ebe242cc38f30229c82d0bd1c5d6502f358c3d11","unresolved":false,"context_lines":[{"line_number":1237,"context_line":"        # console when it is acquired by another user/operator."},{"line_number":1238,"context_line":"        # IPMI serial console does not support multi session, so"},{"line_number":1239,"context_line":"        # resetting console will deactivate any active one without"},{"line_number":1240,"context_line":"        # warning the operator."},{"line_number":1241,"context_line":"        if reset_console and console[\u0027console_enabled\u0027]:"},{"line_number":1242,"context_line":"            try:"},{"line_number":1243,"context_line":"                # Disable console"}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_ca82c851","line":1240,"in_reply_to":"3aaa91ec_6e7f81e0","updated":"2016-06-30 03:39:11.000000000","message":"This serial console is based on IPMI serial-over-lan, it has a limitation is that it does not support multi-session. So if an user acquires the console, another user cannot have it. The current user even cannot open another console window until closing the active one.\n\nBut it seems there is an issue with ipmitool is that when the active console is closed, user sometimes still unable to open a new console. That\u0027s why I add the option \"reset_console\", in \"reset_console\" step, \"ipmitool sol deactivate\" will be called, then user can open a new console. But the disadvantage of this workaround is it a \"force acquiring\" method.","commit_id":"b480de8dd3fdfea21cb532a004f6aada77721cd5"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"5297bfc816a4828cb657731288e0e9bfe288d527","unresolved":false,"context_lines":[{"line_number":1246,"context_line":"                _set_console_mode(True)"},{"line_number":1247,"context_line":"            except Exception:"},{"line_number":1248,"context_line":"                # NOTE: We try to do recover on failure."},{"line_number":1249,"context_line":"                # But if recover fails, the console may remains in"},{"line_number":1250,"context_line":"                # \"disabled\" state and cause any new connection"},{"line_number":1251,"context_line":"                # will be refused."},{"line_number":1252,"context_line":"                _set_console_mode(True)"}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_6d4b0a88","line":1249,"updated":"2016-06-29 16:12:08.000000000","message":"s/remains/remain/","commit_id":"b480de8dd3fdfea21cb532a004f6aada77721cd5"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"ebe242cc38f30229c82d0bd1c5d6502f358c3d11","unresolved":false,"context_lines":[{"line_number":1246,"context_line":"                _set_console_mode(True)"},{"line_number":1247,"context_line":"            except Exception:"},{"line_number":1248,"context_line":"                # NOTE: We try to do recover on failure."},{"line_number":1249,"context_line":"                # But if recover fails, the console may remains in"},{"line_number":1250,"context_line":"                # \"disabled\" state and cause any new connection"},{"line_number":1251,"context_line":"                # will be refused."},{"line_number":1252,"context_line":"                _set_console_mode(True)"}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_b59cfe6a","line":1249,"in_reply_to":"3aaa91ec_6d4b0a88","updated":"2016-06-30 03:39:11.000000000","message":"Done","commit_id":"b480de8dd3fdfea21cb532a004f6aada77721cd5"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"5297bfc816a4828cb657731288e0e9bfe288d527","unresolved":false,"context_lines":[{"line_number":1249,"context_line":"                # But if recover fails, the console may remains in"},{"line_number":1250,"context_line":"                # \"disabled\" state and cause any new connection"},{"line_number":1251,"context_line":"                # will be refused."},{"line_number":1252,"context_line":"                _set_console_mode(True)"},{"line_number":1253,"context_line":""},{"line_number":1254,"context_line":"            # Then re-acquire console"},{"line_number":1255,"context_line":"            console \u003d _get_console()"}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_a88040c0","line":1252,"updated":"2016-06-29 16:12:08.000000000","message":"I\u0027m not crazy about this. At this point, you don\u0027t know if the _set_console_mode(False) or the _set_console_mode(True) failed. If _set_console_mode(True) failed, why would we want to call it again?","commit_id":"b480de8dd3fdfea21cb532a004f6aada77721cd5"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"ebe242cc38f30229c82d0bd1c5d6502f358c3d11","unresolved":false,"context_lines":[{"line_number":1249,"context_line":"                # But if recover fails, the console may remains in"},{"line_number":1250,"context_line":"                # \"disabled\" state and cause any new connection"},{"line_number":1251,"context_line":"                # will be refused."},{"line_number":1252,"context_line":"                _set_console_mode(True)"},{"line_number":1253,"context_line":""},{"line_number":1254,"context_line":"            # Then re-acquire console"},{"line_number":1255,"context_line":"            console \u003d _get_console()"}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_a7d85554","line":1252,"in_reply_to":"3aaa91ec_a88040c0","updated":"2016-06-30 03:39:11.000000000","message":"Actually, I want to do recover for the case _set_console_mode(True) fails. Because if it fails, with the current behavior, the operator won\u0027t be able to acquire the console anymore until it is set to \"On\" manually. I think there is a risk here with this behavior.","commit_id":"b480de8dd3fdfea21cb532a004f6aada77721cd5"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"5297bfc816a4828cb657731288e0e9bfe288d527","unresolved":false,"context_lines":[{"line_number":1252,"context_line":"                _set_console_mode(True)"},{"line_number":1253,"context_line":""},{"line_number":1254,"context_line":"            # Then re-acquire console"},{"line_number":1255,"context_line":"            console \u003d _get_console()"},{"line_number":1256,"context_line":""},{"line_number":1257,"context_line":"        if console[\u0027console_enabled\u0027]:"},{"line_number":1258,"context_line":"            return console[\u0027console_info\u0027]"}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_a8b32099","line":1255,"updated":"2016-06-29 16:12:08.000000000","message":"why don\u0027t you just get the console information from _set_console_mode()? I mean, have _set_console_mode() return the console. That would avoid making another call to ironic.","commit_id":"b480de8dd3fdfea21cb532a004f6aada77721cd5"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"ebe242cc38f30229c82d0bd1c5d6502f358c3d11","unresolved":false,"context_lines":[{"line_number":1252,"context_line":"                _set_console_mode(True)"},{"line_number":1253,"context_line":""},{"line_number":1254,"context_line":"            # Then re-acquire console"},{"line_number":1255,"context_line":"            console \u003d _get_console()"},{"line_number":1256,"context_line":""},{"line_number":1257,"context_line":"        if console[\u0027console_enabled\u0027]:"},{"line_number":1258,"context_line":"            return console[\u0027console_info\u0027]"}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_757d761b","line":1255,"in_reply_to":"3aaa91ec_a8b32099","updated":"2016-06-30 03:39:11.000000000","message":"Done","commit_id":"b480de8dd3fdfea21cb532a004f6aada77721cd5"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"612d4494f3baa8e099569f7d856671dde12fd662","unresolved":false,"context_lines":[{"line_number":1257,"context_line":"        if console[\u0027console_enabled\u0027]:"},{"line_number":1258,"context_line":"            return console[\u0027console_info\u0027]"},{"line_number":1259,"context_line":"        else:"},{"line_number":1260,"context_line":"            raise exception.ConsoleNotAvailable()"},{"line_number":1261,"context_line":""},{"line_number":1262,"context_line":"    def get_serial_console(self, context, instance):"},{"line_number":1263,"context_line":"        \"\"\"Acquire serial console information."}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_8f5ac381","line":1260,"updated":"2016-06-29 10:07:00.000000000","message":"In case console mode is Off, an exception will be raised, so console will not be available on Horizon. Yuiko Takada Mori has commented about this issue. I re-mention it here and would like to hear opinions from you guys. Should we change console mode from Off -\u003e On before in this case?\nThanks.","commit_id":"b480de8dd3fdfea21cb532a004f6aada77721cd5"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"5297bfc816a4828cb657731288e0e9bfe288d527","unresolved":false,"context_lines":[{"line_number":1257,"context_line":"        if console[\u0027console_enabled\u0027]:"},{"line_number":1258,"context_line":"            return console[\u0027console_info\u0027]"},{"line_number":1259,"context_line":"        else:"},{"line_number":1260,"context_line":"            raise exception.ConsoleNotAvailable()"},{"line_number":1261,"context_line":""},{"line_number":1262,"context_line":"    def get_serial_console(self, context, instance):"},{"line_number":1263,"context_line":"        \"\"\"Acquire serial console information."}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_eef7f1d0","line":1260,"in_reply_to":"3aaa91ec_8f5ac381","updated":"2016-06-29 16:12:08.000000000","message":"I\u0027m a bit lost here. Is there another place where the console will be enabled? The only place I\u0027ve seen is in the retry part above. Who/what is going to enable the console?","commit_id":"b480de8dd3fdfea21cb532a004f6aada77721cd5"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"ebe242cc38f30229c82d0bd1c5d6502f358c3d11","unresolved":false,"context_lines":[{"line_number":1257,"context_line":"        if console[\u0027console_enabled\u0027]:"},{"line_number":1258,"context_line":"            return console[\u0027console_info\u0027]"},{"line_number":1259,"context_line":"        else:"},{"line_number":1260,"context_line":"            raise exception.ConsoleNotAvailable()"},{"line_number":1261,"context_line":""},{"line_number":1262,"context_line":"    def get_serial_console(self, context, instance):"},{"line_number":1263,"context_line":"        \"\"\"Acquire serial console information."}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_27cf4557","line":1260,"in_reply_to":"3aaa91ec_eef7f1d0","updated":"2016-06-30 03:39:11.000000000","message":"Normally console mode is set by administrator/operator in a separated action. For example, using CLI \"ironic node-set-console-mode \u003cNODE\u003e \u003ctrue/false\u003e\".\n\nI think we should consider enabling console when administrator/operator access it via Horizon.","commit_id":"b480de8dd3fdfea21cb532a004f6aada77721cd5"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"5297bfc816a4828cb657731288e0e9bfe288d527","unresolved":false,"context_lines":[{"line_number":1283,"context_line":"        try:"},{"line_number":1284,"context_line":"            url \u003d urlparse.urlparse(console_info[\"url\"])"},{"line_number":1285,"context_line":"        except AttributeError:"},{"line_number":1286,"context_line":"            LOG.warning(_LW(\u0027Socat console url is invalid.\u0027),"},{"line_number":1287,"context_line":"                        instance\u003dinstance)"},{"line_number":1288,"context_line":"            raise exception.ConsoleTypeUnavailable(console_type\u003d\u0027serial\u0027)"},{"line_number":1289,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_1cef1aea","line":1286,"updated":"2016-06-29 16:12:08.000000000","message":"nit s/url/URL/\n\nMight be worth logging the provided URL.","commit_id":"b480de8dd3fdfea21cb532a004f6aada77721cd5"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"ebe242cc38f30229c82d0bd1c5d6502f358c3d11","unresolved":false,"context_lines":[{"line_number":1283,"context_line":"        try:"},{"line_number":1284,"context_line":"            url \u003d urlparse.urlparse(console_info[\"url\"])"},{"line_number":1285,"context_line":"        except AttributeError:"},{"line_number":1286,"context_line":"            LOG.warning(_LW(\u0027Socat console url is invalid.\u0027),"},{"line_number":1287,"context_line":"                        instance\u003dinstance)"},{"line_number":1288,"context_line":"            raise exception.ConsoleTypeUnavailable(console_type\u003d\u0027serial\u0027)"},{"line_number":1289,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_b5aa3e6f","line":1286,"in_reply_to":"3aaa91ec_1cef1aea","updated":"2016-06-30 03:39:11.000000000","message":"Done","commit_id":"b480de8dd3fdfea21cb532a004f6aada77721cd5"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"5297bfc816a4828cb657731288e0e9bfe288d527","unresolved":false,"context_lines":[{"line_number":1291,"context_line":"            return console_type.ConsoleSerial(host\u003durl.hostname,"},{"line_number":1292,"context_line":"                                              port\u003durl.port)"},{"line_number":1293,"context_line":"        else:"},{"line_number":1294,"context_line":"            LOG.warning(_LW(\u0027Unsupported url scheme \"%s\". Socat serial \u0027"},{"line_number":1295,"context_line":"                            \u0027console only supports \"tcp\". \u0027) % url.scheme,"},{"line_number":1296,"context_line":"                        instance\u003dinstance)"},{"line_number":1297,"context_line":"            raise exception.ConsoleTypeUnavailable(console_type\u003d\u0027serial\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_dc5f523f","line":1294,"updated":"2016-06-29 16:12:08.000000000","message":"s/url/URL/\n\nWouldn\u0027t it be useful to log the entire URL?\n\nThis information is coming from ironic. Should we be checking this stuff here, or making sure ironic does the right thing?","commit_id":"b480de8dd3fdfea21cb532a004f6aada77721cd5"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"ebe242cc38f30229c82d0bd1c5d6502f358c3d11","unresolved":false,"context_lines":[{"line_number":1291,"context_line":"            return console_type.ConsoleSerial(host\u003durl.hostname,"},{"line_number":1292,"context_line":"                                              port\u003durl.port)"},{"line_number":1293,"context_line":"        else:"},{"line_number":1294,"context_line":"            LOG.warning(_LW(\u0027Unsupported url scheme \"%s\". Socat serial \u0027"},{"line_number":1295,"context_line":"                            \u0027console only supports \"tcp\". \u0027) % url.scheme,"},{"line_number":1296,"context_line":"                        instance\u003dinstance)"},{"line_number":1297,"context_line":"            raise exception.ConsoleTypeUnavailable(console_type\u003d\u0027serial\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_b5c19e31","line":1294,"in_reply_to":"3aaa91ec_dc5f523f","updated":"2016-06-30 03:39:11.000000000","message":"Done","commit_id":"b480de8dd3fdfea21cb532a004f6aada77721cd5"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"5297bfc816a4828cb657731288e0e9bfe288d527","unresolved":false,"context_lines":[{"line_number":1292,"context_line":"                                              port\u003durl.port)"},{"line_number":1293,"context_line":"        else:"},{"line_number":1294,"context_line":"            LOG.warning(_LW(\u0027Unsupported url scheme \"%s\". Socat serial \u0027"},{"line_number":1295,"context_line":"                            \u0027console only supports \"tcp\". \u0027) % url.scheme,"},{"line_number":1296,"context_line":"                        instance\u003dinstance)"},{"line_number":1297,"context_line":"            raise exception.ConsoleTypeUnavailable(console_type\u003d\u0027serial\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_72612539","line":1295,"updated":"2016-06-29 16:12:08.000000000","message":"nit: better to append the argument instead of using \u0027%\u0027.","commit_id":"b480de8dd3fdfea21cb532a004f6aada77721cd5"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"ebe242cc38f30229c82d0bd1c5d6502f358c3d11","unresolved":false,"context_lines":[{"line_number":1292,"context_line":"                                              port\u003durl.port)"},{"line_number":1293,"context_line":"        else:"},{"line_number":1294,"context_line":"            LOG.warning(_LW(\u0027Unsupported url scheme \"%s\". Socat serial \u0027"},{"line_number":1295,"context_line":"                            \u0027console only supports \"tcp\". \u0027) % url.scheme,"},{"line_number":1296,"context_line":"                        instance\u003dinstance)"},{"line_number":1297,"context_line":"            raise exception.ConsoleTypeUnavailable(console_type\u003d\u0027serial\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_f5dde614","line":1295,"in_reply_to":"3aaa91ec_72612539","updated":"2016-06-30 03:39:11.000000000","message":"Done","commit_id":"b480de8dd3fdfea21cb532a004f6aada77721cd5"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"76ba59a41150e735f97426a46ab6784154d59403","unresolved":false,"context_lines":[{"line_number":1165,"context_line":"        return None"},{"line_number":1166,"context_line":""},{"line_number":1167,"context_line":"    def _get_console_info(self, instance, reset_console\u003dFalse):"},{"line_number":1168,"context_line":"        \"\"\"Acquire console information for an instance."},{"line_number":1169,"context_line":""},{"line_number":1170,"context_line":"        :param instance: nova instance"},{"line_number":1171,"context_line":"        :param reset_console: if True, reset the console when the console"}],"source_content_type":"text/x-python","patch_set":8,"id":"3aaa91ec_455ce518","line":1168,"updated":"2016-06-30 19:25:10.000000000","message":"This method isn\u0027t just getting the console information. It could also modify the console by disabling/enabling it. That is somewhat hidden in the description for reset_console below. (That\u0027s why I suggested maybe _get_console(), because getting something could mean doing something like enabling it, but getting-information doesn\u0027t usually mean that something might be changed in order to get that information.)\n\nAnyway, at the very least, i think it should be documented here, about the side effect (as well as for the reset_console).","commit_id":"e4edd692478b6a45d6ba25271cbbb911775e2214"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"6449ab8e072d816fe4f1286977730313afa971cd","unresolved":false,"context_lines":[{"line_number":1165,"context_line":"        return None"},{"line_number":1166,"context_line":""},{"line_number":1167,"context_line":"    def _get_console_info(self, instance, reset_console\u003dFalse):"},{"line_number":1168,"context_line":"        \"\"\"Acquire console information for an instance."},{"line_number":1169,"context_line":""},{"line_number":1170,"context_line":"        :param instance: nova instance"},{"line_number":1171,"context_line":"        :param reset_console: if True, reset the console when the console"}],"source_content_type":"text/x-python","patch_set":8,"id":"3aaa91ec_b89dd267","line":1168,"in_reply_to":"3aaa91ec_455ce518","updated":"2016-07-01 08:01:38.000000000","message":"Because there is an inner function named _get_console, so I change this to _get_console_info_with_reset and add some more description. Thanks.","commit_id":"e4edd692478b6a45d6ba25271cbbb911775e2214"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"76ba59a41150e735f97426a46ab6784154d59403","unresolved":false,"context_lines":[{"line_number":1252,"context_line":"                # But if recover fails, the console may remain in"},{"line_number":1253,"context_line":"                # \"disabled\" state and cause any new connection"},{"line_number":1254,"context_line":"                # will be refused."},{"line_number":1255,"context_line":"                console \u003d _set_console_mode(True)"},{"line_number":1256,"context_line":""},{"line_number":1257,"context_line":"        if console[\u0027console_enabled\u0027]:"},{"line_number":1258,"context_line":"            return console[\u0027console_info\u0027]"}],"source_content_type":"text/x-python","patch_set":8,"id":"3aaa91ec_4aeb54dc","line":1255,"updated":"2016-06-30 19:25:10.000000000","message":"If the first _set_console_mode(True) (line 1249) causes an exception, why would you call it again? is it flaky so that it *might* work this time? And if it doesn\u0027t work this time, won\u0027t an exception be raised? If you have to make this call, I think a nova exception (ConsoleNotAvailable?) should be raised (not just any Exception).","commit_id":"e4edd692478b6a45d6ba25271cbbb911775e2214"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"6449ab8e072d816fe4f1286977730313afa971cd","unresolved":false,"context_lines":[{"line_number":1252,"context_line":"                # But if recover fails, the console may remain in"},{"line_number":1253,"context_line":"                # \"disabled\" state and cause any new connection"},{"line_number":1254,"context_line":"                # will be refused."},{"line_number":1255,"context_line":"                console \u003d _set_console_mode(True)"},{"line_number":1256,"context_line":""},{"line_number":1257,"context_line":"        if console[\u0027console_enabled\u0027]:"},{"line_number":1258,"context_line":"            return console[\u0027console_info\u0027]"}],"source_content_type":"text/x-python","patch_set":8,"id":"3aaa91ec_9828d698","line":1255,"in_reply_to":"3aaa91ec_4aeb54dc","updated":"2016-07-01 08:01:38.000000000","message":"If the first call fails, I think it\u0027s highly chance that the second call will fail too. But at least there is a little chance for it to succeed.\nIf the both calls fail, then the result comes with a side effect is that the console may be disabled, though it\u0027s not before this action. If we consider enabling console every time user acquires it, then this recover may be not needed any more.","commit_id":"e4edd692478b6a45d6ba25271cbbb911775e2214"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"840b187ad2e8fb81ddb6c59be73f9160a6a8de7b","unresolved":false,"context_lines":[{"line_number":1168,"context_line":"        \"\"\"Acquire console information for an instance."},{"line_number":1169,"context_line":""},{"line_number":1170,"context_line":"        If console is enable and reset_console is True, console will be"},{"line_number":1171,"context_line":"        reset before its information be returned."},{"line_number":1172,"context_line":""},{"line_number":1173,"context_line":"        :param instance: nova instance"},{"line_number":1174,"context_line":"        :param reset_console: if True, reset the console when the console"}],"source_content_type":"text/x-python","patch_set":10,"id":"1aa78d24_c8d20500","line":1171,"updated":"2016-07-05 19:06:48.000000000","message":"If you do another revision (ie, nit), how about \u0027If the console is enabled and reset_console is True, the console will be re-enabled before returning. \u0027","commit_id":"08a4fc8c65bb6fd50483c2f505e09969081e8230"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"3c26e609b5192649bbd777f8958c94d568d9d290","unresolved":false,"context_lines":[{"line_number":1168,"context_line":"        \"\"\"Acquire console information for an instance."},{"line_number":1169,"context_line":""},{"line_number":1170,"context_line":"        If console is enable and reset_console is True, console will be"},{"line_number":1171,"context_line":"        reset before its information be returned."},{"line_number":1172,"context_line":""},{"line_number":1173,"context_line":"        :param instance: nova instance"},{"line_number":1174,"context_line":"        :param reset_console: if True, reset the console when the console"}],"source_content_type":"text/x-python","patch_set":10,"id":"1aa78d24_4706f11d","line":1171,"in_reply_to":"1aa78d24_c8d20500","updated":"2016-07-07 08:56:18.000000000","message":"Done","commit_id":"08a4fc8c65bb6fd50483c2f505e09969081e8230"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"840b187ad2e8fb81ddb6c59be73f9160a6a8de7b","unresolved":false,"context_lines":[{"line_number":1207,"context_line":"                LOG.warning(error)"},{"line_number":1208,"context_line":"                result[\u0027error\u0027] \u003d error"},{"line_number":1209,"context_line":"                raise loopingcall.LoopingCallDone()"},{"line_number":1210,"context_line":""},{"line_number":1211,"context_line":"        def _set_console_mode(mode):"},{"line_number":1212,"context_line":"            try:"},{"line_number":1213,"context_line":"                self.ironicclient.call(\u0027node.set_console_mode\u0027, node_uuid,"}],"source_content_type":"text/x-python","patch_set":10,"id":"1aa78d24_f3f8924b","line":1210,"updated":"2016-07-05 19:06:48.000000000","message":"I was looking at the code and I noticed a _log_ironic_polling() method. It might be useful to make that call here too, to be consistent with the other places where polling is done.","commit_id":"08a4fc8c65bb6fd50483c2f505e09969081e8230"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"3c26e609b5192649bbd777f8958c94d568d9d290","unresolved":false,"context_lines":[{"line_number":1207,"context_line":"                LOG.warning(error)"},{"line_number":1208,"context_line":"                result[\u0027error\u0027] \u003d error"},{"line_number":1209,"context_line":"                raise loopingcall.LoopingCallDone()"},{"line_number":1210,"context_line":""},{"line_number":1211,"context_line":"        def _set_console_mode(mode):"},{"line_number":1212,"context_line":"            try:"},{"line_number":1213,"context_line":"                self.ironicclient.call(\u0027node.set_console_mode\u0027, node_uuid,"}],"source_content_type":"text/x-python","patch_set":10,"id":"1aa78d24_472d5194","line":1210,"in_reply_to":"1aa78d24_f3f8924b","updated":"2016-07-07 08:56:18.000000000","message":"Done","commit_id":"08a4fc8c65bb6fd50483c2f505e09969081e8230"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"840b187ad2e8fb81ddb6c59be73f9160a6a8de7b","unresolved":false,"context_lines":[{"line_number":1271,"context_line":"        :raise ConsoleTypeUnavailable: if serial console is unavailable"},{"line_number":1272,"context_line":"            for the instance"},{"line_number":1273,"context_line":"        \"\"\""},{"line_number":1274,"context_line":"        try:"},{"line_number":1275,"context_line":"            console_info \u003d self._get_console_info_with_reset("},{"line_number":1276,"context_line":"                instance, reset_console\u003dTrue)"},{"line_number":1277,"context_line":"        except exception.ConsoleNotAvailable:"}],"source_content_type":"text/x-python","patch_set":10,"id":"1aa78d24_6ef799f5","line":1274,"updated":"2016-07-05 19:06:48.000000000","message":"Might want to add a LOG.debug() before this, eg\n\nLOG.debug(\u0027Getting serial console for instance\u0027...)","commit_id":"08a4fc8c65bb6fd50483c2f505e09969081e8230"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"3c26e609b5192649bbd777f8958c94d568d9d290","unresolved":false,"context_lines":[{"line_number":1271,"context_line":"        :raise ConsoleTypeUnavailable: if serial console is unavailable"},{"line_number":1272,"context_line":"            for the instance"},{"line_number":1273,"context_line":"        \"\"\""},{"line_number":1274,"context_line":"        try:"},{"line_number":1275,"context_line":"            console_info \u003d self._get_console_info_with_reset("},{"line_number":1276,"context_line":"                instance, reset_console\u003dTrue)"},{"line_number":1277,"context_line":"        except exception.ConsoleNotAvailable:"}],"source_content_type":"text/x-python","patch_set":10,"id":"1aa78d24_21e1089b","line":1274,"in_reply_to":"1aa78d24_6ef799f5","updated":"2016-07-07 08:56:18.000000000","message":"Done","commit_id":"08a4fc8c65bb6fd50483c2f505e09969081e8230"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"352b1b86108538abf7800ddefeac0b65bc40e2a1","unresolved":false,"context_lines":[{"line_number":1186,"context_line":"            except (exception.NovaException,  # Retry failed"},{"line_number":1187,"context_line":"                    ironic.exc.InternalServerError,  # Validations"},{"line_number":1188,"context_line":"                    ironic.exc.BadRequest) as e:  # Maintenance"},{"line_number":1189,"context_line":"                msg \u003d (_LW(\u0027Failed to acquire console information for \u0027"},{"line_number":1190,"context_line":"                           \u0027instance %(inst)s: %(reason)s\u0027) %"},{"line_number":1191,"context_line":"                       {\u0027inst\u0027: instance.uuid,"},{"line_number":1192,"context_line":"                        \u0027reason\u0027: six.text_type(e)})"}],"source_content_type":"text/x-python","patch_set":11,"id":"1aa78d24_d236b401","line":1189,"updated":"2016-07-07 17:40:02.000000000","message":"I\u0027m not totally sure (maybe ask a nova person), but in ironic, if a string is used in an exception, we use _() instead of _LW()","commit_id":"7440329a625af35218a2dd9efdd71a6256e0dd6f"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"00d213521a6c82705044adbcaf4675b971a49085","unresolved":false,"context_lines":[{"line_number":1186,"context_line":"            except (exception.NovaException,  # Retry failed"},{"line_number":1187,"context_line":"                    ironic.exc.InternalServerError,  # Validations"},{"line_number":1188,"context_line":"                    ironic.exc.BadRequest) as e:  # Maintenance"},{"line_number":1189,"context_line":"                msg \u003d (_LW(\u0027Failed to acquire console information for \u0027"},{"line_number":1190,"context_line":"                           \u0027instance %(inst)s: %(reason)s\u0027) %"},{"line_number":1191,"context_line":"                       {\u0027inst\u0027: instance.uuid,"},{"line_number":1192,"context_line":"                        \u0027reason\u0027: six.text_type(e)})"}],"source_content_type":"text/x-python","patch_set":11,"id":"1aa78d24_1efde36d","line":1189,"in_reply_to":"1aa78d24_d236b401","updated":"2016-07-07 18:56:34.000000000","message":"I think _() is more reasonable in this case. Done.","commit_id":"7440329a625af35218a2dd9efdd71a6256e0dd6f"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"352b1b86108538abf7800ddefeac0b65bc40e2a1","unresolved":false,"context_lines":[{"line_number":1263,"context_line":"            return console[\u0027console_info\u0027]"},{"line_number":1264,"context_line":"        else:"},{"line_number":1265,"context_line":"            raise exception.ConsoleNotAvailable("},{"line_number":1266,"context_line":"                message\u003d\u0027Console is disabled for instance %s\u0027 % instance.uuid)"},{"line_number":1267,"context_line":""},{"line_number":1268,"context_line":"    def get_serial_console(self, context, instance):"},{"line_number":1269,"context_line":"        \"\"\"Acquire serial console information."}],"source_content_type":"text/x-python","patch_set":11,"id":"1aa78d24_72d420eb","line":1266,"updated":"2016-07-07 17:40:02.000000000","message":"for exceptions, the string should be wrapped in _()","commit_id":"7440329a625af35218a2dd9efdd71a6256e0dd6f"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"00d213521a6c82705044adbcaf4675b971a49085","unresolved":false,"context_lines":[{"line_number":1263,"context_line":"            return console[\u0027console_info\u0027]"},{"line_number":1264,"context_line":"        else:"},{"line_number":1265,"context_line":"            raise exception.ConsoleNotAvailable("},{"line_number":1266,"context_line":"                message\u003d\u0027Console is disabled for instance %s\u0027 % instance.uuid)"},{"line_number":1267,"context_line":""},{"line_number":1268,"context_line":"    def get_serial_console(self, context, instance):"},{"line_number":1269,"context_line":"        \"\"\"Acquire serial console information."}],"source_content_type":"text/x-python","patch_set":11,"id":"1aa78d24_de7b5bf3","line":1266,"in_reply_to":"1aa78d24_72d420eb","updated":"2016-07-07 18:56:34.000000000","message":"Done","commit_id":"7440329a625af35218a2dd9efdd71a6256e0dd6f"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"f666d1022e6bfd21fa82acc0fcbb2d8bf46e93a2","unresolved":false,"context_lines":[{"line_number":79,"context_line":"                \u0027target_provision_state\u0027, \u0027last_error\u0027, \u0027maintenance\u0027,"},{"line_number":80,"context_line":"                \u0027properties\u0027, \u0027instance_uuid\u0027)"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"_CONSOLE_RESET_CHECKING_INTERVAL \u003d 1"},{"line_number":83,"context_line":"_CONSOLE_RESET_TIMEOUT \u003d 10"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"9ad45d7e_d9d4f148","line":82,"updated":"2016-08-08 13:54:16.000000000","message":"Nit: A note detailing what unit the numbers are in would be good if there is another revision.  i.e. is it one second, or one minute, ten seconds, or ten minutes?","commit_id":"f50d93c6ddcca1ad01d2b1e3c8c51eb26c3faa98"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"a2a2611cf7557b3ce997ea557bfc7b41efe76308","unresolved":false,"context_lines":[{"line_number":79,"context_line":"                \u0027target_provision_state\u0027, \u0027last_error\u0027, \u0027maintenance\u0027,"},{"line_number":80,"context_line":"                \u0027properties\u0027, \u0027instance_uuid\u0027)"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"_CONSOLE_RESET_CHECKING_INTERVAL \u003d 1"},{"line_number":83,"context_line":"_CONSOLE_RESET_TIMEOUT \u003d 10"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"9ad45d7e_fb926956","line":82,"in_reply_to":"9ad45d7e_d9d4f148","updated":"2016-08-09 03:28:27.000000000","message":"Done","commit_id":"f50d93c6ddcca1ad01d2b1e3c8c51eb26c3faa98"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"5b1af8c0fe7010317220dfeba32985bdae1a6373","unresolved":false,"context_lines":[{"line_number":79,"context_line":"                \u0027target_provision_state\u0027, \u0027last_error\u0027, \u0027maintenance\u0027,"},{"line_number":80,"context_line":"                \u0027properties\u0027, \u0027instance_uuid\u0027)"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"# Console reset checking interval in seconds"},{"line_number":83,"context_line":"_CONSOLE_RESET_CHECKING_INTERVAL \u003d 1"},{"line_number":84,"context_line":"# Console reset timeout in seconds"},{"line_number":85,"context_line":"_CONSOLE_RESET_TIMEOUT \u003d 10"}],"source_content_type":"text/x-python","patch_set":15,"id":"9ad45d7e_b22126fe","line":82,"range":{"start_line":82,"start_character":10,"end_line":82,"end_character":15},"updated":"2016-08-09 10:07:05.000000000","message":"nit: why are you referring to \"reset\"? It seems that the same interval and timeout is used when waiting for the console to be enabled.","commit_id":"f66fa153b1dd57aa3fa46cfaf291f695ce71466b"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"1b95288888a808522d2d2d6851bae695a80a5ec1","unresolved":false,"context_lines":[{"line_number":79,"context_line":"                \u0027target_provision_state\u0027, \u0027last_error\u0027, \u0027maintenance\u0027,"},{"line_number":80,"context_line":"                \u0027properties\u0027, \u0027instance_uuid\u0027)"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"# Console reset checking interval in seconds"},{"line_number":83,"context_line":"_CONSOLE_RESET_CHECKING_INTERVAL \u003d 1"},{"line_number":84,"context_line":"# Console reset timeout in seconds"},{"line_number":85,"context_line":"_CONSOLE_RESET_TIMEOUT \u003d 10"}],"source_content_type":"text/x-python","patch_set":15,"id":"9ad45d7e_525fd4e4","line":82,"range":{"start_line":82,"start_character":10,"end_line":82,"end_character":15},"in_reply_to":"9ad45d7e_b22126fe","updated":"2016-08-10 07:01:09.000000000","message":"I\u0027m not sure I understand your question. Checking interval and timeout are used to check for the console state switching between ON and OFF.","commit_id":"f66fa153b1dd57aa3fa46cfaf291f695ce71466b"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"5b1af8c0fe7010317220dfeba32985bdae1a6373","unresolved":false,"context_lines":[{"line_number":1219,"context_line":"            if time.time() \u003e expiration:"},{"line_number":1220,"context_line":"                error \u003d (_(\u0027Timeout while waiting for console mode to be \u0027"},{"line_number":1221,"context_line":"                           \u0027set to \"%(mode)s\" on node %(node)s\u0027) %"},{"line_number":1222,"context_line":"                         {\u0027mode\u0027: str(state),"},{"line_number":1223,"context_line":"                          \u0027node\u0027: node_uuid})"},{"line_number":1224,"context_line":"                LOG.warning(error)"},{"line_number":1225,"context_line":"                result[\u0027error\u0027] \u003d error"}],"source_content_type":"text/x-python","patch_set":15,"id":"9ad45d7e_b2dc8613","line":1222,"range":{"start_line":1222,"start_character":34,"end_line":1222,"end_character":37},"updated":"2016-08-09 10:07:05.000000000","message":"str is not needed","commit_id":"f66fa153b1dd57aa3fa46cfaf291f695ce71466b"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"1b95288888a808522d2d2d6851bae695a80a5ec1","unresolved":false,"context_lines":[{"line_number":1219,"context_line":"            if time.time() \u003e expiration:"},{"line_number":1220,"context_line":"                error \u003d (_(\u0027Timeout while waiting for console mode to be \u0027"},{"line_number":1221,"context_line":"                           \u0027set to \"%(mode)s\" on node %(node)s\u0027) %"},{"line_number":1222,"context_line":"                         {\u0027mode\u0027: str(state),"},{"line_number":1223,"context_line":"                          \u0027node\u0027: node_uuid})"},{"line_number":1224,"context_line":"                LOG.warning(error)"},{"line_number":1225,"context_line":"                result[\u0027error\u0027] \u003d error"}],"source_content_type":"text/x-python","patch_set":15,"id":"9ad45d7e_80729eab","line":1222,"range":{"start_line":1222,"start_character":34,"end_line":1222,"end_character":37},"in_reply_to":"9ad45d7e_b2dc8613","updated":"2016-08-10 07:01:09.000000000","message":"Done","commit_id":"f66fa153b1dd57aa3fa46cfaf291f695ce71466b"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"5b1af8c0fe7010317220dfeba32985bdae1a6373","unresolved":false,"context_lines":[{"line_number":1221,"context_line":"                           \u0027set to \"%(mode)s\" on node %(node)s\u0027) %"},{"line_number":1222,"context_line":"                         {\u0027mode\u0027: str(state),"},{"line_number":1223,"context_line":"                          \u0027node\u0027: node_uuid})"},{"line_number":1224,"context_line":"                LOG.warning(error)"},{"line_number":1225,"context_line":"                result[\u0027error\u0027] \u003d error"},{"line_number":1226,"context_line":"                raise loopingcall.LoopingCallDone()"},{"line_number":1227,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"9ad45d7e_d2077a7f","line":1224,"range":{"start_line":1224,"start_character":20,"end_line":1224,"end_character":27},"updated":"2016-08-09 10:07:05.000000000","message":"should be error","commit_id":"f66fa153b1dd57aa3fa46cfaf291f695ce71466b"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"1b95288888a808522d2d2d6851bae695a80a5ec1","unresolved":false,"context_lines":[{"line_number":1221,"context_line":"                           \u0027set to \"%(mode)s\" on node %(node)s\u0027) %"},{"line_number":1222,"context_line":"                         {\u0027mode\u0027: str(state),"},{"line_number":1223,"context_line":"                          \u0027node\u0027: node_uuid})"},{"line_number":1224,"context_line":"                LOG.warning(error)"},{"line_number":1225,"context_line":"                result[\u0027error\u0027] \u003d error"},{"line_number":1226,"context_line":"                raise loopingcall.LoopingCallDone()"},{"line_number":1227,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"9ad45d7e_80f73ef4","line":1224,"range":{"start_line":1224,"start_character":20,"end_line":1224,"end_character":27},"in_reply_to":"9ad45d7e_d2077a7f","updated":"2016-08-10 07:01:09.000000000","message":"Done","commit_id":"f66fa153b1dd57aa3fa46cfaf291f695ce71466b"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"5b1af8c0fe7010317220dfeba32985bdae1a6373","unresolved":false,"context_lines":[{"line_number":1236,"context_line":"                    ironic.exc.BadRequest) as e:  # Maintenance"},{"line_number":1237,"context_line":"                msg \u003d (_(\u0027Failed to set console mode to \"%(mode)s\" \u0027"},{"line_number":1238,"context_line":"                         \u0027for instance %(inst)s: %(reason)s\u0027) %"},{"line_number":1239,"context_line":"                       {\u0027mode\u0027: str(mode),"},{"line_number":1240,"context_line":"                        \u0027inst\u0027: instance.uuid,"},{"line_number":1241,"context_line":"                        \u0027reason\u0027: six.text_type(e)})"},{"line_number":1242,"context_line":"                LOG.warning(msg)"}],"source_content_type":"text/x-python","patch_set":15,"id":"9ad45d7e_32e896b4","line":1239,"range":{"start_line":1239,"start_character":32,"end_line":1239,"end_character":35},"updated":"2016-08-09 10:07:05.000000000","message":"str is not needed, %s already has implicit str() call","commit_id":"f66fa153b1dd57aa3fa46cfaf291f695ce71466b"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"1b95288888a808522d2d2d6851bae695a80a5ec1","unresolved":false,"context_lines":[{"line_number":1236,"context_line":"                    ironic.exc.BadRequest) as e:  # Maintenance"},{"line_number":1237,"context_line":"                msg \u003d (_(\u0027Failed to set console mode to \"%(mode)s\" \u0027"},{"line_number":1238,"context_line":"                         \u0027for instance %(inst)s: %(reason)s\u0027) %"},{"line_number":1239,"context_line":"                       {\u0027mode\u0027: str(mode),"},{"line_number":1240,"context_line":"                        \u0027inst\u0027: instance.uuid,"},{"line_number":1241,"context_line":"                        \u0027reason\u0027: six.text_type(e)})"},{"line_number":1242,"context_line":"                LOG.warning(msg)"}],"source_content_type":"text/x-python","patch_set":15,"id":"9ad45d7e_40d42646","line":1239,"range":{"start_line":1239,"start_character":32,"end_line":1239,"end_character":35},"in_reply_to":"9ad45d7e_32e896b4","updated":"2016-08-10 07:01:09.000000000","message":"Done","commit_id":"f66fa153b1dd57aa3fa46cfaf291f695ce71466b"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"5b1af8c0fe7010317220dfeba32985bdae1a6373","unresolved":false,"context_lines":[{"line_number":1238,"context_line":"                         \u0027for instance %(inst)s: %(reason)s\u0027) %"},{"line_number":1239,"context_line":"                       {\u0027mode\u0027: str(mode),"},{"line_number":1240,"context_line":"                        \u0027inst\u0027: instance.uuid,"},{"line_number":1241,"context_line":"                        \u0027reason\u0027: six.text_type(e)})"},{"line_number":1242,"context_line":"                LOG.warning(msg)"},{"line_number":1243,"context_line":"                raise exception.ConsoleNotAvailable(message\u003dmsg)"},{"line_number":1244,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"9ad45d7e_f2dd5e15","line":1241,"range":{"start_line":1241,"start_character":34,"end_line":1241,"end_character":47},"updated":"2016-08-09 10:07:05.000000000","message":"six.text_type is not needed","commit_id":"f66fa153b1dd57aa3fa46cfaf291f695ce71466b"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"1b95288888a808522d2d2d6851bae695a80a5ec1","unresolved":false,"context_lines":[{"line_number":1238,"context_line":"                         \u0027for instance %(inst)s: %(reason)s\u0027) %"},{"line_number":1239,"context_line":"                       {\u0027mode\u0027: str(mode),"},{"line_number":1240,"context_line":"                        \u0027inst\u0027: instance.uuid,"},{"line_number":1241,"context_line":"                        \u0027reason\u0027: six.text_type(e)})"},{"line_number":1242,"context_line":"                LOG.warning(msg)"},{"line_number":1243,"context_line":"                raise exception.ConsoleNotAvailable(message\u003dmsg)"},{"line_number":1244,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"9ad45d7e_c06e5695","line":1241,"range":{"start_line":1241,"start_character":34,"end_line":1241,"end_character":47},"in_reply_to":"9ad45d7e_f2dd5e15","updated":"2016-08-10 07:01:09.000000000","message":"Done","commit_id":"f66fa153b1dd57aa3fa46cfaf291f695ce71466b"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"5b1af8c0fe7010317220dfeba32985bdae1a6373","unresolved":false,"context_lines":[{"line_number":1299,"context_line":"            raise exception.ConsoleTypeUnavailable(console_type\u003d\u0027serial\u0027)"},{"line_number":1300,"context_line":""},{"line_number":1301,"context_line":"        if console_info[\"type\"] !\u003d \"socat\":"},{"line_number":1302,"context_line":"            LOG.warning(_LW(\u0027Console type \"%s\" does not support Nova \u0027"},{"line_number":1303,"context_line":"                            \u0027serial console\u0027), console_info[\"type\"],"},{"line_number":1304,"context_line":"                        instance\u003dinstance)"},{"line_number":1305,"context_line":"            raise exception.ConsoleTypeUnavailable(console_type\u003d\u0027serial\u0027)"}],"source_content_type":"text/x-python","patch_set":15,"id":"9ad45d7e_92722248","line":1302,"range":{"start_line":1302,"start_character":16,"end_line":1302,"end_character":23},"updated":"2016-08-09 10:07:05.000000000","message":"should be error. also is it possible to log ironic node UUID here?","commit_id":"f66fa153b1dd57aa3fa46cfaf291f695ce71466b"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"fa89539c947211eb7716a95c8dd7bee6e188029b","unresolved":false,"context_lines":[{"line_number":1299,"context_line":"            raise exception.ConsoleTypeUnavailable(console_type\u003d\u0027serial\u0027)"},{"line_number":1300,"context_line":""},{"line_number":1301,"context_line":"        if console_info[\"type\"] !\u003d \"socat\":"},{"line_number":1302,"context_line":"            LOG.warning(_LW(\u0027Console type \"%s\" does not support Nova \u0027"},{"line_number":1303,"context_line":"                            \u0027serial console\u0027), console_info[\"type\"],"},{"line_number":1304,"context_line":"                        instance\u003dinstance)"},{"line_number":1305,"context_line":"            raise exception.ConsoleTypeUnavailable(console_type\u003d\u0027serial\u0027)"}],"source_content_type":"text/x-python","patch_set":15,"id":"9ad45d7e_d4c9dd5a","line":1302,"range":{"start_line":1302,"start_character":16,"end_line":1302,"end_character":23},"in_reply_to":"9ad45d7e_203652e6","updated":"2016-08-10 13:21:44.000000000","message":"Yes, I don\u0027t think we want to do an extra call just to get the node UUID. Having said that, self._get_console_info_with_reset() has the node UUID, so I suppose it could return it... Dmitry -- what do you think?","commit_id":"f66fa153b1dd57aa3fa46cfaf291f695ce71466b"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"8f19157b8776b66bec0f774e26d4f0b0f0657d04","unresolved":false,"context_lines":[{"line_number":1299,"context_line":"            raise exception.ConsoleTypeUnavailable(console_type\u003d\u0027serial\u0027)"},{"line_number":1300,"context_line":""},{"line_number":1301,"context_line":"        if console_info[\"type\"] !\u003d \"socat\":"},{"line_number":1302,"context_line":"            LOG.warning(_LW(\u0027Console type \"%s\" does not support Nova \u0027"},{"line_number":1303,"context_line":"                            \u0027serial console\u0027), console_info[\"type\"],"},{"line_number":1304,"context_line":"                        instance\u003dinstance)"},{"line_number":1305,"context_line":"            raise exception.ConsoleTypeUnavailable(console_type\u003d\u0027serial\u0027)"}],"source_content_type":"text/x-python","patch_set":15,"id":"9ad45d7e_8bf71f8a","line":1302,"range":{"start_line":1302,"start_character":16,"end_line":1302,"end_character":23},"in_reply_to":"9ad45d7e_54516d35","updated":"2016-08-11 04:24:04.000000000","message":"Done","commit_id":"f66fa153b1dd57aa3fa46cfaf291f695ce71466b"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"1b95288888a808522d2d2d6851bae695a80a5ec1","unresolved":false,"context_lines":[{"line_number":1299,"context_line":"            raise exception.ConsoleTypeUnavailable(console_type\u003d\u0027serial\u0027)"},{"line_number":1300,"context_line":""},{"line_number":1301,"context_line":"        if console_info[\"type\"] !\u003d \"socat\":"},{"line_number":1302,"context_line":"            LOG.warning(_LW(\u0027Console type \"%s\" does not support Nova \u0027"},{"line_number":1303,"context_line":"                            \u0027serial console\u0027), console_info[\"type\"],"},{"line_number":1304,"context_line":"                        instance\u003dinstance)"},{"line_number":1305,"context_line":"            raise exception.ConsoleTypeUnavailable(console_type\u003d\u0027serial\u0027)"}],"source_content_type":"text/x-python","patch_set":15,"id":"9ad45d7e_203652e6","line":1302,"range":{"start_line":1302,"start_character":16,"end_line":1302,"end_character":23},"in_reply_to":"9ad45d7e_92722248","updated":"2016-08-10 07:01:09.000000000","message":"Done. It\u0027s hard to log ironic node UUID here, we may need to call _validate_instance_and_node() one more time to get the UUID, but that reduces the performance.","commit_id":"f66fa153b1dd57aa3fa46cfaf291f695ce71466b"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"7f5a36dfbb1d9d9d6c76eb679ae0c7d3c0e16f12","unresolved":false,"context_lines":[{"line_number":1299,"context_line":"            raise exception.ConsoleTypeUnavailable(console_type\u003d\u0027serial\u0027)"},{"line_number":1300,"context_line":""},{"line_number":1301,"context_line":"        if console_info[\"type\"] !\u003d \"socat\":"},{"line_number":1302,"context_line":"            LOG.warning(_LW(\u0027Console type \"%s\" does not support Nova \u0027"},{"line_number":1303,"context_line":"                            \u0027serial console\u0027), console_info[\"type\"],"},{"line_number":1304,"context_line":"                        instance\u003dinstance)"},{"line_number":1305,"context_line":"            raise exception.ConsoleTypeUnavailable(console_type\u003d\u0027serial\u0027)"}],"source_content_type":"text/x-python","patch_set":15,"id":"9ad45d7e_54516d35","line":1302,"range":{"start_line":1302,"start_character":16,"end_line":1302,"end_character":23},"in_reply_to":"9ad45d7e_d4c9dd5a","updated":"2016-08-10 13:27:02.000000000","message":"+1","commit_id":"f66fa153b1dd57aa3fa46cfaf291f695ce71466b"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"5b1af8c0fe7010317220dfeba32985bdae1a6373","unresolved":false,"context_lines":[{"line_number":1307,"context_line":"        try:"},{"line_number":1308,"context_line":"            url \u003d urlparse.urlparse(console_info[\"url\"])"},{"line_number":1309,"context_line":"        except AttributeError:"},{"line_number":1310,"context_line":"            LOG.warning(_LW(\u0027Invalid Socat console URL \"%s\"\u0027),"},{"line_number":1311,"context_line":"                        console_info[\"url\"],"},{"line_number":1312,"context_line":"                        instance\u003dinstance)"},{"line_number":1313,"context_line":"            raise exception.ConsoleTypeUnavailable(console_type\u003d\u0027serial\u0027)"}],"source_content_type":"text/x-python","patch_set":15,"id":"9ad45d7e_f28f1e21","line":1310,"range":{"start_line":1310,"start_character":16,"end_line":1310,"end_character":23},"updated":"2016-08-09 10:07:05.000000000","message":"ditto","commit_id":"f66fa153b1dd57aa3fa46cfaf291f695ce71466b"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"1b95288888a808522d2d2d6851bae695a80a5ec1","unresolved":false,"context_lines":[{"line_number":1307,"context_line":"        try:"},{"line_number":1308,"context_line":"            url \u003d urlparse.urlparse(console_info[\"url\"])"},{"line_number":1309,"context_line":"        except AttributeError:"},{"line_number":1310,"context_line":"            LOG.warning(_LW(\u0027Invalid Socat console URL \"%s\"\u0027),"},{"line_number":1311,"context_line":"                        console_info[\"url\"],"},{"line_number":1312,"context_line":"                        instance\u003dinstance)"},{"line_number":1313,"context_line":"            raise exception.ConsoleTypeUnavailable(console_type\u003d\u0027serial\u0027)"}],"source_content_type":"text/x-python","patch_set":15,"id":"9ad45d7e_4051c60d","line":1310,"range":{"start_line":1310,"start_character":16,"end_line":1310,"end_character":23},"in_reply_to":"9ad45d7e_f28f1e21","updated":"2016-08-10 07:01:09.000000000","message":"Done","commit_id":"f66fa153b1dd57aa3fa46cfaf291f695ce71466b"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"5b1af8c0fe7010317220dfeba32985bdae1a6373","unresolved":false,"context_lines":[{"line_number":1316,"context_line":"            return console_type.ConsoleSerial(host\u003durl.hostname,"},{"line_number":1317,"context_line":"                                              port\u003durl.port)"},{"line_number":1318,"context_line":"        else:"},{"line_number":1319,"context_line":"            LOG.warning(_LW(\u0027Socat serial console only supports \"tcp\". \u0027"},{"line_number":1320,"context_line":"                            \u0027This URL is \"%s\".\u0027), console_info[\"url\"],"},{"line_number":1321,"context_line":"                        instance\u003dinstance)"},{"line_number":1322,"context_line":"            raise exception.ConsoleTypeUnavailable(console_type\u003d\u0027serial\u0027)"}],"source_content_type":"text/x-python","patch_set":15,"id":"9ad45d7e_129d9259","line":1319,"range":{"start_line":1319,"start_character":16,"end_line":1319,"end_character":23},"updated":"2016-08-09 10:07:05.000000000","message":"ditto","commit_id":"f66fa153b1dd57aa3fa46cfaf291f695ce71466b"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"1b95288888a808522d2d2d6851bae695a80a5ec1","unresolved":false,"context_lines":[{"line_number":1316,"context_line":"            return console_type.ConsoleSerial(host\u003durl.hostname,"},{"line_number":1317,"context_line":"                                              port\u003durl.port)"},{"line_number":1318,"context_line":"        else:"},{"line_number":1319,"context_line":"            LOG.warning(_LW(\u0027Socat serial console only supports \"tcp\". \u0027"},{"line_number":1320,"context_line":"                            \u0027This URL is \"%s\".\u0027), console_info[\"url\"],"},{"line_number":1321,"context_line":"                        instance\u003dinstance)"},{"line_number":1322,"context_line":"            raise exception.ConsoleTypeUnavailable(console_type\u003d\u0027serial\u0027)"}],"source_content_type":"text/x-python","patch_set":15,"id":"9ad45d7e_805bbe2d","line":1319,"range":{"start_line":1319,"start_character":16,"end_line":1319,"end_character":23},"in_reply_to":"9ad45d7e_129d9259","updated":"2016-08-10 07:01:09.000000000","message":"Done","commit_id":"f66fa153b1dd57aa3fa46cfaf291f695ce71466b"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"d748f8014a9175c78c01acf2514f43b740b5421b","unresolved":false,"context_lines":[{"line_number":84,"context_line":"# Console state checking interval in seconds"},{"line_number":85,"context_line":"_CONSOLE_RESET_CHECKING_INTERVAL \u003d 1"},{"line_number":86,"context_line":"# Console reset timeout in seconds"},{"line_number":87,"context_line":"_CONSOLE_RESET_TIMEOUT \u003d 10"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"def map_power_state(state):"}],"source_content_type":"text/x-python","patch_set":16,"id":"9ad45d7e_94b3e5e8","line":87,"updated":"2016-08-10 13:21:32.000000000","message":"As Dmitry mentioned in revision 15, \u0027reset\u0027 isn\u0027t correct. You changed it in the comment at line 84, but it ought to be changed throughout.","commit_id":"03c40087ba594f278345d27e3775e904596e2cdf"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"db73e5fef3fef1aa995c6130103809cc2642cedd","unresolved":false,"context_lines":[{"line_number":84,"context_line":"# Console state checking interval in seconds"},{"line_number":85,"context_line":"_CONSOLE_STATE_CHECKING_INTERVAL \u003d 1"},{"line_number":86,"context_line":"# Console reset timeout in seconds"},{"line_number":87,"context_line":"_CONSOLE_RESET_TIMEOUT \u003d 10"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"def map_power_state(state):"}],"source_content_type":"text/x-python","patch_set":17,"id":"9ad45d7e_a12e6df8","line":87,"updated":"2016-08-11 13:25:47.000000000","message":"The above two also should be changed to state. Ie\n\n  #Console state timeout in seconds\n  _CONSOLE_STATE_TIMEOUT \u003d 10","commit_id":"52ee94cb243911c37177b2bdfb20e418d70f41a1"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"fcc7a9d90be3bb799f19dfd64918e97d475df8e9","unresolved":false,"context_lines":[{"line_number":84,"context_line":"# Console state checking interval in seconds"},{"line_number":85,"context_line":"_CONSOLE_STATE_CHECKING_INTERVAL \u003d 1"},{"line_number":86,"context_line":"# Console reset timeout in seconds"},{"line_number":87,"context_line":"_CONSOLE_RESET_TIMEOUT \u003d 10"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"def map_power_state(state):"}],"source_content_type":"text/x-python","patch_set":17,"id":"9ad45d7e_80d07aca","line":87,"in_reply_to":"9ad45d7e_a12e6df8","updated":"2016-08-11 15:54:11.000000000","message":"Done","commit_id":"52ee94cb243911c37177b2bdfb20e418d70f41a1"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"db73e5fef3fef1aa995c6130103809cc2642cedd","unresolved":false,"context_lines":[{"line_number":1340,"context_line":""},{"line_number":1341,"context_line":"        if console_info[\"type\"] !\u003d \"socat\":"},{"line_number":1342,"context_line":"            LOG.error(_LE(\u0027Console type \"%(type)s\" does not support Nova \u0027"},{"line_number":1343,"context_line":"                          \u0027serial console (ironic node %(node)s)\u0027) %"},{"line_number":1344,"context_line":"                      {\u0027type\u0027: console_info[\"type\"],"},{"line_number":1345,"context_line":"                       \u0027node\u0027: node.uuid},"},{"line_number":1346,"context_line":"                      instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":17,"id":"9ad45d7e_6176353f","line":1343,"updated":"2016-08-11 13:25:47.000000000","message":"nit. or \u0027Console type \u003ctype\u003e (of ironic node \u003cnode\u003e) ...\u0027","commit_id":"52ee94cb243911c37177b2bdfb20e418d70f41a1"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"fcc7a9d90be3bb799f19dfd64918e97d475df8e9","unresolved":false,"context_lines":[{"line_number":1340,"context_line":""},{"line_number":1341,"context_line":"        if console_info[\"type\"] !\u003d \"socat\":"},{"line_number":1342,"context_line":"            LOG.error(_LE(\u0027Console type \"%(type)s\" does not support Nova \u0027"},{"line_number":1343,"context_line":"                          \u0027serial console (ironic node %(node)s)\u0027) %"},{"line_number":1344,"context_line":"                      {\u0027type\u0027: console_info[\"type\"],"},{"line_number":1345,"context_line":"                       \u0027node\u0027: node.uuid},"},{"line_number":1346,"context_line":"                      instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":17,"id":"9ad45d7e_00e5aaa6","line":1343,"in_reply_to":"9ad45d7e_6176353f","updated":"2016-08-11 15:54:11.000000000","message":"Done","commit_id":"52ee94cb243911c37177b2bdfb20e418d70f41a1"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"5f10a63a3ba7e8154983bd5d534bb88ebcdd922a","unresolved":false,"context_lines":[{"line_number":1239,"context_line":"            except (exception.NovaException,  # Retry failed"},{"line_number":1240,"context_line":"                    ironic.exc.InternalServerError,  # Validations"},{"line_number":1241,"context_line":"                    ironic.exc.BadRequest) as e:  # Maintenance"},{"line_number":1242,"context_line":"                msg \u003d (_(\u0027Failed to acquire console information for \u0027"},{"line_number":1243,"context_line":"                         \u0027instance %(inst)s: %(reason)s\u0027) %"},{"line_number":1244,"context_line":"                       {\u0027inst\u0027: instance.uuid,"},{"line_number":1245,"context_line":"                        \u0027reason\u0027: e})"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ac06dbe_018fb9cc","line":1242,"range":{"start_line":1242,"start_character":23,"end_line":1242,"end_character":25},"updated":"2016-08-22 23:43:21.000000000","message":"This message is passed to LOG.error.\nSo why don\u0027t we use _LE() instead of _()?","commit_id":"abe873061632a969446fcd438e90394c90e25ec5"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"2980311a5ec63668f7e1c97a386bc44e0f875611","unresolved":false,"context_lines":[{"line_number":1239,"context_line":"            except (exception.NovaException,  # Retry failed"},{"line_number":1240,"context_line":"                    ironic.exc.InternalServerError,  # Validations"},{"line_number":1241,"context_line":"                    ironic.exc.BadRequest) as e:  # Maintenance"},{"line_number":1242,"context_line":"                msg \u003d (_(\u0027Failed to acquire console information for \u0027"},{"line_number":1243,"context_line":"                         \u0027instance %(inst)s: %(reason)s\u0027) %"},{"line_number":1244,"context_line":"                       {\u0027inst\u0027: instance.uuid,"},{"line_number":1245,"context_line":"                        \u0027reason\u0027: e})"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ac06dbe_33731917","line":1242,"range":{"start_line":1242,"start_character":23,"end_line":1242,"end_character":25},"in_reply_to":"1ac06dbe_018fb9cc","updated":"2016-08-23 08:14:41.000000000","message":"Because the msg is also passed to the exception ConsoleNotAvailable, so we can\u0027t not use _LE for it. Please see the guide at: http://docs.openstack.org/developer/oslo.i18n/guidelines.html#choosing-a-marker-function","commit_id":"abe873061632a969446fcd438e90394c90e25ec5"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"5f10a63a3ba7e8154983bd5d534bb88ebcdd922a","unresolved":false,"context_lines":[{"line_number":1244,"context_line":"                       {\u0027inst\u0027: instance.uuid,"},{"line_number":1245,"context_line":"                        \u0027reason\u0027: e})"},{"line_number":1246,"context_line":"                LOG.error(msg)"},{"line_number":1247,"context_line":"                raise exception.ConsoleNotAvailable(message\u003dmsg)"},{"line_number":1248,"context_line":""},{"line_number":1249,"context_line":"        def _wait_state(state, expiration, result):"},{"line_number":1250,"context_line":"            console \u003d _get_console()"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ac06dbe_a1422566","line":1247,"range":{"start_line":1247,"start_character":52,"end_line":1247,"end_character":63},"updated":"2016-08-22 23:43:21.000000000","message":"The message is not used at caller side: get_serial_console()\n\nSo I don\u0027t think it is necessary to pass this msg to the exception here. After applying this comment, the above msg will be directly passed to LOG.error() call.","commit_id":"abe873061632a969446fcd438e90394c90e25ec5"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"03c1e0fe71df4692074b82b98f77901227d250ae","unresolved":false,"context_lines":[{"line_number":1244,"context_line":"                       {\u0027inst\u0027: instance.uuid,"},{"line_number":1245,"context_line":"                        \u0027reason\u0027: e})"},{"line_number":1246,"context_line":"                LOG.error(msg)"},{"line_number":1247,"context_line":"                raise exception.ConsoleNotAvailable(message\u003dmsg)"},{"line_number":1248,"context_line":""},{"line_number":1249,"context_line":"        def _wait_state(state, expiration, result):"},{"line_number":1250,"context_line":"            console \u003d _get_console()"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ac06dbe_28707ea3","line":1247,"range":{"start_line":1247,"start_character":52,"end_line":1247,"end_character":63},"in_reply_to":"1ac06dbe_5dc83674","updated":"2016-08-24 03:04:19.000000000","message":"I changed unit tests to check the log message instead of exception message.","commit_id":"abe873061632a969446fcd438e90394c90e25ec5"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"2980311a5ec63668f7e1c97a386bc44e0f875611","unresolved":false,"context_lines":[{"line_number":1244,"context_line":"                       {\u0027inst\u0027: instance.uuid,"},{"line_number":1245,"context_line":"                        \u0027reason\u0027: e})"},{"line_number":1246,"context_line":"                LOG.error(msg)"},{"line_number":1247,"context_line":"                raise exception.ConsoleNotAvailable(message\u003dmsg)"},{"line_number":1248,"context_line":""},{"line_number":1249,"context_line":"        def _wait_state(state, expiration, result):"},{"line_number":1250,"context_line":"            console \u003d _get_console()"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ac06dbe_d79c30c2","line":1247,"range":{"start_line":1247,"start_character":52,"end_line":1247,"end_character":63},"in_reply_to":"1ac06dbe_a1422566","updated":"2016-08-23 08:14:41.000000000","message":"All _get_console(), _set_console_mode(), and _wait_state() raise the same exception, so if we have the exception, we don\u0027t know where exactly the error happened. These msgs are used in unit test via assertRaiseRegex() to track the error.","commit_id":"abe873061632a969446fcd438e90394c90e25ec5"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"27967840f0665ee685e1ee8fb5a48c57a846ade2","unresolved":false,"context_lines":[{"line_number":1244,"context_line":"                       {\u0027inst\u0027: instance.uuid,"},{"line_number":1245,"context_line":"                        \u0027reason\u0027: e})"},{"line_number":1246,"context_line":"                LOG.error(msg)"},{"line_number":1247,"context_line":"                raise exception.ConsoleNotAvailable(message\u003dmsg)"},{"line_number":1248,"context_line":""},{"line_number":1249,"context_line":"        def _wait_state(state, expiration, result):"},{"line_number":1250,"context_line":"            console \u003d _get_console()"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ac06dbe_5dc83674","line":1247,"range":{"start_line":1247,"start_character":52,"end_line":1247,"end_character":63},"in_reply_to":"1ac06dbe_d79c30c2","updated":"2016-08-23 17:03:11.000000000","message":"I disagree with this purpose of msg.\nThis msg is just for unit tests, the msg doesn\u0027t have much meaning because that is not used for productions.\nIn addition, now this msg is used for the exception also, that makes the code bigger and unreadable.","commit_id":"abe873061632a969446fcd438e90394c90e25ec5"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"5f10a63a3ba7e8154983bd5d534bb88ebcdd922a","unresolved":false,"context_lines":[{"line_number":1270,"context_line":"            except (exception.NovaException,  # Retry failed"},{"line_number":1271,"context_line":"                    ironic.exc.InternalServerError,  # Validations"},{"line_number":1272,"context_line":"                    ironic.exc.BadRequest) as e:  # Maintenance"},{"line_number":1273,"context_line":"                msg \u003d (_(\u0027Failed to set console mode to \"%(mode)s\" \u0027"},{"line_number":1274,"context_line":"                         \u0027for instance %(inst)s: %(reason)s\u0027) %"},{"line_number":1275,"context_line":"                       {\u0027mode\u0027: mode,"},{"line_number":1276,"context_line":"                        \u0027inst\u0027: instance.uuid,"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ac06dbe_a52350a6","line":1273,"range":{"start_line":1273,"start_character":23,"end_line":1273,"end_character":25},"updated":"2016-08-22 23:43:21.000000000","message":"ditto: Why don\u0027t we use _LE() instead of _()?","commit_id":"abe873061632a969446fcd438e90394c90e25ec5"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"03c1e0fe71df4692074b82b98f77901227d250ae","unresolved":false,"context_lines":[{"line_number":1270,"context_line":"            except (exception.NovaException,  # Retry failed"},{"line_number":1271,"context_line":"                    ironic.exc.InternalServerError,  # Validations"},{"line_number":1272,"context_line":"                    ironic.exc.BadRequest) as e:  # Maintenance"},{"line_number":1273,"context_line":"                msg \u003d (_(\u0027Failed to set console mode to \"%(mode)s\" \u0027"},{"line_number":1274,"context_line":"                         \u0027for instance %(inst)s: %(reason)s\u0027) %"},{"line_number":1275,"context_line":"                       {\u0027mode\u0027: mode,"},{"line_number":1276,"context_line":"                        \u0027inst\u0027: instance.uuid,"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ac06dbe_089e62b8","line":1273,"range":{"start_line":1273,"start_character":23,"end_line":1273,"end_character":25},"in_reply_to":"1ac06dbe_3dbf3aab","updated":"2016-08-24 03:04:19.000000000","message":"Done","commit_id":"abe873061632a969446fcd438e90394c90e25ec5"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"27967840f0665ee685e1ee8fb5a48c57a846ade2","unresolved":false,"context_lines":[{"line_number":1270,"context_line":"            except (exception.NovaException,  # Retry failed"},{"line_number":1271,"context_line":"                    ironic.exc.InternalServerError,  # Validations"},{"line_number":1272,"context_line":"                    ironic.exc.BadRequest) as e:  # Maintenance"},{"line_number":1273,"context_line":"                msg \u003d (_(\u0027Failed to set console mode to \"%(mode)s\" \u0027"},{"line_number":1274,"context_line":"                         \u0027for instance %(inst)s: %(reason)s\u0027) %"},{"line_number":1275,"context_line":"                       {\u0027mode\u0027: mode,"},{"line_number":1276,"context_line":"                        \u0027inst\u0027: instance.uuid,"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ac06dbe_3dbf3aab","line":1273,"range":{"start_line":1273,"start_character":23,"end_line":1273,"end_character":25},"in_reply_to":"1ac06dbe_97b75839","updated":"2016-08-23 17:03:11.000000000","message":"ditto: Due to meaningless msg, this code is made unreadable.","commit_id":"abe873061632a969446fcd438e90394c90e25ec5"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"2980311a5ec63668f7e1c97a386bc44e0f875611","unresolved":false,"context_lines":[{"line_number":1270,"context_line":"            except (exception.NovaException,  # Retry failed"},{"line_number":1271,"context_line":"                    ironic.exc.InternalServerError,  # Validations"},{"line_number":1272,"context_line":"                    ironic.exc.BadRequest) as e:  # Maintenance"},{"line_number":1273,"context_line":"                msg \u003d (_(\u0027Failed to set console mode to \"%(mode)s\" \u0027"},{"line_number":1274,"context_line":"                         \u0027for instance %(inst)s: %(reason)s\u0027) %"},{"line_number":1275,"context_line":"                       {\u0027mode\u0027: mode,"},{"line_number":1276,"context_line":"                        \u0027inst\u0027: instance.uuid,"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ac06dbe_97b75839","line":1273,"range":{"start_line":1273,"start_character":23,"end_line":1273,"end_character":25},"in_reply_to":"1ac06dbe_a52350a6","updated":"2016-08-23 08:14:41.000000000","message":"Please see my above reply.","commit_id":"abe873061632a969446fcd438e90394c90e25ec5"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"5f10a63a3ba7e8154983bd5d534bb88ebcdd922a","unresolved":false,"context_lines":[{"line_number":1276,"context_line":"                        \u0027inst\u0027: instance.uuid,"},{"line_number":1277,"context_line":"                        \u0027reason\u0027: e})"},{"line_number":1278,"context_line":"                LOG.error(msg)"},{"line_number":1279,"context_line":"                raise exception.ConsoleNotAvailable(message\u003dmsg)"},{"line_number":1280,"context_line":""},{"line_number":1281,"context_line":"            result \u003d {\u0027console\u0027: None, \u0027error\u0027: None}"},{"line_number":1282,"context_line":"            expiration \u003d time.time() + _CONSOLE_STATE_TIMEOUT"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ac06dbe_2519207a","line":1279,"range":{"start_line":1279,"start_character":52,"end_line":1279,"end_character":63},"updated":"2016-08-22 23:43:21.000000000","message":"ditto: unnecessary to pass this msg to this exception.","commit_id":"abe873061632a969446fcd438e90394c90e25ec5"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"2980311a5ec63668f7e1c97a386bc44e0f875611","unresolved":false,"context_lines":[{"line_number":1276,"context_line":"                        \u0027inst\u0027: instance.uuid,"},{"line_number":1277,"context_line":"                        \u0027reason\u0027: e})"},{"line_number":1278,"context_line":"                LOG.error(msg)"},{"line_number":1279,"context_line":"                raise exception.ConsoleNotAvailable(message\u003dmsg)"},{"line_number":1280,"context_line":""},{"line_number":1281,"context_line":"            result \u003d {\u0027console\u0027: None, \u0027error\u0027: None}"},{"line_number":1282,"context_line":"            expiration \u003d time.time() + _CONSOLE_STATE_TIMEOUT"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ac06dbe_77b45c34","line":1279,"range":{"start_line":1279,"start_character":52,"end_line":1279,"end_character":63},"in_reply_to":"1ac06dbe_2519207a","updated":"2016-08-23 08:14:41.000000000","message":"ditto","commit_id":"abe873061632a969446fcd438e90394c90e25ec5"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"27967840f0665ee685e1ee8fb5a48c57a846ade2","unresolved":false,"context_lines":[{"line_number":1276,"context_line":"                        \u0027inst\u0027: instance.uuid,"},{"line_number":1277,"context_line":"                        \u0027reason\u0027: e})"},{"line_number":1278,"context_line":"                LOG.error(msg)"},{"line_number":1279,"context_line":"                raise exception.ConsoleNotAvailable(message\u003dmsg)"},{"line_number":1280,"context_line":""},{"line_number":1281,"context_line":"            result \u003d {\u0027console\u0027: None, \u0027error\u0027: None}"},{"line_number":1282,"context_line":"            expiration \u003d time.time() + _CONSOLE_STATE_TIMEOUT"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ac06dbe_dde6e6e6","line":1279,"range":{"start_line":1279,"start_character":52,"end_line":1279,"end_character":63},"in_reply_to":"1ac06dbe_77b45c34","updated":"2016-08-23 17:03:11.000000000","message":"ditto","commit_id":"abe873061632a969446fcd438e90394c90e25ec5"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"03c1e0fe71df4692074b82b98f77901227d250ae","unresolved":false,"context_lines":[{"line_number":1276,"context_line":"                        \u0027inst\u0027: instance.uuid,"},{"line_number":1277,"context_line":"                        \u0027reason\u0027: e})"},{"line_number":1278,"context_line":"                LOG.error(msg)"},{"line_number":1279,"context_line":"                raise exception.ConsoleNotAvailable(message\u003dmsg)"},{"line_number":1280,"context_line":""},{"line_number":1281,"context_line":"            result \u003d {\u0027console\u0027: None, \u0027error\u0027: None}"},{"line_number":1282,"context_line":"            expiration \u003d time.time() + _CONSOLE_STATE_TIMEOUT"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ac06dbe_e8a026f6","line":1279,"range":{"start_line":1279,"start_character":52,"end_line":1279,"end_character":63},"in_reply_to":"1ac06dbe_dde6e6e6","updated":"2016-08-24 03:04:19.000000000","message":"Done","commit_id":"abe873061632a969446fcd438e90394c90e25ec5"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"5f10a63a3ba7e8154983bd5d534bb88ebcdd922a","unresolved":false,"context_lines":[{"line_number":1287,"context_line":"            timer.start(interval\u003d_CONSOLE_STATE_CHECKING_INTERVAL).wait()"},{"line_number":1288,"context_line":""},{"line_number":1289,"context_line":"            if result[\u0027error\u0027] is not None:"},{"line_number":1290,"context_line":"                raise exception.ConsoleNotAvailable(message\u003dresult[\u0027error\u0027])"},{"line_number":1291,"context_line":""},{"line_number":1292,"context_line":"            return result[\u0027console\u0027]"},{"line_number":1293,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"1ac06dbe_25ee40b4","line":1290,"range":{"start_line":1290,"start_character":22,"end_line":1290,"end_character":76},"updated":"2016-08-22 23:43:21.000000000","message":"As pointing the above, the message of ConsoleNotAvailable is lost on this implementation. But this result[\u0027error\u0027] seems important for operators I guess. So how about outputting this result[\u0027error\u0027] to LOG?","commit_id":"abe873061632a969446fcd438e90394c90e25ec5"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"2980311a5ec63668f7e1c97a386bc44e0f875611","unresolved":false,"context_lines":[{"line_number":1287,"context_line":"            timer.start(interval\u003d_CONSOLE_STATE_CHECKING_INTERVAL).wait()"},{"line_number":1288,"context_line":""},{"line_number":1289,"context_line":"            if result[\u0027error\u0027] is not None:"},{"line_number":1290,"context_line":"                raise exception.ConsoleNotAvailable(message\u003dresult[\u0027error\u0027])"},{"line_number":1291,"context_line":""},{"line_number":1292,"context_line":"            return result[\u0027console\u0027]"},{"line_number":1293,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"1ac06dbe_5797a047","line":1290,"range":{"start_line":1290,"start_character":22,"end_line":1290,"end_character":76},"in_reply_to":"1ac06dbe_25ee40b4","updated":"2016-08-23 08:14:41.000000000","message":"The error msg is already logged before. If we log it here, the log will be duplicated.","commit_id":"abe873061632a969446fcd438e90394c90e25ec5"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"27967840f0665ee685e1ee8fb5a48c57a846ade2","unresolved":false,"context_lines":[{"line_number":1287,"context_line":"            timer.start(interval\u003d_CONSOLE_STATE_CHECKING_INTERVAL).wait()"},{"line_number":1288,"context_line":""},{"line_number":1289,"context_line":"            if result[\u0027error\u0027] is not None:"},{"line_number":1290,"context_line":"                raise exception.ConsoleNotAvailable(message\u003dresult[\u0027error\u0027])"},{"line_number":1291,"context_line":""},{"line_number":1292,"context_line":"            return result[\u0027console\u0027]"},{"line_number":1293,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"1ac06dbe_7de372d9","line":1290,"range":{"start_line":1290,"start_character":22,"end_line":1290,"end_character":76},"in_reply_to":"1ac06dbe_5797a047","updated":"2016-08-23 17:03:11.000000000","message":"ok, fine for me. but the message also is meaningless for me.","commit_id":"abe873061632a969446fcd438e90394c90e25ec5"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"03c1e0fe71df4692074b82b98f77901227d250ae","unresolved":false,"context_lines":[{"line_number":1287,"context_line":"            timer.start(interval\u003d_CONSOLE_STATE_CHECKING_INTERVAL).wait()"},{"line_number":1288,"context_line":""},{"line_number":1289,"context_line":"            if result[\u0027error\u0027] is not None:"},{"line_number":1290,"context_line":"                raise exception.ConsoleNotAvailable(message\u003dresult[\u0027error\u0027])"},{"line_number":1291,"context_line":""},{"line_number":1292,"context_line":"            return result[\u0027console\u0027]"},{"line_number":1293,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"1ac06dbe_28a7de0b","line":1290,"range":{"start_line":1290,"start_character":22,"end_line":1290,"end_character":76},"in_reply_to":"1ac06dbe_7de372d9","updated":"2016-08-24 03:04:19.000000000","message":"Done","commit_id":"abe873061632a969446fcd438e90394c90e25ec5"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"5f10a63a3ba7e8154983bd5d534bb88ebcdd922a","unresolved":false,"context_lines":[{"line_number":1310,"context_line":"                # But if recover fails, the console may remain in"},{"line_number":1311,"context_line":"                # \"disabled\" state and cause any new connection"},{"line_number":1312,"context_line":"                # will be refused."},{"line_number":1313,"context_line":"                console \u003d _set_console_mode(True)"},{"line_number":1314,"context_line":""},{"line_number":1315,"context_line":"        if console[\u0027console_enabled\u0027]:"},{"line_number":1316,"context_line":"            return {\u0027node\u0027: node,"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ac06dbe_e5e6e813","line":1313,"range":{"start_line":1313,"start_character":16,"end_line":1313,"end_character":49},"updated":"2016-08-22 23:43:21.000000000","message":"This is not a reason of -1, just question.\n\nI cannot understand why don\u0027t we raise an exception here?\nThis is a rollback as the above NOTE, but the operation is running without any raising. That seems running on unstable condition.","commit_id":"abe873061632a969446fcd438e90394c90e25ec5"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"2980311a5ec63668f7e1c97a386bc44e0f875611","unresolved":false,"context_lines":[{"line_number":1310,"context_line":"                # But if recover fails, the console may remain in"},{"line_number":1311,"context_line":"                # \"disabled\" state and cause any new connection"},{"line_number":1312,"context_line":"                # will be refused."},{"line_number":1313,"context_line":"                console \u003d _set_console_mode(True)"},{"line_number":1314,"context_line":""},{"line_number":1315,"context_line":"        if console[\u0027console_enabled\u0027]:"},{"line_number":1316,"context_line":"            return {\u0027node\u0027: node,"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ac06dbe_1a1eed5e","line":1313,"range":{"start_line":1313,"start_character":16,"end_line":1313,"end_character":49},"in_reply_to":"1ac06dbe_e5e6e813","updated":"2016-08-23 08:14:41.000000000","message":"_set_console_mode() raises the same exception as the outer function. So I think it\u0027s still safe for the call without any raising.","commit_id":"abe873061632a969446fcd438e90394c90e25ec5"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"5f10a63a3ba7e8154983bd5d534bb88ebcdd922a","unresolved":false,"context_lines":[{"line_number":1316,"context_line":"            return {\u0027node\u0027: node,"},{"line_number":1317,"context_line":"                    \u0027console_info\u0027: console[\u0027console_info\u0027]}"},{"line_number":1318,"context_line":"        else:"},{"line_number":1319,"context_line":"            msg \u003d _(\u0027Console is disabled for instance %s\u0027) % instance.uuid"},{"line_number":1320,"context_line":"            raise exception.ConsoleNotAvailable(message\u003dmsg)"},{"line_number":1321,"context_line":""},{"line_number":1322,"context_line":"    def get_serial_console(self, context, instance):"},{"line_number":1323,"context_line":"        \"\"\"Acquire serial console information."}],"source_content_type":"text/x-python","patch_set":19,"id":"1ac06dbe_e5942844","line":1320,"range":{"start_line":1319,"start_character":12,"end_line":1320,"end_character":60},"updated":"2016-08-22 23:43:21.000000000","message":"Ditt: this msg is not used at the caller side, so it seems unnecessary to be passed.","commit_id":"abe873061632a969446fcd438e90394c90e25ec5"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"2980311a5ec63668f7e1c97a386bc44e0f875611","unresolved":false,"context_lines":[{"line_number":1316,"context_line":"            return {\u0027node\u0027: node,"},{"line_number":1317,"context_line":"                    \u0027console_info\u0027: console[\u0027console_info\u0027]}"},{"line_number":1318,"context_line":"        else:"},{"line_number":1319,"context_line":"            msg \u003d _(\u0027Console is disabled for instance %s\u0027) % instance.uuid"},{"line_number":1320,"context_line":"            raise exception.ConsoleNotAvailable(message\u003dmsg)"},{"line_number":1321,"context_line":""},{"line_number":1322,"context_line":"    def get_serial_console(self, context, instance):"},{"line_number":1323,"context_line":"        \"\"\"Acquire serial console information."}],"source_content_type":"text/x-python","patch_set":19,"id":"1ac06dbe_373e6428","line":1320,"range":{"start_line":1319,"start_character":12,"end_line":1320,"end_character":60},"in_reply_to":"1ac06dbe_e5942844","updated":"2016-08-23 08:14:41.000000000","message":"please see my above reply.","commit_id":"abe873061632a969446fcd438e90394c90e25ec5"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"5f10a63a3ba7e8154983bd5d534bb88ebcdd922a","unresolved":false,"context_lines":[{"line_number":1329,"context_line":"            for the instance"},{"line_number":1330,"context_line":"        \"\"\""},{"line_number":1331,"context_line":"        try:"},{"line_number":1332,"context_line":"            LOG.debug(\u0027Getting serial console\u0027, instance\u003dinstance)"},{"line_number":1333,"context_line":"            result \u003d self._get_node_console_with_reset("},{"line_number":1334,"context_line":"                instance, reset_console\u003dTrue)"},{"line_number":1335,"context_line":"        except exception.ConsoleNotAvailable:"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ac06dbe_c1dac1e7","line":1332,"range":{"start_line":1332,"start_character":12,"end_line":1332,"end_character":66},"updated":"2016-08-22 23:43:21.000000000","message":"nit: this debug message is not necessary to be under try-except block.","commit_id":"abe873061632a969446fcd438e90394c90e25ec5"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"2980311a5ec63668f7e1c97a386bc44e0f875611","unresolved":false,"context_lines":[{"line_number":1329,"context_line":"            for the instance"},{"line_number":1330,"context_line":"        \"\"\""},{"line_number":1331,"context_line":"        try:"},{"line_number":1332,"context_line":"            LOG.debug(\u0027Getting serial console\u0027, instance\u003dinstance)"},{"line_number":1333,"context_line":"            result \u003d self._get_node_console_with_reset("},{"line_number":1334,"context_line":"                instance, reset_console\u003dTrue)"},{"line_number":1335,"context_line":"        except exception.ConsoleNotAvailable:"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ac06dbe_d71390b6","line":1332,"range":{"start_line":1332,"start_character":12,"end_line":1332,"end_character":66},"in_reply_to":"1ac06dbe_c1dac1e7","updated":"2016-08-23 08:14:41.000000000","message":"Done","commit_id":"abe873061632a969446fcd438e90394c90e25ec5"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"3a8aca3f2ac8e9ef9a7be0593340398364e7047c","unresolved":false,"context_lines":[{"line_number":1302,"context_line":"        if reset_console and console[\u0027console_enabled\u0027]:"},{"line_number":1303,"context_line":"            try:"},{"line_number":1304,"context_line":"                # Disable console"},{"line_number":1305,"context_line":"                console \u003d _set_console_mode(False)"},{"line_number":1306,"context_line":"                # Then re-enable it"},{"line_number":1307,"context_line":"                console \u003d _set_console_mode(True)"},{"line_number":1308,"context_line":"            except exception.ConsoleNotAvailable:"}],"source_content_type":"text/x-python","patch_set":20,"id":"1ac06dbe_dd40a609","line":1305,"range":{"start_line":1305,"start_character":16,"end_line":1305,"end_character":26},"updated":"2016-08-23 17:03:57.000000000","message":"This \"console \u003d\" is unnecessary because of unused.","commit_id":"0f43deb221311ba53a20b6ce8531e7193bf97e6d"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"722b457af8b8b5bb6a8c799d9be56ed10efdc73c","unresolved":false,"context_lines":[{"line_number":1302,"context_line":"        if reset_console and console[\u0027console_enabled\u0027]:"},{"line_number":1303,"context_line":"            try:"},{"line_number":1304,"context_line":"                # Disable console"},{"line_number":1305,"context_line":"                console \u003d _set_console_mode(False)"},{"line_number":1306,"context_line":"                # Then re-enable it"},{"line_number":1307,"context_line":"                console \u003d _set_console_mode(True)"},{"line_number":1308,"context_line":"            except exception.ConsoleNotAvailable:"}],"source_content_type":"text/x-python","patch_set":20,"id":"1ac06dbe_aeb2bb49","line":1305,"range":{"start_line":1305,"start_character":16,"end_line":1305,"end_character":26},"in_reply_to":"1ac06dbe_dd40a609","updated":"2016-08-24 03:04:54.000000000","message":"Done","commit_id":"0f43deb221311ba53a20b6ce8531e7193bf97e6d"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"c2f7f06893e81510f44885511185e5dfe5862c5c","unresolved":false,"context_lines":[{"line_number":1257,"context_line":"                         {\u0027mode\u0027: state,"},{"line_number":1258,"context_line":"                          \u0027node\u0027: node_uuid})"},{"line_number":1259,"context_line":"                LOG.error(error)"},{"line_number":1260,"context_line":"                result[\u0027error\u0027] \u003d error"},{"line_number":1261,"context_line":"                raise loopingcall.LoopingCallDone()"},{"line_number":1262,"context_line":""},{"line_number":1263,"context_line":"            _log_ironic_polling(\u0027set console mode\u0027, node, instance)"}],"source_content_type":"text/x-python","patch_set":21,"id":"1ac06dbe_30a54ab5","line":1260,"range":{"start_line":1260,"start_character":32,"end_line":1260,"end_character":39},"updated":"2016-08-24 20:38:24.000000000","message":"Why don\u0027t we pass just True instead of error?\n\nAs your previous comment, this error message is already output on the log and the caller just checks True/False on the side.\nAfter doing that, we can write the message into LOG.error() without any variable.","commit_id":"bbd56cf892aab1fcc267373081944cd9370b8fdd"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"a6201faea0d2b8ecaba7f4a52a95f3525b9b19f9","unresolved":false,"context_lines":[{"line_number":1257,"context_line":"                         {\u0027mode\u0027: state,"},{"line_number":1258,"context_line":"                          \u0027node\u0027: node_uuid})"},{"line_number":1259,"context_line":"                LOG.error(error)"},{"line_number":1260,"context_line":"                result[\u0027error\u0027] \u003d error"},{"line_number":1261,"context_line":"                raise loopingcall.LoopingCallDone()"},{"line_number":1262,"context_line":""},{"line_number":1263,"context_line":"            _log_ironic_polling(\u0027set console mode\u0027, node, instance)"}],"source_content_type":"text/x-python","patch_set":21,"id":"1ac06dbe_9f04fdc6","line":1260,"range":{"start_line":1260,"start_character":32,"end_line":1260,"end_character":39},"in_reply_to":"1ac06dbe_30a54ab5","updated":"2016-08-25 01:37:52.000000000","message":"Done","commit_id":"bbd56cf892aab1fcc267373081944cd9370b8fdd"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"c2f7f06893e81510f44885511185e5dfe5862c5c","unresolved":false,"context_lines":[{"line_number":1284,"context_line":"                                                         result)"},{"line_number":1285,"context_line":"            timer.start(interval\u003d_CONSOLE_STATE_CHECKING_INTERVAL).wait()"},{"line_number":1286,"context_line":""},{"line_number":1287,"context_line":"            if result[\u0027error\u0027] is not None:"},{"line_number":1288,"context_line":"                raise exception.ConsoleNotAvailable()"},{"line_number":1289,"context_line":""},{"line_number":1290,"context_line":"            return result[\u0027console\u0027]"}],"source_content_type":"text/x-python","patch_set":21,"id":"1ac06dbe_7086a214","line":1287,"range":{"start_line":1287,"start_character":12,"end_line":1287,"end_character":43},"updated":"2016-08-24 20:38:24.000000000","message":"By applying the above comment, we can change here just like\n\n if result[\u0027error\u0027]:","commit_id":"bbd56cf892aab1fcc267373081944cd9370b8fdd"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"a6201faea0d2b8ecaba7f4a52a95f3525b9b19f9","unresolved":false,"context_lines":[{"line_number":1284,"context_line":"                                                         result)"},{"line_number":1285,"context_line":"            timer.start(interval\u003d_CONSOLE_STATE_CHECKING_INTERVAL).wait()"},{"line_number":1286,"context_line":""},{"line_number":1287,"context_line":"            if result[\u0027error\u0027] is not None:"},{"line_number":1288,"context_line":"                raise exception.ConsoleNotAvailable()"},{"line_number":1289,"context_line":""},{"line_number":1290,"context_line":"            return result[\u0027console\u0027]"}],"source_content_type":"text/x-python","patch_set":21,"id":"1ac06dbe_7f0941dd","line":1287,"range":{"start_line":1287,"start_character":12,"end_line":1287,"end_character":43},"in_reply_to":"1ac06dbe_7086a214","updated":"2016-08-25 01:37:52.000000000","message":"Done","commit_id":"bbd56cf892aab1fcc267373081944cd9370b8fdd"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"0c690202768f3fb348b9e278edba358cdc42c339","unresolved":false,"context_lines":[{"line_number":1256,"context_line":"                              \u0027set to \"%(mode)s\" on node %(node)s\u0027) %"},{"line_number":1257,"context_line":"                          {\u0027mode\u0027: state,"},{"line_number":1258,"context_line":"                           \u0027node\u0027: node_uuid})"},{"line_number":1259,"context_line":"                result[\u0027error\u0027] \u003d True"},{"line_number":1260,"context_line":"                raise loopingcall.LoopingCallDone()"},{"line_number":1261,"context_line":""},{"line_number":1262,"context_line":"            _log_ironic_polling(\u0027set console mode\u0027, node, instance)"}],"source_content_type":"text/x-python","patch_set":22,"id":"1ac06dbe_16ee2fec","line":1259,"range":{"start_line":1259,"start_character":16,"end_line":1259,"end_character":38},"updated":"2016-08-25 08:13:36.000000000","message":"you should be able raise the exception directly, without pass the error by a dict.","commit_id":"0a270f498cca9c01785982e3b0373831ab617e7a"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"2baa5149946a8ee721d70ab61e3344be1ccd299e","unresolved":false,"context_lines":[{"line_number":1256,"context_line":"                              \u0027set to \"%(mode)s\" on node %(node)s\u0027) %"},{"line_number":1257,"context_line":"                          {\u0027mode\u0027: state,"},{"line_number":1258,"context_line":"                           \u0027node\u0027: node_uuid})"},{"line_number":1259,"context_line":"                result[\u0027error\u0027] \u003d True"},{"line_number":1260,"context_line":"                raise loopingcall.LoopingCallDone()"},{"line_number":1261,"context_line":""},{"line_number":1262,"context_line":"            _log_ironic_polling(\u0027set console mode\u0027, node, instance)"}],"source_content_type":"text/x-python","patch_set":22,"id":"1ac06dbe_c555f6c6","line":1259,"range":{"start_line":1259,"start_character":16,"end_line":1259,"end_character":38},"in_reply_to":"1ac06dbe_16ee2fec","updated":"2016-08-25 09:02:27.000000000","message":"Done","commit_id":"0a270f498cca9c01785982e3b0373831ab617e7a"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"0c690202768f3fb348b9e278edba358cdc42c339","unresolved":false,"context_lines":[{"line_number":1283,"context_line":"                                                         result)"},{"line_number":1284,"context_line":"            timer.start(interval\u003d_CONSOLE_STATE_CHECKING_INTERVAL).wait()"},{"line_number":1285,"context_line":""},{"line_number":1286,"context_line":"            if result[\u0027error\u0027]:"},{"line_number":1287,"context_line":"                raise exception.ConsoleNotAvailable()"},{"line_number":1288,"context_line":""},{"line_number":1289,"context_line":"            return result[\u0027console\u0027]"},{"line_number":1290,"context_line":""}],"source_content_type":"text/x-python","patch_set":22,"id":"1ac06dbe_3649abd1","line":1287,"range":{"start_line":1286,"start_character":12,"end_line":1287,"end_character":53},"updated":"2016-08-25 08:13:36.000000000","message":"Same thing with the comment in line 1259, you needn\u0027t result[\u0027error\u0027]. you can raise the exception for the _wait_state directly and with better error message in exception","commit_id":"0a270f498cca9c01785982e3b0373831ab617e7a"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"2baa5149946a8ee721d70ab61e3344be1ccd299e","unresolved":false,"context_lines":[{"line_number":1283,"context_line":"                                                         result)"},{"line_number":1284,"context_line":"            timer.start(interval\u003d_CONSOLE_STATE_CHECKING_INTERVAL).wait()"},{"line_number":1285,"context_line":""},{"line_number":1286,"context_line":"            if result[\u0027error\u0027]:"},{"line_number":1287,"context_line":"                raise exception.ConsoleNotAvailable()"},{"line_number":1288,"context_line":""},{"line_number":1289,"context_line":"            return result[\u0027console\u0027]"},{"line_number":1290,"context_line":""}],"source_content_type":"text/x-python","patch_set":22,"id":"1ac06dbe_e560f2a6","line":1287,"range":{"start_line":1286,"start_character":12,"end_line":1287,"end_character":53},"in_reply_to":"1ac06dbe_3649abd1","updated":"2016-08-25 09:02:27.000000000","message":"Done","commit_id":"0a270f498cca9c01785982e3b0373831ab617e7a"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"df3ec6b934cebaa5f1f31663ec0c816e2527026b","unresolved":false,"context_lines":[{"line_number":1248,"context_line":"        def _wait_state(state, expiration, result):"},{"line_number":1249,"context_line":"            console \u003d _get_console()"},{"line_number":1250,"context_line":"            if console[\u0027console_enabled\u0027] \u003d\u003d state:"},{"line_number":1251,"context_line":"                result[\u0027console\u0027] \u003d console"},{"line_number":1252,"context_line":"                raise loopingcall.LoopingCallDone()"},{"line_number":1253,"context_line":""},{"line_number":1254,"context_line":"            if time.time() \u003e expiration:"}],"source_content_type":"text/x-python","patch_set":23,"id":"1ac06dbe_582f083e","line":1251,"range":{"start_line":1251,"start_character":16,"end_line":1251,"end_character":43},"updated":"2016-08-25 17:03:36.000000000","message":"Please see the following comment, here should be\n\n result \u003d console","commit_id":"32a3d181a4a336c91ee67f8ef4d52e53f8aa4af8"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"dd5afd7fbf67a104e41317f8ed04c3d9a0bae352","unresolved":false,"context_lines":[{"line_number":1248,"context_line":"        def _wait_state(state, expiration, result):"},{"line_number":1249,"context_line":"            console \u003d _get_console()"},{"line_number":1250,"context_line":"            if console[\u0027console_enabled\u0027] \u003d\u003d state:"},{"line_number":1251,"context_line":"                result[\u0027console\u0027] \u003d console"},{"line_number":1252,"context_line":"                raise loopingcall.LoopingCallDone()"},{"line_number":1253,"context_line":""},{"line_number":1254,"context_line":"            if time.time() \u003e expiration:"}],"source_content_type":"text/x-python","patch_set":23,"id":"1ac06dbe_f86d1433","line":1251,"range":{"start_line":1251,"start_character":16,"end_line":1251,"end_character":43},"in_reply_to":"1ac06dbe_582f083e","updated":"2016-08-25 17:07:15.000000000","message":"That won\u0027t work. If you do that, the caller\u0027s \u0027result\u0027 won\u0027t get changed.","commit_id":"32a3d181a4a336c91ee67f8ef4d52e53f8aa4af8"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"d008fb2f489af4208ce0b29a30cbb46f6a611292","unresolved":false,"context_lines":[{"line_number":1248,"context_line":"        def _wait_state(state, expiration, result):"},{"line_number":1249,"context_line":"            console \u003d _get_console()"},{"line_number":1250,"context_line":"            if console[\u0027console_enabled\u0027] \u003d\u003d state:"},{"line_number":1251,"context_line":"                result[\u0027console\u0027] \u003d console"},{"line_number":1252,"context_line":"                raise loopingcall.LoopingCallDone()"},{"line_number":1253,"context_line":""},{"line_number":1254,"context_line":"            if time.time() \u003e expiration:"}],"source_content_type":"text/x-python","patch_set":23,"id":"1ac06dbe_b83b9cea","line":1251,"range":{"start_line":1251,"start_character":16,"end_line":1251,"end_character":43},"in_reply_to":"1ac06dbe_f86d1433","updated":"2016-08-25 17:11:41.000000000","message":"Agreed. Can modify a dict inside a function and the change will appear to the caller. But a plain variable won\u0027t do that.","commit_id":"32a3d181a4a336c91ee67f8ef4d52e53f8aa4af8"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"df3ec6b934cebaa5f1f31663ec0c816e2527026b","unresolved":false,"context_lines":[{"line_number":1274,"context_line":"                           \u0027reason\u0027: e})"},{"line_number":1275,"context_line":"                raise exception.ConsoleNotAvailable()"},{"line_number":1276,"context_line":""},{"line_number":1277,"context_line":"            result \u003d {\u0027console\u0027: None}"},{"line_number":1278,"context_line":"            expiration \u003d time.time() + _CONSOLE_STATE_TIMEOUT"},{"line_number":1279,"context_line":"            timer \u003d loopingcall.FixedIntervalLoopingCall(_wait_state,"},{"line_number":1280,"context_line":"                                                         mode,"}],"source_content_type":"text/x-python","patch_set":23,"id":"1ac06dbe_78ff6401","line":1277,"range":{"start_line":1277,"start_character":12,"end_line":1277,"end_character":38},"updated":"2016-08-25 17:03:36.000000000","message":"Alex\u0027s point is good for simpler code. After that, this \u0027console\u0027 becomes unnecessary because we don\u0027t need to get multiple values from _wait_state().\n\nWe can just implement here like\n\n result \u003d None\n\nand","commit_id":"32a3d181a4a336c91ee67f8ef4d52e53f8aa4af8"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"df3ec6b934cebaa5f1f31663ec0c816e2527026b","unresolved":false,"context_lines":[{"line_number":1282,"context_line":"                                                         result)"},{"line_number":1283,"context_line":"            timer.start(interval\u003d_CONSOLE_STATE_CHECKING_INTERVAL).wait()"},{"line_number":1284,"context_line":""},{"line_number":1285,"context_line":"            return result[\u0027console\u0027]"},{"line_number":1286,"context_line":""},{"line_number":1287,"context_line":"        # Acquire the console"},{"line_number":1288,"context_line":"        console \u003d _get_console()"}],"source_content_type":"text/x-python","patch_set":23,"id":"1ac06dbe_5829c888","line":1285,"range":{"start_line":1285,"start_character":12,"end_line":1285,"end_character":36},"updated":"2016-08-25 17:03:36.000000000","message":"and here should be\n\n return result","commit_id":"32a3d181a4a336c91ee67f8ef4d52e53f8aa4af8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"71ea999d675aa712f62c4234edcb719053255d6b","unresolved":false,"context_lines":[{"line_number":1309,"context_line":"            return {\u0027node\u0027: node,"},{"line_number":1310,"context_line":"                    \u0027console_info\u0027: console[\u0027console_info\u0027]}"},{"line_number":1311,"context_line":"        else:"},{"line_number":1312,"context_line":"            LOG.warning(_LW(\u0027Console is disabled for instance %s\u0027) %"},{"line_number":1313,"context_line":"                        instance.uuid)"},{"line_number":1314,"context_line":"            raise exception.ConsoleNotAvailable()"},{"line_number":1315,"context_line":""},{"line_number":1316,"context_line":"    def get_serial_console(self, context, instance):"}],"source_content_type":"text/x-python","patch_set":23,"id":"fa7ab95a_62f7528b","line":1313,"range":{"start_line":1312,"start_character":67,"end_line":1313,"end_character":38},"updated":"2016-08-29 18:41:39.000000000","message":"Pass instance.uuid as an arg to LOG.warning so we don\u0027t have to format the message beforehand.","commit_id":"32a3d181a4a336c91ee67f8ef4d52e53f8aa4af8"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"b34f290fe909721cd4625c30cc824bbac31867fc","unresolved":false,"context_lines":[{"line_number":1309,"context_line":"            return {\u0027node\u0027: node,"},{"line_number":1310,"context_line":"                    \u0027console_info\u0027: console[\u0027console_info\u0027]}"},{"line_number":1311,"context_line":"        else:"},{"line_number":1312,"context_line":"            LOG.warning(_LW(\u0027Console is disabled for instance %s\u0027) %"},{"line_number":1313,"context_line":"                        instance.uuid)"},{"line_number":1314,"context_line":"            raise exception.ConsoleNotAvailable()"},{"line_number":1315,"context_line":""},{"line_number":1316,"context_line":"    def get_serial_console(self, context, instance):"}],"source_content_type":"text/x-python","patch_set":23,"id":"fa7ab95a_13baf0c0","line":1313,"range":{"start_line":1312,"start_character":67,"end_line":1313,"end_character":38},"in_reply_to":"fa7ab95a_62f7528b","updated":"2016-08-31 09:44:07.000000000","message":"Done","commit_id":"32a3d181a4a336c91ee67f8ef4d52e53f8aa4af8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"71ea999d675aa712f62c4234edcb719053255d6b","unresolved":false,"context_lines":[{"line_number":1332,"context_line":"        node \u003d result[\u0027node\u0027]"},{"line_number":1333,"context_line":"        console_info \u003d result[\u0027console_info\u0027]"},{"line_number":1334,"context_line":""},{"line_number":1335,"context_line":"        if console_info[\"type\"] !\u003d \"socat\":"},{"line_number":1336,"context_line":"            LOG.error(_LE(\u0027Console type \"%(type)s\" (of ironic node %(node)s) \u0027"},{"line_number":1337,"context_line":"                          \u0027does not support Nova serial console\u0027) %"},{"line_number":1338,"context_line":"                      {\u0027type\u0027: console_info[\"type\"],"}],"source_content_type":"text/x-python","patch_set":23,"id":"fa7ab95a_c2965eef","line":1335,"updated":"2016-08-29 18:41:39.000000000","message":"This definitely seems like something we should handle with host capabilities, because if Ironic is not new enough to have this socat driver, or it\u0027s not enabled, then the user just gets a 400 for this but doesn\u0027t really know why. I\u0027m not sure I want to block this on host capabilities though since those don\u0027t exist yet, and this has less to do with scheduling/placement I think.","commit_id":"32a3d181a4a336c91ee67f8ef4d52e53f8aa4af8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b47ce2a193bf97ac4403e90f457a8b8c78f619b3","unresolved":false,"context_lines":[{"line_number":1333,"context_line":"        console_info \u003d result[\u0027console_info\u0027]"},{"line_number":1334,"context_line":""},{"line_number":1335,"context_line":"        if console_info[\"type\"] !\u003d \"socat\":"},{"line_number":1336,"context_line":"            LOG.error(_LE(\u0027Console type \"%(type)s\" (of ironic node %(node)s) \u0027"},{"line_number":1337,"context_line":"                          \u0027does not support Nova serial console\u0027) %"},{"line_number":1338,"context_line":"                      {\u0027type\u0027: console_info[\"type\"],"},{"line_number":1339,"context_line":"                       \u0027node\u0027: node.uuid},"},{"line_number":1340,"context_line":"                      instance\u003dinstance)"},{"line_number":1341,"context_line":"            raise exception.ConsoleTypeUnavailable(console_type\u003d\u0027serial\u0027)"},{"line_number":1342,"context_line":""},{"line_number":1343,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":23,"id":"fa7ab95a_e2efe21b","line":1340,"range":{"start_line":1336,"start_character":12,"end_line":1340,"end_character":40},"updated":"2016-08-29 18:30:09.000000000","message":"Is this really an error? What is an operator supposed to do when they see this?","commit_id":"32a3d181a4a336c91ee67f8ef4d52e53f8aa4af8"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"b34f290fe909721cd4625c30cc824bbac31867fc","unresolved":false,"context_lines":[{"line_number":1333,"context_line":"        console_info \u003d result[\u0027console_info\u0027]"},{"line_number":1334,"context_line":""},{"line_number":1335,"context_line":"        if console_info[\"type\"] !\u003d \"socat\":"},{"line_number":1336,"context_line":"            LOG.error(_LE(\u0027Console type \"%(type)s\" (of ironic node %(node)s) \u0027"},{"line_number":1337,"context_line":"                          \u0027does not support Nova serial console\u0027) %"},{"line_number":1338,"context_line":"                      {\u0027type\u0027: console_info[\"type\"],"},{"line_number":1339,"context_line":"                       \u0027node\u0027: node.uuid},"},{"line_number":1340,"context_line":"                      instance\u003dinstance)"},{"line_number":1341,"context_line":"            raise exception.ConsoleTypeUnavailable(console_type\u003d\u0027serial\u0027)"},{"line_number":1342,"context_line":""},{"line_number":1343,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":23,"id":"fa7ab95a_44102ca9","line":1340,"range":{"start_line":1336,"start_character":12,"end_line":1340,"end_character":40},"in_reply_to":"fa7ab95a_e2efe21b","updated":"2016-08-31 09:44:07.000000000","message":"I think a warning is more reasonable in this case. It says that the targeted ironic node uses a kind of console which does not support serial console. Operator can consider switch to use socat console for the ironic node in order to enable this feature.","commit_id":"32a3d181a4a336c91ee67f8ef4d52e53f8aa4af8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b47ce2a193bf97ac4403e90f457a8b8c78f619b3","unresolved":false,"context_lines":[{"line_number":1343,"context_line":"        try:"},{"line_number":1344,"context_line":"            url \u003d urlparse.urlparse(console_info[\"url\"])"},{"line_number":1345,"context_line":"        except AttributeError:"},{"line_number":1346,"context_line":"            LOG.error(_LE(\u0027Invalid Socat console URL \"%(url)s\" \u0027"},{"line_number":1347,"context_line":"                          \u0027(ironic node %(node)s)\u0027) %"},{"line_number":1348,"context_line":"                      {\u0027url\u0027: console_info[\"url\"],"},{"line_number":1349,"context_line":"                       \u0027node\u0027: node.uuid},"},{"line_number":1350,"context_line":"                      instance\u003dinstance)"},{"line_number":1351,"context_line":"            raise exception.ConsoleTypeUnavailable(console_type\u003d\u0027serial\u0027)"},{"line_number":1352,"context_line":""},{"line_number":1353,"context_line":"        if url.scheme \u003d\u003d \"tcp\":"}],"source_content_type":"text/x-python","patch_set":23,"id":"fa7ab95a_424dee3c","line":1350,"range":{"start_line":1346,"start_character":12,"end_line":1350,"end_character":40},"updated":"2016-08-29 18:30:09.000000000","message":"Again, is this a configuration issue? What is the operator supposed to do with this error? Is it recoverable or does something need to be re-configured?","commit_id":"32a3d181a4a336c91ee67f8ef4d52e53f8aa4af8"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"b34f290fe909721cd4625c30cc824bbac31867fc","unresolved":false,"context_lines":[{"line_number":1343,"context_line":"        try:"},{"line_number":1344,"context_line":"            url \u003d urlparse.urlparse(console_info[\"url\"])"},{"line_number":1345,"context_line":"        except AttributeError:"},{"line_number":1346,"context_line":"            LOG.error(_LE(\u0027Invalid Socat console URL \"%(url)s\" \u0027"},{"line_number":1347,"context_line":"                          \u0027(ironic node %(node)s)\u0027) %"},{"line_number":1348,"context_line":"                      {\u0027url\u0027: console_info[\"url\"],"},{"line_number":1349,"context_line":"                       \u0027node\u0027: node.uuid},"},{"line_number":1350,"context_line":"                      instance\u003dinstance)"},{"line_number":1351,"context_line":"            raise exception.ConsoleTypeUnavailable(console_type\u003d\u0027serial\u0027)"},{"line_number":1352,"context_line":""},{"line_number":1353,"context_line":"        if url.scheme \u003d\u003d \"tcp\":"}],"source_content_type":"text/x-python","patch_set":23,"id":"fa7ab95a_7ff4dd86","line":1350,"range":{"start_line":1346,"start_character":12,"end_line":1350,"end_character":40},"in_reply_to":"fa7ab95a_424dee3c","updated":"2016-08-31 09:44:07.000000000","message":"I think this error should not happen. The only reason can give this error may be the corruption of data returned by Ironic conductor.","commit_id":"32a3d181a4a336c91ee67f8ef4d52e53f8aa4af8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b47ce2a193bf97ac4403e90f457a8b8c78f619b3","unresolved":false,"context_lines":[{"line_number":1354,"context_line":"            return console_type.ConsoleSerial(host\u003durl.hostname,"},{"line_number":1355,"context_line":"                                              port\u003durl.port)"},{"line_number":1356,"context_line":"        else:"},{"line_number":1357,"context_line":"            LOG.error(_LE(\u0027Socat serial console only supports \"tcp\". \u0027"},{"line_number":1358,"context_line":"                          \u0027This URL is \"%(url)s\" (ironic node %(node)s).\u0027) %"},{"line_number":1359,"context_line":"                      {\u0027url\u0027: console_info[\"url\"],"},{"line_number":1360,"context_line":"                       \u0027node\u0027: node.uuid},"},{"line_number":1361,"context_line":"                      instance\u003dinstance)"},{"line_number":1362,"context_line":"            raise exception.ConsoleTypeUnavailable(console_type\u003d\u0027serial\u0027)"}],"source_content_type":"text/x-python","patch_set":23,"id":"fa7ab95a_62f832c4","line":1361,"range":{"start_line":1357,"start_character":12,"end_line":1361,"end_character":40},"updated":"2016-08-29 18:30:09.000000000","message":"Similar, should an operator get paged for this? Is this validation that should happen on the Ironic side?","commit_id":"32a3d181a4a336c91ee67f8ef4d52e53f8aa4af8"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"b34f290fe909721cd4625c30cc824bbac31867fc","unresolved":false,"context_lines":[{"line_number":1354,"context_line":"            return console_type.ConsoleSerial(host\u003durl.hostname,"},{"line_number":1355,"context_line":"                                              port\u003durl.port)"},{"line_number":1356,"context_line":"        else:"},{"line_number":1357,"context_line":"            LOG.error(_LE(\u0027Socat serial console only supports \"tcp\". \u0027"},{"line_number":1358,"context_line":"                          \u0027This URL is \"%(url)s\" (ironic node %(node)s).\u0027) %"},{"line_number":1359,"context_line":"                      {\u0027url\u0027: console_info[\"url\"],"},{"line_number":1360,"context_line":"                       \u0027node\u0027: node.uuid},"},{"line_number":1361,"context_line":"                      instance\u003dinstance)"},{"line_number":1362,"context_line":"            raise exception.ConsoleTypeUnavailable(console_type\u003d\u0027serial\u0027)"}],"source_content_type":"text/x-python","patch_set":23,"id":"fa7ab95a_df9fa963","line":1361,"range":{"start_line":1357,"start_character":12,"end_line":1361,"end_character":40},"in_reply_to":"fa7ab95a_62f832c4","updated":"2016-08-31 09:44:07.000000000","message":"I think a warning is more reasonable in this case. The current implementation of socat console in Ironic side provides the only value \"tcp\".","commit_id":"32a3d181a4a336c91ee67f8ef4d52e53f8aa4af8"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"5204e653997d7c9afa2b0a6cb15a66f3787081f7","unresolved":false,"context_lines":[{"line_number":1336,"context_line":"            LOG.warning(_LW(\u0027Console type \"%(type)s\" (of ironic node \u0027"},{"line_number":1337,"context_line":"                            \u0027%(node)s) does not support Nova serial console\u0027) %"},{"line_number":1338,"context_line":"                        {\u0027type\u0027: console_info[\"type\"],"},{"line_number":1339,"context_line":"                         \u0027node\u0027: node.uuid},"},{"line_number":1340,"context_line":"                        instance\u003dinstance)"},{"line_number":1341,"context_line":"            raise exception.ConsoleTypeUnavailable(console_type\u003d\u0027serial\u0027)"},{"line_number":1342,"context_line":""}],"source_content_type":"text/x-python","patch_set":24,"id":"9a89bdaa_63661fbc","line":1339,"updated":"2016-09-08 20:16:08.000000000","message":"the dict should be passed as an arg to LOG.warning() to defer formatting of the string. (Ditto for the others.)","commit_id":"f5e7978d1b900c289c1850102a509065141abc31"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"a09d59f3149c217d9e90344ff2f381449b954368","unresolved":false,"context_lines":[{"line_number":1282,"context_line":"                                                         result)"},{"line_number":1283,"context_line":"            timer.start(interval\u003d_CONSOLE_STATE_CHECKING_INTERVAL).wait()"},{"line_number":1284,"context_line":""},{"line_number":1285,"context_line":"            return result[\u0027console\u0027]"},{"line_number":1286,"context_line":""},{"line_number":1287,"context_line":"        # Acquire the console"},{"line_number":1288,"context_line":"        console \u003d _get_console()"}],"source_content_type":"text/x-python","patch_set":25,"id":"fa6399be_eeaa0785","line":1285,"updated":"2016-10-10 20:57:06.000000000","message":"Not a huge fan of defining all of these functions here, could we break them out to module-level methods?","commit_id":"38ba9d49427b4922fb5a9e1be2c7916e48ff73a4"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"6aa316fc1d0f57ac64cf801c92a930151b9e5d37","unresolved":false,"context_lines":[{"line_number":1282,"context_line":"                                                         result)"},{"line_number":1283,"context_line":"            timer.start(interval\u003d_CONSOLE_STATE_CHECKING_INTERVAL).wait()"},{"line_number":1284,"context_line":""},{"line_number":1285,"context_line":"            return result[\u0027console\u0027]"},{"line_number":1286,"context_line":""},{"line_number":1287,"context_line":"        # Acquire the console"},{"line_number":1288,"context_line":"        console \u003d _get_console()"}],"source_content_type":"text/x-python","patch_set":25,"id":"fa6399be_318374ce","line":1285,"in_reply_to":"fa6399be_eeaa0785","updated":"2016-10-11 09:23:54.000000000","message":"These functions use \u0027self.ironicclient\u0027 variable, so I think they could be at class-level at least. But that will require to update the whole unit test functions.","commit_id":"38ba9d49427b4922fb5a9e1be2c7916e48ff73a4"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"66a60b3ab263582b8b82b4e377db89b0d8177bb1","unresolved":false,"context_lines":[{"line_number":23,"context_line":"import base64"},{"line_number":24,"context_line":"import gzip"},{"line_number":25,"context_line":"import shutil"},{"line_number":26,"context_line":"import six.moves.urllib.parse as urlparse"},{"line_number":27,"context_line":"import tempfile"},{"line_number":28,"context_line":"import time"},{"line_number":29,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"fa6399be_f4565805","line":26,"updated":"2016-10-10 21:57:39.000000000","message":"This is a third party import, should be in the 2nd import group below.","commit_id":"2562454827407184ae2606e27d143616e4d8f498"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"58ed0d98610254f17764e8eab85357576bbb011b","unresolved":false,"context_lines":[{"line_number":23,"context_line":"import base64"},{"line_number":24,"context_line":"import gzip"},{"line_number":25,"context_line":"import shutil"},{"line_number":26,"context_line":"import six.moves.urllib.parse as urlparse"},{"line_number":27,"context_line":"import tempfile"},{"line_number":28,"context_line":"import time"},{"line_number":29,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"fa6399be_c68eff26","line":26,"in_reply_to":"fa6399be_f4565805","updated":"2016-10-11 09:24:30.000000000","message":"Done","commit_id":"2562454827407184ae2606e27d143616e4d8f498"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"cc2753470c250a6970cd0b179c683e1c5584fe5c","unresolved":false,"context_lines":[{"line_number":84,"context_line":"# Console state checking interval in seconds"},{"line_number":85,"context_line":"_CONSOLE_STATE_CHECKING_INTERVAL \u003d 1"},{"line_number":86,"context_line":"# Console state timeout in seconds"},{"line_number":87,"context_line":"_CONSOLE_STATE_TIMEOUT \u003d 10"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"def map_power_state(state):"}],"source_content_type":"text/x-python","patch_set":26,"id":"fa6399be_9490bcee","line":87,"updated":"2016-10-10 22:16:59.000000000","message":"Might not be a bad idea to make this configurable.","commit_id":"2562454827407184ae2606e27d143616e4d8f498"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"ddb3b6a87dc2f2ae6661537d8c0e885e0d6743a5","unresolved":false,"context_lines":[{"line_number":84,"context_line":"# Console state checking interval in seconds"},{"line_number":85,"context_line":"_CONSOLE_STATE_CHECKING_INTERVAL \u003d 1"},{"line_number":86,"context_line":"# Console state timeout in seconds"},{"line_number":87,"context_line":"_CONSOLE_STATE_TIMEOUT \u003d 10"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"def map_power_state(state):"}],"source_content_type":"text/x-python","patch_set":26,"id":"fa6399be_f443b86a","line":87,"updated":"2016-10-10 22:16:35.000000000","message":"This seems like it could be pretty short for some hardware. Would it be possible to make console state things time out on the ironic side, and then just watch for some failure state? If not, can we make this a config?","commit_id":"2562454827407184ae2606e27d143616e4d8f498"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"58ed0d98610254f17764e8eab85357576bbb011b","unresolved":false,"context_lines":[{"line_number":84,"context_line":"# Console state checking interval in seconds"},{"line_number":85,"context_line":"_CONSOLE_STATE_CHECKING_INTERVAL \u003d 1"},{"line_number":86,"context_line":"# Console state timeout in seconds"},{"line_number":87,"context_line":"_CONSOLE_STATE_TIMEOUT \u003d 10"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"def map_power_state(state):"}],"source_content_type":"text/x-python","patch_set":26,"id":"fa6399be_0699d76e","line":87,"in_reply_to":"fa6399be_9490bcee","updated":"2016-10-11 09:24:30.000000000","message":"Done","commit_id":"2562454827407184ae2606e27d143616e4d8f498"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"54949cf802443acaffa1065e5a082b94afa53234","unresolved":false,"context_lines":[{"line_number":84,"context_line":"# Console state checking interval in seconds"},{"line_number":85,"context_line":"_CONSOLE_STATE_CHECKING_INTERVAL \u003d 1"},{"line_number":86,"context_line":"# Console state timeout in seconds"},{"line_number":87,"context_line":"_CONSOLE_STATE_TIMEOUT \u003d 10"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"def map_power_state(state):"}],"source_content_type":"text/x-python","patch_set":26,"id":"fa6399be_c12b5132","line":87,"in_reply_to":"fa6399be_9490bcee","updated":"2016-10-10 23:26:18.000000000","message":"I feel this patch is too big as the first step due to much much error handling, and that makes reviewing/implementing hard for requiring to pay attentions like this.\n\nHow about removing most error handling code as the minimum and adding these error handling after the first patch is merged if really necessary ?","commit_id":"2562454827407184ae2606e27d143616e4d8f498"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"58ed0d98610254f17764e8eab85357576bbb011b","unresolved":false,"context_lines":[{"line_number":84,"context_line":"# Console state checking interval in seconds"},{"line_number":85,"context_line":"_CONSOLE_STATE_CHECKING_INTERVAL \u003d 1"},{"line_number":86,"context_line":"# Console state timeout in seconds"},{"line_number":87,"context_line":"_CONSOLE_STATE_TIMEOUT \u003d 10"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"def map_power_state(state):"}],"source_content_type":"text/x-python","patch_set":26,"id":"fa6399be_4fabdc89","line":87,"in_reply_to":"fa6399be_c12b5132","updated":"2016-10-11 09:24:30.000000000","message":"I think this patch is big because most of it is unit test. Reducing the main code seems quite difficult, I think.","commit_id":"2562454827407184ae2606e27d143616e4d8f498"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b4691dfc96c47f793b07cb7156a7175753094dc8","unresolved":false,"context_lines":[{"line_number":84,"context_line":"# Console state checking interval in seconds"},{"line_number":85,"context_line":"_CONSOLE_STATE_CHECKING_INTERVAL \u003d 1"},{"line_number":86,"context_line":"# Console state timeout in seconds"},{"line_number":87,"context_line":"_CONSOLE_STATE_TIMEOUT \u003d 10"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"def map_power_state(state):"}],"source_content_type":"text/x-python","patch_set":26,"id":"fa6399be_ec4e68c0","line":87,"in_reply_to":"fa6399be_c12b5132","updated":"2016-10-11 16:27:38.000000000","message":"I\u0027d like to keep the error handling in.","commit_id":"2562454827407184ae2606e27d143616e4d8f498"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"58ed0d98610254f17764e8eab85357576bbb011b","unresolved":false,"context_lines":[{"line_number":84,"context_line":"# Console state checking interval in seconds"},{"line_number":85,"context_line":"_CONSOLE_STATE_CHECKING_INTERVAL \u003d 1"},{"line_number":86,"context_line":"# Console state timeout in seconds"},{"line_number":87,"context_line":"_CONSOLE_STATE_TIMEOUT \u003d 10"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"def map_power_state(state):"}],"source_content_type":"text/x-python","patch_set":26,"id":"fa6399be_e693034e","line":87,"in_reply_to":"fa6399be_f443b86a","updated":"2016-10-11 09:24:30.000000000","message":"I made it a config.","commit_id":"2562454827407184ae2606e27d143616e4d8f498"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"66a60b3ab263582b8b82b4e377db89b0d8177bb1","unresolved":false,"context_lines":[{"line_number":1233,"context_line":"        return super(IronicDriver, self).network_binding_host_id("},{"line_number":1234,"context_line":"            context, instance)"},{"line_number":1235,"context_line":""},{"line_number":1236,"context_line":"    def _get_node_console_with_reset(self, instance, reset_console\u003dFalse):"},{"line_number":1237,"context_line":"        \"\"\"Acquire console information for an instance."},{"line_number":1238,"context_line":""},{"line_number":1239,"context_line":"        If the console is enabled and reset_console is True, the console"}],"source_content_type":"text/x-python","patch_set":26,"id":"fa6399be_b4e86018","line":1236,"range":{"start_line":1236,"start_character":53,"end_line":1236,"end_character":72},"updated":"2016-10-10 21:57:39.000000000","message":"Why even have this kwarg? It\u0027s only ever called with True.","commit_id":"2562454827407184ae2606e27d143616e4d8f498"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"58ed0d98610254f17764e8eab85357576bbb011b","unresolved":false,"context_lines":[{"line_number":1233,"context_line":"        return super(IronicDriver, self).network_binding_host_id("},{"line_number":1234,"context_line":"            context, instance)"},{"line_number":1235,"context_line":""},{"line_number":1236,"context_line":"    def _get_node_console_with_reset(self, instance, reset_console\u003dFalse):"},{"line_number":1237,"context_line":"        \"\"\"Acquire console information for an instance."},{"line_number":1238,"context_line":""},{"line_number":1239,"context_line":"        If the console is enabled and reset_console is True, the console"}],"source_content_type":"text/x-python","patch_set":26,"id":"fa6399be_66a0d391","line":1236,"range":{"start_line":1236,"start_character":53,"end_line":1236,"end_character":72},"in_reply_to":"fa6399be_b4e86018","updated":"2016-10-11 09:24:30.000000000","message":"Done","commit_id":"2562454827407184ae2606e27d143616e4d8f498"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"66a60b3ab263582b8b82b4e377db89b0d8177bb1","unresolved":false,"context_lines":[{"line_number":1242,"context_line":"        :param instance: nova instance"},{"line_number":1243,"context_line":"        :param reset_console: if True, reset the console when the console"},{"line_number":1244,"context_line":"            is enabled"},{"line_number":1245,"context_line":"        :return: a dictionary of ironic node and console info"},{"line_number":1246,"context_line":"        :raise ConsoleNotAvailable: if console is unavailable"},{"line_number":1247,"context_line":"            for the instance"},{"line_number":1248,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":26,"id":"fa6399be_34dd3071","line":1245,"updated":"2016-10-10 21:57:39.000000000","message":"nit: would be good to be specific about the key names in the returned dict. Or use a namedtuple...","commit_id":"2562454827407184ae2606e27d143616e4d8f498"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"58ed0d98610254f17764e8eab85357576bbb011b","unresolved":false,"context_lines":[{"line_number":1242,"context_line":"        :param instance: nova instance"},{"line_number":1243,"context_line":"        :param reset_console: if True, reset the console when the console"},{"line_number":1244,"context_line":"            is enabled"},{"line_number":1245,"context_line":"        :return: a dictionary of ironic node and console info"},{"line_number":1246,"context_line":"        :raise ConsoleNotAvailable: if console is unavailable"},{"line_number":1247,"context_line":"            for the instance"},{"line_number":1248,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":26,"id":"fa6399be_86ade78a","line":1245,"in_reply_to":"fa6399be_34dd3071","updated":"2016-10-11 09:24:30.000000000","message":"Done","commit_id":"2562454827407184ae2606e27d143616e4d8f498"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"cc2753470c250a6970cd0b179c683e1c5584fe5c","unresolved":false,"context_lines":[{"line_number":1276,"context_line":""},{"line_number":1277,"context_line":"            _log_ironic_polling(\u0027set console mode\u0027, node, instance)"},{"line_number":1278,"context_line":""},{"line_number":1279,"context_line":"        def _set_console_mode(mode):"},{"line_number":1280,"context_line":"            try:"},{"line_number":1281,"context_line":"                self.ironicclient.call(\u0027node.set_console_mode\u0027, node_uuid,"},{"line_number":1282,"context_line":"                                       mode)"}],"source_content_type":"text/x-python","patch_set":26,"id":"fa6399be_74f168cd","line":1279,"range":{"start_line":1279,"start_character":12,"end_line":1279,"end_character":29},"updated":"2016-10-10 22:16:59.000000000","message":"nit: I\u0027d probably name this _enable_console since set_console_mode is not really clear until you look at the ironicclient docstring on this.","commit_id":"2562454827407184ae2606e27d143616e4d8f498"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"58ed0d98610254f17764e8eab85357576bbb011b","unresolved":false,"context_lines":[{"line_number":1276,"context_line":""},{"line_number":1277,"context_line":"            _log_ironic_polling(\u0027set console mode\u0027, node, instance)"},{"line_number":1278,"context_line":""},{"line_number":1279,"context_line":"        def _set_console_mode(mode):"},{"line_number":1280,"context_line":"            try:"},{"line_number":1281,"context_line":"                self.ironicclient.call(\u0027node.set_console_mode\u0027, node_uuid,"},{"line_number":1282,"context_line":"                                       mode)"}],"source_content_type":"text/x-python","patch_set":26,"id":"fa6399be_a6aaeb6e","line":1279,"range":{"start_line":1279,"start_character":12,"end_line":1279,"end_character":29},"in_reply_to":"fa6399be_74f168cd","updated":"2016-10-11 09:24:30.000000000","message":"Done","commit_id":"2562454827407184ae2606e27d143616e4d8f498"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"cc2753470c250a6970cd0b179c683e1c5584fe5c","unresolved":false,"context_lines":[{"line_number":1280,"context_line":"            try:"},{"line_number":1281,"context_line":"                self.ironicclient.call(\u0027node.set_console_mode\u0027, node_uuid,"},{"line_number":1282,"context_line":"                                       mode)"},{"line_number":1283,"context_line":"            except (exception.NovaException,  # Retry failed"},{"line_number":1284,"context_line":"                    ironic.exc.InternalServerError,  # Validations"},{"line_number":1285,"context_line":"                    ironic.exc.BadRequest) as e:  # Maintenance"},{"line_number":1286,"context_line":"                LOG.error(_LE(\u0027Failed to set console mode to \"%(mode)s\" \u0027"},{"line_number":1287,"context_line":"                              \u0027for instance %(inst)s: %(reason)s\u0027),"},{"line_number":1288,"context_line":"                          {\u0027mode\u0027: mode,"}],"source_content_type":"text/x-python","patch_set":26,"id":"fa6399be_74c40840","line":1285,"range":{"start_line":1283,"start_character":12,"end_line":1285,"end_character":63},"updated":"2016-10-10 22:16:59.000000000","message":"nit: would be nice if we had a context manager or helper method for calling ironic and handling common types of failures, at least in here, but it might make this uglier so I\u0027m not sure it\u0027s worth it.","commit_id":"2562454827407184ae2606e27d143616e4d8f498"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"cc2753470c250a6970cd0b179c683e1c5584fe5c","unresolved":false,"context_lines":[{"line_number":1290,"context_line":"                           \u0027reason\u0027: e})"},{"line_number":1291,"context_line":"                raise exception.ConsoleNotAvailable()"},{"line_number":1292,"context_line":""},{"line_number":1293,"context_line":"            result \u003d {\u0027console\u0027: None}"},{"line_number":1294,"context_line":"            expiration \u003d time.time() + _CONSOLE_STATE_TIMEOUT"},{"line_number":1295,"context_line":"            timer \u003d loopingcall.FixedIntervalLoopingCall(_wait_state,"},{"line_number":1296,"context_line":"                                                         mode,"},{"line_number":1297,"context_line":"                                                         expiration,"},{"line_number":1298,"context_line":"                                                         result)"},{"line_number":1299,"context_line":"            timer.start(interval\u003d_CONSOLE_STATE_CHECKING_INTERVAL).wait()"},{"line_number":1300,"context_line":""},{"line_number":1301,"context_line":"            return result[\u0027console\u0027]"},{"line_number":1302,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"fa6399be_14ed8c8b","line":1299,"range":{"start_line":1293,"start_character":12,"end_line":1299,"end_character":73},"updated":"2016-10-10 22:16:59.000000000","message":"A comment explaining what we\u0027re doing here would be nice, i.e. waiting for the console state to change (disabled/enabled). I figured this would be a call on the ironic API side, but I guess it\u0027s a cast?","commit_id":"2562454827407184ae2606e27d143616e4d8f498"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"58ed0d98610254f17764e8eab85357576bbb011b","unresolved":false,"context_lines":[{"line_number":1290,"context_line":"                           \u0027reason\u0027: e})"},{"line_number":1291,"context_line":"                raise exception.ConsoleNotAvailable()"},{"line_number":1292,"context_line":""},{"line_number":1293,"context_line":"            result \u003d {\u0027console\u0027: None}"},{"line_number":1294,"context_line":"            expiration \u003d time.time() + _CONSOLE_STATE_TIMEOUT"},{"line_number":1295,"context_line":"            timer \u003d loopingcall.FixedIntervalLoopingCall(_wait_state,"},{"line_number":1296,"context_line":"                                                         mode,"},{"line_number":1297,"context_line":"                                                         expiration,"},{"line_number":1298,"context_line":"                                                         result)"},{"line_number":1299,"context_line":"            timer.start(interval\u003d_CONSOLE_STATE_CHECKING_INTERVAL).wait()"},{"line_number":1300,"context_line":""},{"line_number":1301,"context_line":"            return result[\u0027console\u0027]"},{"line_number":1302,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"fa6399be_e6ba23c0","line":1299,"range":{"start_line":1293,"start_character":12,"end_line":1299,"end_character":73},"in_reply_to":"fa6399be_14ed8c8b","updated":"2016-10-11 09:24:30.000000000","message":"Done","commit_id":"2562454827407184ae2606e27d143616e4d8f498"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"cc2753470c250a6970cd0b179c683e1c5584fe5c","unresolved":false,"context_lines":[{"line_number":1325,"context_line":"            return {\u0027node\u0027: node,"},{"line_number":1326,"context_line":"                    \u0027console_info\u0027: console[\u0027console_info\u0027]}"},{"line_number":1327,"context_line":"        else:"},{"line_number":1328,"context_line":"            LOG.warning(_LW(\u0027Console is disabled for instance %s\u0027),"},{"line_number":1329,"context_line":"                        instance.uuid)"},{"line_number":1330,"context_line":"            raise exception.ConsoleNotAvailable()"},{"line_number":1331,"context_line":""},{"line_number":1332,"context_line":"    def get_serial_console(self, context, instance):"}],"source_content_type":"text/x-python","patch_set":26,"id":"fa6399be_345e1046","line":1329,"range":{"start_line":1328,"start_character":12,"end_line":1329,"end_character":38},"updated":"2016-10-10 22:16:59.000000000","message":"This doesn\u0027t seem like something we should warn about in the compute logs, as this is something the user could do with their node\u0027s console via the ironic API right? So this is just a case where the console is disabled. I\u0027d log this as a debug message, not warning.","commit_id":"2562454827407184ae2606e27d143616e4d8f498"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"58ed0d98610254f17764e8eab85357576bbb011b","unresolved":false,"context_lines":[{"line_number":1325,"context_line":"            return {\u0027node\u0027: node,"},{"line_number":1326,"context_line":"                    \u0027console_info\u0027: console[\u0027console_info\u0027]}"},{"line_number":1327,"context_line":"        else:"},{"line_number":1328,"context_line":"            LOG.warning(_LW(\u0027Console is disabled for instance %s\u0027),"},{"line_number":1329,"context_line":"                        instance.uuid)"},{"line_number":1330,"context_line":"            raise exception.ConsoleNotAvailable()"},{"line_number":1331,"context_line":""},{"line_number":1332,"context_line":"    def get_serial_console(self, context, instance):"}],"source_content_type":"text/x-python","patch_set":26,"id":"fa6399be_06b0f7dc","line":1329,"range":{"start_line":1328,"start_character":12,"end_line":1329,"end_character":38},"in_reply_to":"fa6399be_345e1046","updated":"2016-10-11 09:24:30.000000000","message":"Done","commit_id":"2562454827407184ae2606e27d143616e4d8f498"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c12e5cce3177e1924c8de800b1d115cd16c1a002","unresolved":false,"context_lines":[{"line_number":1274,"context_line":"                result[\u0027console\u0027] \u003d console"},{"line_number":1275,"context_line":"                raise loopingcall.LoopingCallDone()"},{"line_number":1276,"context_line":""},{"line_number":1277,"context_line":"            if expiration and time.time() \u003e expiration:"},{"line_number":1278,"context_line":"                LOG.error(_LE(\u0027Timeout while waiting for console mode to be \u0027"},{"line_number":1279,"context_line":"                              \u0027set to \"%(mode)s\" on node %(node)s\u0027),"},{"line_number":1280,"context_line":"                          {\u0027mode\u0027: state,"},{"line_number":1281,"context_line":"                           \u0027node\u0027: node_uuid})"},{"line_number":1282,"context_line":"                raise exception.ConsoleNotAvailable()"},{"line_number":1283,"context_line":""},{"line_number":1284,"context_line":"            _log_ironic_polling(\u0027set console mode\u0027, node, instance)"},{"line_number":1285,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"fa6399be_47e2cdd6","line":1282,"range":{"start_line":1277,"start_character":12,"end_line":1282,"end_character":53},"updated":"2016-10-11 16:52:07.000000000","message":"Why don\u0027t we use a BackOffLoopingCall? Then the timeout logic is handled for us:\n\nhttps://github.com/openstack/oslo.service/blob/1.10.0/oslo_service/loopingcall.py#L221","commit_id":"799d1997694f42f4770f4b2d48eeccbeb77a8856"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"707772077cfb06f4028f64299af58dbc767e1c70","unresolved":false,"context_lines":[{"line_number":1274,"context_line":"                result[\u0027console\u0027] \u003d console"},{"line_number":1275,"context_line":"                raise loopingcall.LoopingCallDone()"},{"line_number":1276,"context_line":""},{"line_number":1277,"context_line":"            if expiration and time.time() \u003e expiration:"},{"line_number":1278,"context_line":"                LOG.error(_LE(\u0027Timeout while waiting for console mode to be \u0027"},{"line_number":1279,"context_line":"                              \u0027set to \"%(mode)s\" on node %(node)s\u0027),"},{"line_number":1280,"context_line":"                          {\u0027mode\u0027: state,"},{"line_number":1281,"context_line":"                           \u0027node\u0027: node_uuid})"},{"line_number":1282,"context_line":"                raise exception.ConsoleNotAvailable()"},{"line_number":1283,"context_line":""},{"line_number":1284,"context_line":"            _log_ironic_polling(\u0027set console mode\u0027, node, instance)"},{"line_number":1285,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"fa6399be_e8055fc2","line":1282,"range":{"start_line":1277,"start_character":12,"end_line":1282,"end_character":53},"in_reply_to":"fa6399be_47e2cdd6","updated":"2016-10-12 04:34:52.000000000","message":"Done","commit_id":"799d1997694f42f4770f4b2d48eeccbeb77a8856"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b14c4af6f938f18047c295f05074003a784fb368","unresolved":false,"context_lines":[{"line_number":1293,"context_line":"                    starting_interval\u003d_CONSOLE_STATE_CHECKING_INTERVAL,"},{"line_number":1294,"context_line":"                    timeout\u003dCONF.ironic.serial_console_state_timeout,"},{"line_number":1295,"context_line":"                    jitter\u003d0.5).wait()"},{"line_number":1296,"context_line":"            except loopingcall.LoopingCallTimeOut:"},{"line_number":1297,"context_line":"                LOG.error(_LE(\u0027Timeout while waiting for console mode to be \u0027"},{"line_number":1298,"context_line":"                              \u0027set to \"%(mode)s\" on node %(node)s\u0027),"},{"line_number":1299,"context_line":"                          {\u0027mode\u0027: mode,"}],"source_content_type":"text/x-python","patch_set":28,"id":"fa6399be_1279c0c8","line":1296,"range":{"start_line":1296,"start_character":31,"end_line":1296,"end_character":49},"updated":"2016-10-12 17:53:32.000000000","message":"There is no test coverage for this.","commit_id":"ec76f6317552f7fa32a50cc9d31e310ac116c9f0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"cb19a8190f85f86bb1b4db8c202f2bbbf4680ca1","unresolved":false,"context_lines":[{"line_number":1293,"context_line":"                    starting_interval\u003d_CONSOLE_STATE_CHECKING_INTERVAL,"},{"line_number":1294,"context_line":"                    timeout\u003dCONF.ironic.serial_console_state_timeout,"},{"line_number":1295,"context_line":"                    jitter\u003d0.5).wait()"},{"line_number":1296,"context_line":"            except loopingcall.LoopingCallTimeOut:"},{"line_number":1297,"context_line":"                LOG.error(_LE(\u0027Timeout while waiting for console mode to be \u0027"},{"line_number":1298,"context_line":"                              \u0027set to \"%(mode)s\" on node %(node)s\u0027),"},{"line_number":1299,"context_line":"                          {\u0027mode\u0027: mode,"}],"source_content_type":"text/x-python","patch_set":28,"id":"fa6399be_4df399d6","line":1296,"range":{"start_line":1296,"start_character":31,"end_line":1296,"end_character":49},"in_reply_to":"fa6399be_1279c0c8","updated":"2016-10-12 18:13:20.000000000","message":"At least according to the coverage report I ran against this. It\u0027s pretty hard to tell all of the failure modes in the testes are what we expect given the same exception is raised out of this method for everything that can go wrong.","commit_id":"ec76f6317552f7fa32a50cc9d31e310ac116c9f0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"37d88eeffe7a7046fbc69ff2d9c6a51b523a20ab","unresolved":false,"context_lines":[{"line_number":1293,"context_line":"                    starting_interval\u003d_CONSOLE_STATE_CHECKING_INTERVAL,"},{"line_number":1294,"context_line":"                    timeout\u003dCONF.ironic.serial_console_state_timeout,"},{"line_number":1295,"context_line":"                    jitter\u003d0.5).wait()"},{"line_number":1296,"context_line":"            except loopingcall.LoopingCallTimeOut:"},{"line_number":1297,"context_line":"                LOG.error(_LE(\u0027Timeout while waiting for console mode to be \u0027"},{"line_number":1298,"context_line":"                              \u0027set to \"%(mode)s\" on node %(node)s\u0027),"},{"line_number":1299,"context_line":"                          {\u0027mode\u0027: mode,"}],"source_content_type":"text/x-python","patch_set":28,"id":"fa6399be_186ac1b3","line":1296,"range":{"start_line":1296,"start_character":31,"end_line":1296,"end_character":49},"in_reply_to":"fa6399be_4df399d6","updated":"2016-10-12 18:22:14.000000000","message":"I don\u0027t know why the coverage report is messed up, but this is definitely covered, I pulled this change down and remove this handling and things failed.","commit_id":"ec76f6317552f7fa32a50cc9d31e310ac116c9f0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b14c4af6f938f18047c295f05074003a784fb368","unresolved":false,"context_lines":[{"line_number":1357,"context_line":""},{"line_number":1358,"context_line":"        try:"},{"line_number":1359,"context_line":"            url \u003d urlparse.urlparse(console_info[\"url\"])"},{"line_number":1360,"context_line":"        except AttributeError:"},{"line_number":1361,"context_line":"            LOG.error(_LE(\u0027Invalid Socat console URL \"%(url)s\" \u0027"},{"line_number":1362,"context_line":"                          \u0027(ironic node %(node)s)\u0027),"},{"line_number":1363,"context_line":"                      {\u0027url\u0027: console_info[\"url\"],"}],"source_content_type":"text/x-python","patch_set":28,"id":"fa6399be_b2673424","line":1360,"range":{"start_line":1360,"start_character":15,"end_line":1360,"end_character":29},"updated":"2016-10-12 17:53:32.000000000","message":"There is no test coverage for this.","commit_id":"ec76f6317552f7fa32a50cc9d31e310ac116c9f0"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"9005441dafc9e3eccd23077db107d532d3880112","unresolved":false,"context_lines":[{"line_number":1357,"context_line":""},{"line_number":1358,"context_line":"        try:"},{"line_number":1359,"context_line":"            url \u003d urlparse.urlparse(console_info[\"url\"])"},{"line_number":1360,"context_line":"        except AttributeError:"},{"line_number":1361,"context_line":"            LOG.error(_LE(\u0027Invalid Socat console URL \"%(url)s\" \u0027"},{"line_number":1362,"context_line":"                          \u0027(ironic node %(node)s)\u0027),"},{"line_number":1363,"context_line":"                      {\u0027url\u0027: console_info[\"url\"],"}],"source_content_type":"text/x-python","patch_set":28,"id":"fa6399be_46efe886","line":1360,"range":{"start_line":1360,"start_character":15,"end_line":1360,"end_character":29},"in_reply_to":"fa6399be_b2673424","updated":"2016-10-13 04:04:02.000000000","message":"There is a test for this: test_get_serial_console_socat_invalid_url. But it\u0027s not good enough since it checks only the raise of ConsoleTypeUnavailable. When I added more check to it, that detected incorrect code. urlparse() doesnot throw any exception even the url is malformed.","commit_id":"ec76f6317552f7fa32a50cc9d31e310ac116c9f0"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"fec44130de4d15a0f4c632c9eef6058d05aebd24","unresolved":false,"context_lines":[{"line_number":1360,"context_line":"        try:"},{"line_number":1361,"context_line":"            scheme \u003d url.scheme"},{"line_number":1362,"context_line":"            hostname \u003d url.hostname"},{"line_number":1363,"context_line":"            port \u003d url.port"},{"line_number":1364,"context_line":"            if not (scheme and hostname and port):"},{"line_number":1365,"context_line":"                raise AssertionError()"},{"line_number":1366,"context_line":"        except (ValueError, AssertionError):"}],"source_content_type":"text/x-python","patch_set":29,"id":"fa6399be_6fd9f521","line":1363,"updated":"2016-10-13 21:06:10.000000000","message":"port has to be explicit? What if the url is https://somehost.com/console ?","commit_id":"4b15a366c211acab4b31ea46eb70c2c669764f33"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"34d01d1ba197634e98820c43d262767a9241498f","unresolved":false,"context_lines":[{"line_number":1360,"context_line":"        try:"},{"line_number":1361,"context_line":"            scheme \u003d url.scheme"},{"line_number":1362,"context_line":"            hostname \u003d url.hostname"},{"line_number":1363,"context_line":"            port \u003d url.port"},{"line_number":1364,"context_line":"            if not (scheme and hostname and port):"},{"line_number":1365,"context_line":"                raise AssertionError()"},{"line_number":1366,"context_line":"        except (ValueError, AssertionError):"}],"source_content_type":"text/x-python","patch_set":29,"id":"fa6399be_a1c87923","line":1363,"in_reply_to":"fa6399be_6fd9f521","updated":"2016-10-14 03:04:05.000000000","message":"Yes, port is explicit. Each baremetal serial console needs a port, and ironic opens multiple ports in the conductor node for the baremetals. So there is no default port.\n\nWith this check, these urls are accepted:\nabc://hostname:10000\n123://10.10:10000/path (path is ignored)\nabc://invalid hostname:10000\n\nThe url https://somehost.com/console is unaccepted due to missing port.","commit_id":"4b15a366c211acab4b31ea46eb70c2c669764f33"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"fbfa30ba0cd58be59fd7924378e8876bee14e43a","unresolved":false,"context_lines":[{"line_number":1362,"context_line":"            hostname \u003d url.hostname"},{"line_number":1363,"context_line":"            port \u003d url.port"},{"line_number":1364,"context_line":"            if not (scheme and hostname and port):"},{"line_number":1365,"context_line":"                raise AssertionError()"},{"line_number":1366,"context_line":"        except (ValueError, AssertionError):"},{"line_number":1367,"context_line":"            LOG.error(_LE(\u0027Invalid Socat console URL \"%(url)s\" \u0027"},{"line_number":1368,"context_line":"                          \u0027(ironic node %(node)s)\u0027),"}],"source_content_type":"text/x-python","patch_set":29,"id":"fa6399be_cf3201a7","line":1365,"range":{"start_line":1365,"start_character":16,"end_line":1365,"end_character":38},"updated":"2016-10-13 20:49:02.000000000","message":"This is a bit odd to me, but I don\u0027t have a great alternative.","commit_id":"4b15a366c211acab4b31ea46eb70c2c669764f33"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"fec44130de4d15a0f4c632c9eef6058d05aebd24","unresolved":false,"context_lines":[{"line_number":1363,"context_line":"            port \u003d url.port"},{"line_number":1364,"context_line":"            if not (scheme and hostname and port):"},{"line_number":1365,"context_line":"                raise AssertionError()"},{"line_number":1366,"context_line":"        except (ValueError, AssertionError):"},{"line_number":1367,"context_line":"            LOG.error(_LE(\u0027Invalid Socat console URL \"%(url)s\" \u0027"},{"line_number":1368,"context_line":"                          \u0027(ironic node %(node)s)\u0027),"},{"line_number":1369,"context_line":"                      {\u0027url\u0027: console_info[\"url\"],"}],"source_content_type":"text/x-python","patch_set":29,"id":"fa6399be_cf0a018a","line":1366,"updated":"2016-10-13 21:06:10.000000000","message":"ValueError is just if port parsing is odd?","commit_id":"4b15a366c211acab4b31ea46eb70c2c669764f33"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"fec44130de4d15a0f4c632c9eef6058d05aebd24","unresolved":false,"context_lines":[{"line_number":1371,"context_line":"                      instance\u003dinstance)"},{"line_number":1372,"context_line":"            raise exception.ConsoleTypeUnavailable(console_type\u003d\u0027serial\u0027)"},{"line_number":1373,"context_line":""},{"line_number":1374,"context_line":"        if scheme \u003d\u003d \"tcp\":"},{"line_number":1375,"context_line":"            return console_type.ConsoleSerial(host\u003dhostname,"},{"line_number":1376,"context_line":"                                              port\u003dport)"},{"line_number":1377,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":29,"id":"fa6399be_cf668150","line":1374,"updated":"2016-10-13 21:06:10.000000000","message":"ok, so the https comment above I guess doesn\u0027t apply. I guess it would still be nice if there was a sane default for port.","commit_id":"4b15a366c211acab4b31ea46eb70c2c669764f33"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"34d01d1ba197634e98820c43d262767a9241498f","unresolved":false,"context_lines":[{"line_number":1371,"context_line":"                      instance\u003dinstance)"},{"line_number":1372,"context_line":"            raise exception.ConsoleTypeUnavailable(console_type\u003d\u0027serial\u0027)"},{"line_number":1373,"context_line":""},{"line_number":1374,"context_line":"        if scheme \u003d\u003d \"tcp\":"},{"line_number":1375,"context_line":"            return console_type.ConsoleSerial(host\u003dhostname,"},{"line_number":1376,"context_line":"                                              port\u003dport)"},{"line_number":1377,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":29,"id":"fa6399be_01a2054b","line":1374,"in_reply_to":"fa6399be_cf668150","updated":"2016-10-14 03:04:05.000000000","message":"Please my above answer.","commit_id":"4b15a366c211acab4b31ea46eb70c2c669764f33"}],"releasenotes/notes/ironic-serial-console-support-82632bd4db6d1fda.yaml":[{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"a0630a55a322cf3ca59d3c8445c2c6ae172ad680","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - Adds serial console support to Ironic driver."}],"source_content_type":"text/x-yaml","patch_set":6,"id":"3aaa91ec_20ae0b2e","line":3,"range":{"start_line":3,"start_character":4,"end_line":3,"end_character":49},"updated":"2016-06-30 06:05:12.000000000","message":"Can we add more information here as this has limitation that it will work only if socat driver is configured on Ironic node otherwise ConsoleNotAvailable.\n\nThat will help users to understand this feature completely and how they can use the same.\n\nAlso we should add this detail information about how to configure/work serial console in case of ironic driver in api guide etc but we do not have anything yet about console so m ok to do that later.","commit_id":"d051518b1ec9bdce19298d0009edeabdf797550e"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"689d801ba6fba26b939f653a75ef450b23f8b853","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - Adds serial console support to Ironic driver."}],"source_content_type":"text/x-yaml","patch_set":6,"id":"3aaa91ec_d5ec20bd","line":3,"range":{"start_line":3,"start_character":4,"end_line":3,"end_character":49},"in_reply_to":"3aaa91ec_20ae0b2e","updated":"2016-06-30 08:42:35.000000000","message":"I\u0027ve added some more detail info to the release note. This feature requires serial console to be configured both in Nova and Ironic. How to set up serial console in Nova should be stated in Nova documentation. In Ironic, the doc is at: http://docs.openstack.org/developer/ironic/deploy/install-guide.html#webconsole\nBut currently, it lacks of info for socat console. The info should be added in this doc after the socat console implementation is done.","commit_id":"d051518b1ec9bdce19298d0009edeabdf797550e"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"76ba59a41150e735f97426a46ab6784154d59403","unresolved":false,"context_lines":[{"line_number":3,"context_line":"  - Adds serial console support to Ironic driver. Nova now supports"},{"line_number":4,"context_line":"    serial console to Ironic bare metals for Ironic ``socat`` console"},{"line_number":5,"context_line":"    driver."},{"line_number":6,"context_line":"    To get this feature work, serial console must be configured in Nova"},{"line_number":7,"context_line":"    and the Ironic ``socat`` console driver must be used and configured"},{"line_number":8,"context_line":"    in Ironic. Ironic serial console configuration is documented in"},{"line_number":9,"context_line":"    http://docs.openstack.org/developer/ironic/deploy/install-guide.html"}],"source_content_type":"text/x-yaml","patch_set":8,"id":"3aaa91ec_a022d0b6","line":6,"updated":"2016-06-30 19:25:10.000000000","message":"nit s/work/to work/","commit_id":"e4edd692478b6a45d6ba25271cbbb911775e2214"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"6449ab8e072d816fe4f1286977730313afa971cd","unresolved":false,"context_lines":[{"line_number":3,"context_line":"  - Adds serial console support to Ironic driver. Nova now supports"},{"line_number":4,"context_line":"    serial console to Ironic bare metals for Ironic ``socat`` console"},{"line_number":5,"context_line":"    driver."},{"line_number":6,"context_line":"    To get this feature work, serial console must be configured in Nova"},{"line_number":7,"context_line":"    and the Ironic ``socat`` console driver must be used and configured"},{"line_number":8,"context_line":"    in Ironic. Ironic serial console configuration is documented in"},{"line_number":9,"context_line":"    http://docs.openstack.org/developer/ironic/deploy/install-guide.html"}],"source_content_type":"text/x-yaml","patch_set":8,"id":"3aaa91ec_62c73b45","line":6,"in_reply_to":"3aaa91ec_a022d0b6","updated":"2016-07-01 08:01:38.000000000","message":"Done","commit_id":"e4edd692478b6a45d6ba25271cbbb911775e2214"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"352b1b86108538abf7800ddefeac0b65bc40e2a1","unresolved":false,"context_lines":[{"line_number":3,"context_line":"  - Adds serial console support to Ironic driver. Nova now supports"},{"line_number":4,"context_line":"    serial console to Ironic bare metals for Ironic ``socat`` console"},{"line_number":5,"context_line":"    driver."},{"line_number":6,"context_line":"    To get this feature work, serial console must be configured in Nova"},{"line_number":7,"context_line":"    and the Ironic ``socat`` console driver must be used and configured"},{"line_number":8,"context_line":"    in Ironic. Ironic serial console configuration is documented in"},{"line_number":9,"context_line":"    http://docs.openstack.org/developer/ironic/deploy/install-guide.html"}],"source_content_type":"text/x-yaml","patch_set":11,"id":"1aa78d24_ef066b84","line":6,"updated":"2016-07-07 17:40:02.000000000","message":"maybe s/To get this feature work/In order to use this feature/","commit_id":"7440329a625af35218a2dd9efdd71a6256e0dd6f"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"00d213521a6c82705044adbcaf4675b971a49085","unresolved":false,"context_lines":[{"line_number":3,"context_line":"  - Adds serial console support to Ironic driver. Nova now supports"},{"line_number":4,"context_line":"    serial console to Ironic bare metals for Ironic ``socat`` console"},{"line_number":5,"context_line":"    driver."},{"line_number":6,"context_line":"    To get this feature work, serial console must be configured in Nova"},{"line_number":7,"context_line":"    and the Ironic ``socat`` console driver must be used and configured"},{"line_number":8,"context_line":"    in Ironic. Ironic serial console configuration is documented in"},{"line_number":9,"context_line":"    http://docs.openstack.org/developer/ironic/deploy/install-guide.html"}],"source_content_type":"text/x-yaml","patch_set":11,"id":"1aa78d24_fe58d732","line":6,"in_reply_to":"1aa78d24_ef066b84","updated":"2016-07-07 18:56:34.000000000","message":"Done","commit_id":"7440329a625af35218a2dd9efdd71a6256e0dd6f"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"352b1b86108538abf7800ddefeac0b65bc40e2a1","unresolved":false,"context_lines":[{"line_number":6,"context_line":"    To get this feature work, serial console must be configured in Nova"},{"line_number":7,"context_line":"    and the Ironic ``socat`` console driver must be used and configured"},{"line_number":8,"context_line":"    in Ironic. Ironic serial console configuration is documented in"},{"line_number":9,"context_line":"    http://docs.openstack.org/developer/ironic/deploy/install-guide.html"}],"source_content_type":"text/x-yaml","patch_set":11,"id":"1aa78d24_8fec07bc","line":9,"updated":"2016-07-07 17:40:02.000000000","message":"missing period at end of sentence.","commit_id":"7440329a625af35218a2dd9efdd71a6256e0dd6f"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"00d213521a6c82705044adbcaf4675b971a49085","unresolved":false,"context_lines":[{"line_number":6,"context_line":"    To get this feature work, serial console must be configured in Nova"},{"line_number":7,"context_line":"    and the Ironic ``socat`` console driver must be used and configured"},{"line_number":8,"context_line":"    in Ironic. Ironic serial console configuration is documented in"},{"line_number":9,"context_line":"    http://docs.openstack.org/developer/ironic/deploy/install-guide.html"}],"source_content_type":"text/x-yaml","patch_set":11,"id":"1aa78d24_7e450741","line":9,"in_reply_to":"1aa78d24_8fec07bc","updated":"2016-07-07 18:56:34.000000000","message":"Done","commit_id":"7440329a625af35218a2dd9efdd71a6256e0dd6f"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"f666d1022e6bfd21fa82acc0fcbb2d8bf46e93a2","unresolved":false,"context_lines":[{"line_number":6,"context_line":"    In order to use this feature, serial console must be configured in Nova"},{"line_number":7,"context_line":"    and the Ironic ``socat`` console driver must be used and configured"},{"line_number":8,"context_line":"    in Ironic. Ironic serial console configuration is documented in"},{"line_number":9,"context_line":"    http://docs.openstack.org/developer/ironic/deploy/install-guide.html."}],"source_content_type":"text/x-yaml","patch_set":14,"id":"9ad45d7e_fc3603b3","line":9,"range":{"start_line":9,"start_character":4,"end_line":9,"end_character":73},"updated":"2016-08-08 13:54:16.000000000","message":"This is the wrong URL per https://review.openstack.org/#/c/293872","commit_id":"f50d93c6ddcca1ad01d2b1e3c8c51eb26c3faa98"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"a2a2611cf7557b3ce997ea557bfc7b41efe76308","unresolved":false,"context_lines":[{"line_number":6,"context_line":"    In order to use this feature, serial console must be configured in Nova"},{"line_number":7,"context_line":"    and the Ironic ``socat`` console driver must be used and configured"},{"line_number":8,"context_line":"    in Ironic. Ironic serial console configuration is documented in"},{"line_number":9,"context_line":"    http://docs.openstack.org/developer/ironic/deploy/install-guide.html."}],"source_content_type":"text/x-yaml","patch_set":14,"id":"9ad45d7e_7b8dd930","line":9,"range":{"start_line":9,"start_character":4,"end_line":9,"end_character":73},"in_reply_to":"9ad45d7e_fc3603b3","updated":"2016-08-09 03:28:27.000000000","message":"Done","commit_id":"f50d93c6ddcca1ad01d2b1e3c8c51eb26c3faa98"}]}
