)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"9f2a1efb5774b328537b9cd4c1299cca5c3aa0c9","unresolved":false,"context_lines":[{"line_number":11,"context_line":"- get_socat_console_url(): returns url for socat console"},{"line_number":12,"context_line":"- start_socat_console(): uses (socat + console_cmd execution)"},{"line_number":13,"context_line":"- stop_socat_console(): stops socat/console_cmd subprocess"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Change-Id: I79ddd83d12cc8111e05b5107359d6db8a8881d61"},{"line_number":16,"context_line":"Spec: https://review.openstack.org/#/c/319505/"},{"line_number":17,"context_line":"Related-Bug: #1553083"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"3aaa91ec_2c686821","line":14,"updated":"2016-07-01 16:35:03.000000000","message":"nit: also adds socat to devstack and updates the [console] terminal and terminal_cert_dir configuration options to indicate that they are only used for shellinabox.","commit_id":"e24ded82ca44662102a77b95c7bb528c278b7eee"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"6719f1a4b85bfbead678b95384893b38ad770bd6","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Yuiko Takada Mori \u003cyui-takada@tg.jp.nec.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-07-12 10:57:07 +0900"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"[WIP] Nova-compatible serial console: socat console_utils"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This adds console utils functions for \u0027socat\u0027 console."},{"line_number":10,"context_line":"Implements:"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":13,"id":"1aa78d24_aad14859","line":7,"range":{"start_line":7,"start_character":0,"end_line":7,"end_character":6},"updated":"2016-07-12 06:55:12.000000000","message":"Yeah, this WIP makes outside people of ironic misunderstand this dev progress is not good..","commit_id":"9a44bce4d7a86ab47ae05812bd3699a9cb86d088"}],"etc/ironic/ironic.conf.sample":[{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"ec21b289ffa6ffe2a2ce7a92fc66acda03aa4dbb","unresolved":false,"context_lines":[{"line_number":613,"context_line":"# From ironic"},{"line_number":614,"context_line":"#"},{"line_number":615,"context_line":""},{"line_number":616,"context_line":"# Path to serial console terminal program. Notes that only"},{"line_number":617,"context_line":"# Shellinabox console uses this value. (string value)"},{"line_number":618,"context_line":"#terminal \u003d shellinaboxd"},{"line_number":619,"context_line":""}],"source_content_type":"application/octet-stream","patch_set":5,"id":"3aaa91ec_b10f3687","line":616,"range":{"start_line":616,"start_character":43,"end_line":616,"end_character":48},"updated":"2016-06-28 22:34:15.000000000","message":"nit: s/Notes/Note","commit_id":"a170cf11b37bc4d05fd712ea0931e2057c2281f8"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"3f77c9b989a2e574e346a0f1454697ec607616ae","unresolved":false,"context_lines":[{"line_number":613,"context_line":"# From ironic"},{"line_number":614,"context_line":"#"},{"line_number":615,"context_line":""},{"line_number":616,"context_line":"# Path to serial console terminal program. Notes that only"},{"line_number":617,"context_line":"# Shellinabox console uses this value. (string value)"},{"line_number":618,"context_line":"#terminal \u003d shellinaboxd"},{"line_number":619,"context_line":""}],"source_content_type":"application/octet-stream","patch_set":5,"id":"3aaa91ec_3ee82a10","line":616,"range":{"start_line":616,"start_character":43,"end_line":616,"end_character":48},"in_reply_to":"3aaa91ec_b10f3687","updated":"2016-06-29 05:16:09.000000000","message":"Done","commit_id":"a170cf11b37bc4d05fd712ea0931e2057c2281f8"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"ec21b289ffa6ffe2a2ce7a92fc66acda03aa4dbb","unresolved":false,"context_lines":[{"line_number":618,"context_line":"#terminal \u003d shellinaboxd"},{"line_number":619,"context_line":""},{"line_number":620,"context_line":"# Directory containing the terminal SSL cert(PEM) for serial"},{"line_number":621,"context_line":"# console access. Notes that only Shellinabox console uses"},{"line_number":622,"context_line":"# this value. (string value)"},{"line_number":623,"context_line":"#terminal_cert_dir \u003d \u003cNone\u003e"},{"line_number":624,"context_line":""}],"source_content_type":"application/octet-stream","patch_set":5,"id":"3aaa91ec_f121befd","line":621,"range":{"start_line":621,"start_character":18,"end_line":621,"end_character":23},"updated":"2016-06-28 22:34:15.000000000","message":"nit: s/Notes/Note","commit_id":"a170cf11b37bc4d05fd712ea0931e2057c2281f8"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"3f77c9b989a2e574e346a0f1454697ec607616ae","unresolved":false,"context_lines":[{"line_number":618,"context_line":"#terminal \u003d shellinaboxd"},{"line_number":619,"context_line":""},{"line_number":620,"context_line":"# Directory containing the terminal SSL cert(PEM) for serial"},{"line_number":621,"context_line":"# console access. Notes that only Shellinabox console uses"},{"line_number":622,"context_line":"# this value. (string value)"},{"line_number":623,"context_line":"#terminal_cert_dir \u003d \u003cNone\u003e"},{"line_number":624,"context_line":""}],"source_content_type":"application/octet-stream","patch_set":5,"id":"3aaa91ec_1ee3ae34","line":621,"range":{"start_line":621,"start_character":18,"end_line":621,"end_character":23},"in_reply_to":"3aaa91ec_f121befd","updated":"2016-06-29 05:16:09.000000000","message":"Done","commit_id":"a170cf11b37bc4d05fd712ea0931e2057c2281f8"}],"ironic/conf/console.py":[{"author":{"_account_id":7882,"name":"Yuiko Takada Mori","email":"yuiko-mori@nec.com","username":"YuikoTakada"},"change_message_id":"ba35b1ba64e0304db16f29f80cd7cc9e6b672234","unresolved":false,"context_lines":[{"line_number":21,"context_line":"opts \u003d ["},{"line_number":22,"context_line":"    cfg.StrOpt(\u0027terminal\u0027,"},{"line_number":23,"context_line":"               default\u003d\u0027shellinaboxd\u0027,"},{"line_number":24,"context_line":"               help\u003d_(\u0027Path to serial console terminal program. \u0027"},{"line_number":25,"context_line":"                      \u0027\"shellinaboxd\" provides stand-alone web console. \u0027"},{"line_number":26,"context_line":"                      \u0027\"socat\" provides Nova-compatible serial console. \u0027"},{"line_number":27,"context_line":"                      \u0027Notes that only a few drivers support \"socat\".\u0027)),"},{"line_number":28,"context_line":"    cfg.StrOpt(\u0027terminal_cert_dir\u0027,"},{"line_number":29,"context_line":"               help\u003d_(\u0027Directory containing the terminal SSL cert(PEM) for \u0027"},{"line_number":30,"context_line":"                      \u0027serial console access. Notes that only Shellinabox \u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"3aaa91ec_091bfa81","line":27,"range":{"start_line":24,"start_character":21,"end_line":27,"end_character":73},"updated":"2016-06-27 04:59:12.000000000","message":"We need to fix here also, right?","commit_id":"542d8ce5489e028aba592e2ec3bfe971657d626a"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"1135a777f52213893fd6479b68cf63a900754f9a","unresolved":false,"context_lines":[{"line_number":21,"context_line":"opts \u003d ["},{"line_number":22,"context_line":"    cfg.StrOpt(\u0027terminal\u0027,"},{"line_number":23,"context_line":"               default\u003d\u0027shellinaboxd\u0027,"},{"line_number":24,"context_line":"               help\u003d_(\u0027Path to serial console terminal program. \u0027"},{"line_number":25,"context_line":"                      \u0027\"shellinaboxd\" provides stand-alone web console. \u0027"},{"line_number":26,"context_line":"                      \u0027\"socat\" provides Nova-compatible serial console. \u0027"},{"line_number":27,"context_line":"                      \u0027Notes that only a few drivers support \"socat\".\u0027)),"},{"line_number":28,"context_line":"    cfg.StrOpt(\u0027terminal_cert_dir\u0027,"},{"line_number":29,"context_line":"               help\u003d_(\u0027Directory containing the terminal SSL cert(PEM) for \u0027"},{"line_number":30,"context_line":"                      \u0027serial console access. Notes that only Shellinabox \u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"3aaa91ec_eb30e6ea","line":27,"range":{"start_line":24,"start_character":21,"end_line":27,"end_character":73},"in_reply_to":"3aaa91ec_091bfa81","updated":"2016-06-28 03:47:22.000000000","message":"Done","commit_id":"542d8ce5489e028aba592e2ec3bfe971657d626a"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"ec21b289ffa6ffe2a2ce7a92fc66acda03aa4dbb","unresolved":false,"context_lines":[{"line_number":21,"context_line":"opts \u003d ["},{"line_number":22,"context_line":"    cfg.StrOpt(\u0027terminal\u0027,"},{"line_number":23,"context_line":"               default\u003d\u0027shellinaboxd\u0027,"},{"line_number":24,"context_line":"               help\u003d_(\u0027Path to serial console terminal program. Notes that \u0027"},{"line_number":25,"context_line":"                      \u0027only Shellinabox console uses this value.\u0027)),"},{"line_number":26,"context_line":"    cfg.StrOpt(\u0027terminal_cert_dir\u0027,"},{"line_number":27,"context_line":"               help\u003d_(\u0027Directory containing the terminal SSL cert(PEM) for \u0027"}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_717caeeb","line":24,"range":{"start_line":24,"start_character":64,"end_line":24,"end_character":69},"updated":"2016-06-28 22:34:15.000000000","message":"nit: s/Notes/Note","commit_id":"a170cf11b37bc4d05fd712ea0931e2057c2281f8"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"3f77c9b989a2e574e346a0f1454697ec607616ae","unresolved":false,"context_lines":[{"line_number":21,"context_line":"opts \u003d ["},{"line_number":22,"context_line":"    cfg.StrOpt(\u0027terminal\u0027,"},{"line_number":23,"context_line":"               default\u003d\u0027shellinaboxd\u0027,"},{"line_number":24,"context_line":"               help\u003d_(\u0027Path to serial console terminal program. Notes that \u0027"},{"line_number":25,"context_line":"                      \u0027only Shellinabox console uses this value.\u0027)),"},{"line_number":26,"context_line":"    cfg.StrOpt(\u0027terminal_cert_dir\u0027,"},{"line_number":27,"context_line":"               help\u003d_(\u0027Directory containing the terminal SSL cert(PEM) for \u0027"}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_9ecddeb9","line":24,"range":{"start_line":24,"start_character":64,"end_line":24,"end_character":69},"in_reply_to":"3aaa91ec_717caeeb","updated":"2016-06-29 05:16:09.000000000","message":"Done","commit_id":"a170cf11b37bc4d05fd712ea0931e2057c2281f8"},{"author":{"_account_id":7882,"name":"Yuiko Takada Mori","email":"yuiko-mori@nec.com","username":"YuikoTakada"},"change_message_id":"cc32d85e7f7161d112ec5a38a909ada95364ad3b","unresolved":false,"context_lines":[{"line_number":22,"context_line":"    cfg.StrOpt(\u0027terminal\u0027,"},{"line_number":23,"context_line":"               default\u003d\u0027shellinaboxd\u0027,"},{"line_number":24,"context_line":"               help\u003d_(\u0027Path to serial console terminal program. Notes that \u0027"},{"line_number":25,"context_line":"                      \u0027only Shellinabox console uses this value.\u0027)),"},{"line_number":26,"context_line":"    cfg.StrOpt(\u0027terminal_cert_dir\u0027,"},{"line_number":27,"context_line":"               help\u003d_(\u0027Directory containing the terminal SSL cert(PEM) for \u0027"},{"line_number":28,"context_line":"                      \u0027serial console access. Notes that only Shellinabox \u0027"}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_4b62da17","line":25,"range":{"start_line":25,"start_character":23,"end_line":25,"end_character":64},"updated":"2016-06-28 03:55:52.000000000","message":"Thank you for updating here. it\u0027s good...but it would be better to mention that here won\u0027t be used and will be removed in the future.","commit_id":"a170cf11b37bc4d05fd712ea0931e2057c2281f8"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"3f77c9b989a2e574e346a0f1454697ec607616ae","unresolved":false,"context_lines":[{"line_number":22,"context_line":"    cfg.StrOpt(\u0027terminal\u0027,"},{"line_number":23,"context_line":"               default\u003d\u0027shellinaboxd\u0027,"},{"line_number":24,"context_line":"               help\u003d_(\u0027Path to serial console terminal program. Notes that \u0027"},{"line_number":25,"context_line":"                      \u0027only Shellinabox console uses this value.\u0027)),"},{"line_number":26,"context_line":"    cfg.StrOpt(\u0027terminal_cert_dir\u0027,"},{"line_number":27,"context_line":"               help\u003d_(\u0027Directory containing the terminal SSL cert(PEM) for \u0027"},{"line_number":28,"context_line":"                      \u0027serial console access. Notes that only Shellinabox \u0027"}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_9e44be1b","line":25,"range":{"start_line":25,"start_character":23,"end_line":25,"end_character":64},"in_reply_to":"3aaa91ec_377404fc","updated":"2016-06-29 05:16:09.000000000","message":"I think this should be done in another patch set, due to there are some other places (in Shellinabox code) need to update too.","commit_id":"a170cf11b37bc4d05fd712ea0931e2057c2281f8"},{"author":{"_account_id":13689,"name":"Hironori Shiina","email":"Hironori.Shiina@fujitsu.com","username":"shiina"},"change_message_id":"2086fc623f8d77a84e378ec63a500970527df83f","unresolved":false,"context_lines":[{"line_number":22,"context_line":"    cfg.StrOpt(\u0027terminal\u0027,"},{"line_number":23,"context_line":"               default\u003d\u0027shellinaboxd\u0027,"},{"line_number":24,"context_line":"               help\u003d_(\u0027Path to serial console terminal program. Notes that \u0027"},{"line_number":25,"context_line":"                      \u0027only Shellinabox console uses this value.\u0027)),"},{"line_number":26,"context_line":"    cfg.StrOpt(\u0027terminal_cert_dir\u0027,"},{"line_number":27,"context_line":"               help\u003d_(\u0027Directory containing the terminal SSL cert(PEM) for \u0027"},{"line_number":28,"context_line":"                      \u0027serial console access. Notes that only Shellinabox \u0027"}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_6b6dfa98","line":25,"range":{"start_line":25,"start_character":23,"end_line":25,"end_character":64},"in_reply_to":"3aaa91ec_377404fc","updated":"2016-06-28 13:41:06.000000000","message":"We would like to keep the parameter for shellinabox in this patch. It would be better to discuss later whether the parameter will be deprecated.","commit_id":"a170cf11b37bc4d05fd712ea0931e2057c2281f8"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"95daab6f1eccd6e69ebe5da42deadbe95046ee92","unresolved":false,"context_lines":[{"line_number":22,"context_line":"    cfg.StrOpt(\u0027terminal\u0027,"},{"line_number":23,"context_line":"               default\u003d\u0027shellinaboxd\u0027,"},{"line_number":24,"context_line":"               help\u003d_(\u0027Path to serial console terminal program. Notes that \u0027"},{"line_number":25,"context_line":"                      \u0027only Shellinabox console uses this value.\u0027)),"},{"line_number":26,"context_line":"    cfg.StrOpt(\u0027terminal_cert_dir\u0027,"},{"line_number":27,"context_line":"               help\u003d_(\u0027Directory containing the terminal SSL cert(PEM) for \u0027"},{"line_number":28,"context_line":"                      \u0027serial console access. Notes that only Shellinabox \u0027"}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_377404fc","line":25,"range":{"start_line":25,"start_character":23,"end_line":25,"end_character":64},"in_reply_to":"3aaa91ec_4b62da17","updated":"2016-06-28 09:27:47.000000000","message":"This option will be removed? If so, there\u0027s an option that we can pass called \"deprecated_for_removal\" [0] that will indicate that this option will be removed in the future, let\u0027s use it.\n\n[0] http://docs.openstack.org/developer/oslo.config/opts.html#option-definitions","commit_id":"a170cf11b37bc4d05fd712ea0931e2057c2281f8"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"3f77c9b989a2e574e346a0f1454697ec607616ae","unresolved":false,"context_lines":[{"line_number":22,"context_line":"    cfg.StrOpt(\u0027terminal\u0027,"},{"line_number":23,"context_line":"               default\u003d\u0027shellinaboxd\u0027,"},{"line_number":24,"context_line":"               help\u003d_(\u0027Path to serial console terminal program. Notes that \u0027"},{"line_number":25,"context_line":"                      \u0027only Shellinabox console uses this value.\u0027)),"},{"line_number":26,"context_line":"    cfg.StrOpt(\u0027terminal_cert_dir\u0027,"},{"line_number":27,"context_line":"               help\u003d_(\u0027Directory containing the terminal SSL cert(PEM) for \u0027"},{"line_number":28,"context_line":"                      \u0027serial console access. Notes that only Shellinabox \u0027"}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_3e566ad2","line":25,"range":{"start_line":25,"start_character":23,"end_line":25,"end_character":64},"in_reply_to":"3aaa91ec_6b6dfa98","updated":"2016-06-29 05:16:09.000000000","message":"I agree.","commit_id":"a170cf11b37bc4d05fd712ea0931e2057c2281f8"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"299bf84d97f2f5c2a1a8be63e9e5f7ba7d222f51","unresolved":false,"context_lines":[{"line_number":24,"context_line":"               help\u003d_(\u0027Path to serial console terminal program. Note that \u0027"},{"line_number":25,"context_line":"                      \u0027only Shellinabox console uses this value.\u0027)),"},{"line_number":26,"context_line":"    cfg.StrOpt(\u0027terminal_cert_dir\u0027,"},{"line_number":27,"context_line":"               help\u003d_(\u0027Directory containing the terminal SSL cert(PEM) for \u0027"},{"line_number":28,"context_line":"                      \u0027serial console access. Note that only Shellinabox \u0027"},{"line_number":29,"context_line":"                      \u0027console uses this value.\u0027)),"},{"line_number":30,"context_line":"    cfg.StrOpt(\u0027terminal_pid_dir\u0027,"}],"source_content_type":"text/x-python","patch_set":6,"id":"3aaa91ec_dd234ca9","line":27,"updated":"2016-07-01 17:58:17.000000000","message":"nit: s/cert(PEM)/cert (PEM)/","commit_id":"e24ded82ca44662102a77b95c7bb528c278b7eee"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"92144c1ae6e37b3b2f8846be0bf9769d84a72c4b","unresolved":false,"context_lines":[{"line_number":24,"context_line":"               help\u003d_(\u0027Path to serial console terminal program. Note that \u0027"},{"line_number":25,"context_line":"                      \u0027only Shellinabox console uses this value.\u0027)),"},{"line_number":26,"context_line":"    cfg.StrOpt(\u0027terminal_cert_dir\u0027,"},{"line_number":27,"context_line":"               help\u003d_(\u0027Directory containing the terminal SSL cert(PEM) for \u0027"},{"line_number":28,"context_line":"                      \u0027serial console access. Note that only Shellinabox \u0027"},{"line_number":29,"context_line":"                      \u0027console uses this value.\u0027)),"},{"line_number":30,"context_line":"    cfg.StrOpt(\u0027terminal_pid_dir\u0027,"}],"source_content_type":"text/x-python","patch_set":6,"id":"1aa78d24_bf52a8db","line":27,"in_reply_to":"3aaa91ec_dd234ca9","updated":"2016-07-04 03:45:08.000000000","message":"Done","commit_id":"e24ded82ca44662102a77b95c7bb528c278b7eee"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"9030a80e541ba6d8099a5a7d04317eab0b610270","unresolved":false,"context_lines":[{"line_number":22,"context_line":"    cfg.StrOpt(\u0027terminal\u0027,"},{"line_number":23,"context_line":"               default\u003d\u0027shellinaboxd\u0027,"},{"line_number":24,"context_line":"               help\u003d_(\u0027Path to serial console terminal program. Note that \u0027"},{"line_number":25,"context_line":"                      \u0027only Shellinabox console uses this value.\u0027)),"},{"line_number":26,"context_line":"    cfg.StrOpt(\u0027terminal_cert_dir\u0027,"},{"line_number":27,"context_line":"               help\u003d_(\u0027Directory containing the terminal SSL cert (PEM) for \u0027"},{"line_number":28,"context_line":"                      \u0027serial console access. Note that only Shellinabox \u0027"}],"source_content_type":"text/x-python","patch_set":10,"id":"1aa78d24_5cc209ea","line":25,"updated":"2016-07-07 00:26:52.000000000","message":"Or \u0027Used only by Shell In A Box console\u0027.","commit_id":"13d9d99458535bf75bed109f3e65aed83cb8f3c9"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"51df385919f27b6fe72077a2d1e1013d6d1e7a8f","unresolved":false,"context_lines":[{"line_number":22,"context_line":"    cfg.StrOpt(\u0027terminal\u0027,"},{"line_number":23,"context_line":"               default\u003d\u0027shellinaboxd\u0027,"},{"line_number":24,"context_line":"               help\u003d_(\u0027Path to serial console terminal program. Note that \u0027"},{"line_number":25,"context_line":"                      \u0027only Shellinabox console uses this value.\u0027)),"},{"line_number":26,"context_line":"    cfg.StrOpt(\u0027terminal_cert_dir\u0027,"},{"line_number":27,"context_line":"               help\u003d_(\u0027Directory containing the terminal SSL cert (PEM) for \u0027"},{"line_number":28,"context_line":"                      \u0027serial console access. Note that only Shellinabox \u0027"}],"source_content_type":"text/x-python","patch_set":10,"id":"1aa78d24_c840f309","line":25,"in_reply_to":"1aa78d24_5cc209ea","updated":"2016-07-07 02:21:30.000000000","message":"Done","commit_id":"13d9d99458535bf75bed109f3e65aed83cb8f3c9"}],"ironic/drivers/modules/console_utils.py":[{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"9474a7dad1ea160f954e6e564a2b5483bf437d49","unresolved":false,"context_lines":[{"line_number":48,"context_line":"                      \u0027Notes that only a few drivers support \"socat\".\u0027)),"},{"line_number":49,"context_line":"    cfg.StrOpt(\u0027terminal_cert_dir\u0027,"},{"line_number":50,"context_line":"               help\u003d_(\u0027Directory containing the terminal SSL cert(PEM) for \u0027"},{"line_number":51,"context_line":"                      \u0027serial console access\u0027)),"},{"line_number":52,"context_line":"    cfg.StrOpt(\u0027terminal_pid_dir\u0027,"},{"line_number":53,"context_line":"               help\u003d_(\u0027Directory for holding terminal pid files. \u0027"},{"line_number":54,"context_line":"                      \u0027If not specified, the temporary directory \u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"7aa08908_ccd40b21","line":51,"updated":"2016-06-16 09:31:49.000000000","message":"I think we should mention that this is only used by shellinabox","commit_id":"a3b22ea63c8251cf11c6d065cc5514c08ae5141a"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"2593fea9885a3b8ee8b8a3474cde2830beacdd75","unresolved":false,"context_lines":[{"line_number":48,"context_line":"                      \u0027Notes that only a few drivers support \"socat\".\u0027)),"},{"line_number":49,"context_line":"    cfg.StrOpt(\u0027terminal_cert_dir\u0027,"},{"line_number":50,"context_line":"               help\u003d_(\u0027Directory containing the terminal SSL cert(PEM) for \u0027"},{"line_number":51,"context_line":"                      \u0027serial console access\u0027)),"},{"line_number":52,"context_line":"    cfg.StrOpt(\u0027terminal_pid_dir\u0027,"},{"line_number":53,"context_line":"               help\u003d_(\u0027Directory for holding terminal pid files. \u0027"},{"line_number":54,"context_line":"                      \u0027If not specified, the temporary directory \u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"3aaa91ec_d3ce8a82","line":51,"in_reply_to":"7aa08908_ccd40b21","updated":"2016-06-22 05:06:07.000000000","message":"Done","commit_id":"a3b22ea63c8251cf11c6d065cc5514c08ae5141a"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"9474a7dad1ea160f954e6e564a2b5483bf437d49","unresolved":false,"context_lines":[{"line_number":56,"context_line":"    cfg.IntOpt(\u0027subprocess_checking_interval\u0027,"},{"line_number":57,"context_line":"               default\u003d1,"},{"line_number":58,"context_line":"               help\u003d_(\u0027Time interval (in seconds) for checking the status of \u0027"},{"line_number":59,"context_line":"                      \u0027console subprocess.\u0027)),"},{"line_number":60,"context_line":"    cfg.IntOpt(\u0027subprocess_timeout\u0027,"},{"line_number":61,"context_line":"               default\u003d10,"},{"line_number":62,"context_line":"               help\u003d_(\u0027Time (in seconds) to wait for the console subprocess \u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"7aa08908_0cb293e5","line":59,"updated":"2016-06-16 09:31:49.000000000","message":"ditto","commit_id":"a3b22ea63c8251cf11c6d065cc5514c08ae5141a"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"2593fea9885a3b8ee8b8a3474cde2830beacdd75","unresolved":false,"context_lines":[{"line_number":56,"context_line":"    cfg.IntOpt(\u0027subprocess_checking_interval\u0027,"},{"line_number":57,"context_line":"               default\u003d1,"},{"line_number":58,"context_line":"               help\u003d_(\u0027Time interval (in seconds) for checking the status of \u0027"},{"line_number":59,"context_line":"                      \u0027console subprocess.\u0027)),"},{"line_number":60,"context_line":"    cfg.IntOpt(\u0027subprocess_timeout\u0027,"},{"line_number":61,"context_line":"               default\u003d10,"},{"line_number":62,"context_line":"               help\u003d_(\u0027Time (in seconds) to wait for the console subprocess \u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"3aaa91ec_b3a01e92","line":59,"in_reply_to":"7aa08908_0cb293e5","updated":"2016-06-22 05:06:07.000000000","message":"It seems the current code has a bug is that we still need to check if socat starts successfully. But socat and shellinabox run in different modes, non-daemon vs daemon, so the check is different too. However, we can turn into using the two values subprocess_cheking_interval and subprocess_timeout. Please see the updated patch.","commit_id":"a3b22ea63c8251cf11c6d065cc5514c08ae5141a"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"9474a7dad1ea160f954e6e564a2b5483bf437d49","unresolved":false,"context_lines":[{"line_number":60,"context_line":"    cfg.IntOpt(\u0027subprocess_timeout\u0027,"},{"line_number":61,"context_line":"               default\u003d10,"},{"line_number":62,"context_line":"               help\u003d_(\u0027Time (in seconds) to wait for the console subprocess \u0027"},{"line_number":63,"context_line":"                      \u0027to start.\u0027)),"},{"line_number":64,"context_line":"]"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"CONF \u003d cfg.CONF"}],"source_content_type":"text/x-python","patch_set":1,"id":"7aa08908_4cc49b40","line":63,"updated":"2016-06-16 09:31:49.000000000","message":"ditto","commit_id":"a3b22ea63c8251cf11c6d065cc5514c08ae5141a"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"2593fea9885a3b8ee8b8a3474cde2830beacdd75","unresolved":false,"context_lines":[{"line_number":60,"context_line":"    cfg.IntOpt(\u0027subprocess_timeout\u0027,"},{"line_number":61,"context_line":"               default\u003d10,"},{"line_number":62,"context_line":"               help\u003d_(\u0027Time (in seconds) to wait for the console subprocess \u0027"},{"line_number":63,"context_line":"                      \u0027to start.\u0027)),"},{"line_number":64,"context_line":"]"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"CONF \u003d cfg.CONF"}],"source_content_type":"text/x-python","patch_set":1,"id":"3aaa91ec_53b61add","line":63,"in_reply_to":"7aa08908_4cc49b40","updated":"2016-06-22 05:06:07.000000000","message":"Please see the updated patch.","commit_id":"a3b22ea63c8251cf11c6d065cc5514c08ae5141a"},{"author":{"_account_id":7900,"name":"Tomasz Paszkowski","email":"ss7pro@gmail.com","username":"tpaszkowski"},"change_message_id":"5814f534b902c934105f08f12992cdfc98a318c6","unresolved":false,"context_lines":[{"line_number":267,"context_line":"                                               \u0027port\u0027: port}"},{"line_number":268,"context_line":""},{"line_number":269,"context_line":""},{"line_number":270,"context_line":"def start_socat_console(node_uuid, port, console_cmd):"},{"line_number":271,"context_line":"    \"\"\"Open the serial console for a node."},{"line_number":272,"context_line":""},{"line_number":273,"context_line":"    :param node_uuid: the uuid of the node"}],"source_content_type":"text/x-python","patch_set":3,"id":"1aa78d24_0b4c5e75","line":270,"updated":"2016-07-08 11:38:23.000000000","message":"Folks, did anyone analyzed impact on bigger deployments ? Are you sure we will not run out of workers on 1500 ironic nodes deployments ?","commit_id":"d82889fb69a52cd6b97e1db44d4317bce89d777e"},{"author":{"_account_id":7882,"name":"Yuiko Takada Mori","email":"yuiko-mori@nec.com","username":"YuikoTakada"},"change_message_id":"3e4837e525ba463d89adf9028e51799944606f5d","unresolved":false,"context_lines":[{"line_number":338,"context_line":"        else:"},{"line_number":339,"context_line":"            # socat returned, it failed to start."},{"line_number":340,"context_line":"            # We get the error (out should be None in this case)."},{"line_number":341,"context_line":"            (out, err) \u003d popen_obj.communicate()"},{"line_number":342,"context_line":"            locals[\u0027errstr\u0027] \u003d _("},{"line_number":343,"context_line":"                \"Command: %(command)s.\\n\""},{"line_number":344,"context_line":"                \"Exit code: %(return_code)s.\\n\""}],"source_content_type":"text/x-python","patch_set":3,"id":"3aaa91ec_c41d2211","line":341,"range":{"start_line":341,"start_character":12,"end_line":341,"end_character":48},"updated":"2016-06-22 06:42:02.000000000","message":"\"out\" seems never used later, so can we fix as below?\n\n err \u003d popen_obj.communicate()[1]","commit_id":"d82889fb69a52cd6b97e1db44d4317bce89d777e"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"ede8f608481dc96835f4449c2cb0e7ca9c3bae9a","unresolved":false,"context_lines":[{"line_number":338,"context_line":"        else:"},{"line_number":339,"context_line":"            # socat returned, it failed to start."},{"line_number":340,"context_line":"            # We get the error (out should be None in this case)."},{"line_number":341,"context_line":"            (out, err) \u003d popen_obj.communicate()"},{"line_number":342,"context_line":"            locals[\u0027errstr\u0027] \u003d _("},{"line_number":343,"context_line":"                \"Command: %(command)s.\\n\""},{"line_number":344,"context_line":"                \"Exit code: %(return_code)s.\\n\""}],"source_content_type":"text/x-python","patch_set":3,"id":"1aa78d24_7c05400f","line":341,"range":{"start_line":341,"start_character":12,"end_line":341,"end_character":48},"in_reply_to":"1aa78d24_819d4568","updated":"2016-07-07 02:25:29.000000000","message":"Done","commit_id":"d82889fb69a52cd6b97e1db44d4317bce89d777e"},{"author":{"_account_id":659,"name":"Akira Yoshiyama","email":"akirayoshiyama@gmail.com","username":"yosshy"},"change_message_id":"e55a79d4de84990536313e876d540533f0ddb401","unresolved":false,"context_lines":[{"line_number":338,"context_line":"        else:"},{"line_number":339,"context_line":"            # socat returned, it failed to start."},{"line_number":340,"context_line":"            # We get the error (out should be None in this case)."},{"line_number":341,"context_line":"            (out, err) \u003d popen_obj.communicate()"},{"line_number":342,"context_line":"            locals[\u0027errstr\u0027] \u003d _("},{"line_number":343,"context_line":"                \"Command: %(command)s.\\n\""},{"line_number":344,"context_line":"                \"Exit code: %(return_code)s.\\n\""}],"source_content_type":"text/x-python","patch_set":3,"id":"1aa78d24_819d4568","line":341,"range":{"start_line":341,"start_character":12,"end_line":341,"end_character":48},"in_reply_to":"3aaa91ec_c41d2211","updated":"2016-07-06 15:34:05.000000000","message":"I like\n (_out, err) \u003d popen_obj.communicate()\n or\n _out, err \u003d popen_obj.communicate()\n\nBut each one is ok for me.","commit_id":"d82889fb69a52cd6b97e1db44d4317bce89d777e"},{"author":{"_account_id":7882,"name":"Yuiko Takada Mori","email":"yuiko-mori@nec.com","username":"YuikoTakada"},"change_message_id":"cc32d85e7f7161d112ec5a38a909ada95364ad3b","unresolved":false,"context_lines":[{"line_number":172,"context_line":""},{"line_number":173,"context_line":"    # put together the command and arguments for invoking the console"},{"line_number":174,"context_line":"    args \u003d []"},{"line_number":175,"context_line":"    args.append(CONF.console.terminal)"},{"line_number":176,"context_line":"    if CONF.console.terminal_cert_dir:"},{"line_number":177,"context_line":"        args.append(\"-c\")"},{"line_number":178,"context_line":"        args.append(CONF.console.terminal_cert_dir)"}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_ab089e2e","line":175,"range":{"start_line":175,"start_character":4,"end_line":175,"end_character":38},"updated":"2016-06-28 03:55:52.000000000","message":"should we fix here also? it seems separate patch is good, also. WDYT?","commit_id":"a170cf11b37bc4d05fd712ea0931e2057c2281f8"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"3f77c9b989a2e574e346a0f1454697ec607616ae","unresolved":false,"context_lines":[{"line_number":172,"context_line":""},{"line_number":173,"context_line":"    # put together the command and arguments for invoking the console"},{"line_number":174,"context_line":"    args \u003d []"},{"line_number":175,"context_line":"    args.append(CONF.console.terminal)"},{"line_number":176,"context_line":"    if CONF.console.terminal_cert_dir:"},{"line_number":177,"context_line":"        args.append(\"-c\")"},{"line_number":178,"context_line":"        args.append(CONF.console.terminal_cert_dir)"}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_3e6dca98","line":175,"range":{"start_line":175,"start_character":4,"end_line":175,"end_character":38},"in_reply_to":"3aaa91ec_8d5de117","updated":"2016-06-29 05:16:09.000000000","message":"I agree.","commit_id":"a170cf11b37bc4d05fd712ea0931e2057c2281f8"},{"author":{"_account_id":13689,"name":"Hironori Shiina","email":"Hironori.Shiina@fujitsu.com","username":"shiina"},"change_message_id":"2086fc623f8d77a84e378ec63a500970527df83f","unresolved":false,"context_lines":[{"line_number":172,"context_line":""},{"line_number":173,"context_line":"    # put together the command and arguments for invoking the console"},{"line_number":174,"context_line":"    args \u003d []"},{"line_number":175,"context_line":"    args.append(CONF.console.terminal)"},{"line_number":176,"context_line":"    if CONF.console.terminal_cert_dir:"},{"line_number":177,"context_line":"        args.append(\"-c\")"},{"line_number":178,"context_line":"        args.append(CONF.console.terminal_cert_dir)"}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_8d5de117","line":175,"range":{"start_line":175,"start_character":4,"end_line":175,"end_character":38},"in_reply_to":"3aaa91ec_ab089e2e","updated":"2016-06-28 13:41:06.000000000","message":"If we deprecate the parameter for shellinabox, I also think another patch would be better.","commit_id":"a170cf11b37bc4d05fd712ea0931e2057c2281f8"},{"author":{"_account_id":13719,"name":"Naohiro Tamura","email":"naohirot.openstack@gmail.com","username":"nao"},"change_message_id":"92e4fac033f03e2b0e69d3672aabb5429b8f98bc","unresolved":false,"context_lines":[{"line_number":255,"context_line":"def get_socat_console_url(port):"},{"line_number":256,"context_line":"    \"\"\"Get an url to access the console via socat."},{"line_number":257,"context_line":""},{"line_number":258,"context_line":"    :param port: the terminal port for the node"},{"line_number":259,"context_line":"    \"\"\""},{"line_number":260,"context_line":"    scheme \u003d \u0027tcp\u0027"},{"line_number":261,"context_line":"    console_host \u003d CONF.my_ip"}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_c5ceb2b3","line":258,"range":{"start_line":258,"start_character":4,"end_line":258,"end_character":16},"updated":"2016-06-28 07:27:38.000000000","message":":returns: would be necessary as well.","commit_id":"a170cf11b37bc4d05fd712ea0931e2057c2281f8"},{"author":{"_account_id":13719,"name":"Naohiro Tamura","email":"naohirot.openstack@gmail.com","username":"nao"},"change_message_id":"92e4fac033f03e2b0e69d3672aabb5429b8f98bc","unresolved":false,"context_lines":[{"line_number":255,"context_line":"def get_socat_console_url(port):"},{"line_number":256,"context_line":"    \"\"\"Get an url to access the console via socat."},{"line_number":257,"context_line":""},{"line_number":258,"context_line":"    :param port: the terminal port for the node"},{"line_number":259,"context_line":"    \"\"\""},{"line_number":260,"context_line":"    scheme \u003d \u0027tcp\u0027"},{"line_number":261,"context_line":"    console_host \u003d CONF.my_ip"}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_85302aa0","line":258,"range":{"start_line":258,"start_character":30,"end_line":258,"end_character":34},"updated":"2016-06-28 07:27:38.000000000","message":"Is there any constraint? Is it integer value? Is it any integer value?","commit_id":"a170cf11b37bc4d05fd712ea0931e2057c2281f8"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"3f77c9b989a2e574e346a0f1454697ec607616ae","unresolved":false,"context_lines":[{"line_number":255,"context_line":"def get_socat_console_url(port):"},{"line_number":256,"context_line":"    \"\"\"Get an url to access the console via socat."},{"line_number":257,"context_line":""},{"line_number":258,"context_line":"    :param port: the terminal port for the node"},{"line_number":259,"context_line":"    \"\"\""},{"line_number":260,"context_line":"    scheme \u003d \u0027tcp\u0027"},{"line_number":261,"context_line":"    console_host \u003d CONF.my_ip"}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_3e04aabe","line":258,"range":{"start_line":258,"start_character":30,"end_line":258,"end_character":34},"in_reply_to":"3aaa91ec_4d9e5955","updated":"2016-06-29 05:16:09.000000000","message":"Thanks for helping explain it.","commit_id":"a170cf11b37bc4d05fd712ea0931e2057c2281f8"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"3f77c9b989a2e574e346a0f1454697ec607616ae","unresolved":false,"context_lines":[{"line_number":255,"context_line":"def get_socat_console_url(port):"},{"line_number":256,"context_line":"    \"\"\"Get an url to access the console via socat."},{"line_number":257,"context_line":""},{"line_number":258,"context_line":"    :param port: the terminal port for the node"},{"line_number":259,"context_line":"    \"\"\""},{"line_number":260,"context_line":"    scheme \u003d \u0027tcp\u0027"},{"line_number":261,"context_line":"    console_host \u003d CONF.my_ip"}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_fef982c9","line":258,"range":{"start_line":258,"start_character":30,"end_line":258,"end_character":34},"in_reply_to":"3aaa91ec_85302aa0","updated":"2016-06-29 05:16:09.000000000","message":"Done","commit_id":"a170cf11b37bc4d05fd712ea0931e2057c2281f8"},{"author":{"_account_id":13689,"name":"Hironori Shiina","email":"Hironori.Shiina@fujitsu.com","username":"shiina"},"change_message_id":"2086fc623f8d77a84e378ec63a500970527df83f","unresolved":false,"context_lines":[{"line_number":255,"context_line":"def get_socat_console_url(port):"},{"line_number":256,"context_line":"    \"\"\"Get an url to access the console via socat."},{"line_number":257,"context_line":""},{"line_number":258,"context_line":"    :param port: the terminal port for the node"},{"line_number":259,"context_line":"    \"\"\""},{"line_number":260,"context_line":"    scheme \u003d \u0027tcp\u0027"},{"line_number":261,"context_line":"    console_host \u003d CONF.my_ip"}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_4d9e5955","line":258,"range":{"start_line":258,"start_character":30,"end_line":258,"end_character":34},"in_reply_to":"3aaa91ec_85302aa0","updated":"2016-06-28 13:41:06.000000000","message":"Port will be passed after validated in ironic.common.util.validate_network_port which is called in _parse_driver_info of each console interface like get_shellinabox_console_url() is called.","commit_id":"a170cf11b37bc4d05fd712ea0931e2057c2281f8"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"3f77c9b989a2e574e346a0f1454697ec607616ae","unresolved":false,"context_lines":[{"line_number":255,"context_line":"def get_socat_console_url(port):"},{"line_number":256,"context_line":"    \"\"\"Get an url to access the console via socat."},{"line_number":257,"context_line":""},{"line_number":258,"context_line":"    :param port: the terminal port for the node"},{"line_number":259,"context_line":"    \"\"\""},{"line_number":260,"context_line":"    scheme \u003d \u0027tcp\u0027"},{"line_number":261,"context_line":"    console_host \u003d CONF.my_ip"}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_be0ffadf","line":258,"range":{"start_line":258,"start_character":4,"end_line":258,"end_character":16},"in_reply_to":"3aaa91ec_c5ceb2b3","updated":"2016-06-29 05:16:09.000000000","message":"Done","commit_id":"a170cf11b37bc4d05fd712ea0931e2057c2281f8"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"ec21b289ffa6ffe2a2ce7a92fc66acda03aa4dbb","unresolved":false,"context_lines":[{"line_number":280,"context_line":"    # make sure that the old console for this node is stopped"},{"line_number":281,"context_line":"    # and the files are cleared"},{"line_number":282,"context_line":"    try:"},{"line_number":283,"context_line":"        _stop_console(node_uuid)"},{"line_number":284,"context_line":"    except exception.NoConsolePid:"},{"line_number":285,"context_line":"        pass"},{"line_number":286,"context_line":"    except processutils.ProcessExecutionError as exc:"}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_d1b64289","line":283,"updated":"2016-06-28 22:34:15.000000000","message":"I might not be understanding the expected behavior correctly, but shouldn\u0027t we ensure that the open console isn\u0027t being used before stopping it?\n\nI can imagine a situation in which operator A is using a console, operator B opens another console, and operator A\u0027s console is killed without warning. I think it would be better to let operator B know that a console is open and must be manually closed before simply killing the existing console.\n\nI\u0027d be more OK with this _stop_console here if we somehow check for an existing console at the API layer, which this patch hasn\u0027t covered yet.","commit_id":"a170cf11b37bc4d05fd712ea0931e2057c2281f8"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"3f77c9b989a2e574e346a0f1454697ec607616ae","unresolved":false,"context_lines":[{"line_number":280,"context_line":"    # make sure that the old console for this node is stopped"},{"line_number":281,"context_line":"    # and the files are cleared"},{"line_number":282,"context_line":"    try:"},{"line_number":283,"context_line":"        _stop_console(node_uuid)"},{"line_number":284,"context_line":"    except exception.NoConsolePid:"},{"line_number":285,"context_line":"        pass"},{"line_number":286,"context_line":"    except processutils.ProcessExecutionError as exc:"}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_9e0f9e87","line":283,"in_reply_to":"3aaa91ec_d1b64289","updated":"2016-06-29 05:16:09.000000000","message":"These are utility functions, and will be called from IPMISocatConsole::start_console()/stop_console(). That means they are called when operator switches console_mode between On and Off. These calls should not be called often. I would like to hear more discussion about this issue.","commit_id":"a170cf11b37bc4d05fd712ea0931e2057c2281f8"},{"author":{"_account_id":13719,"name":"Naohiro Tamura","email":"naohirot.openstack@gmail.com","username":"nao"},"change_message_id":"92e4fac033f03e2b0e69d3672aabb5429b8f98bc","unresolved":false,"context_lines":[{"line_number":282,"context_line":"    try:"},{"line_number":283,"context_line":"        _stop_console(node_uuid)"},{"line_number":284,"context_line":"    except exception.NoConsolePid:"},{"line_number":285,"context_line":"        pass"},{"line_number":286,"context_line":"    except processutils.ProcessExecutionError as exc:"},{"line_number":287,"context_line":"        LOG.warning(_LW(\"Failed to kill the old console process \""},{"line_number":288,"context_line":"                        \"before starting a new socat console \""}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_652ffea1","line":285,"range":{"start_line":285,"start_character":8,"end_line":285,"end_character":12},"updated":"2016-06-28 07:27:38.000000000","message":"Why do we need to ignore exception.NoConsolePid?\n\nIt would be nice if there were some comment about this code.","commit_id":"a170cf11b37bc4d05fd712ea0931e2057c2281f8"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"3f77c9b989a2e574e346a0f1454697ec607616ae","unresolved":false,"context_lines":[{"line_number":282,"context_line":"    try:"},{"line_number":283,"context_line":"        _stop_console(node_uuid)"},{"line_number":284,"context_line":"    except exception.NoConsolePid:"},{"line_number":285,"context_line":"        pass"},{"line_number":286,"context_line":"    except processutils.ProcessExecutionError as exc:"},{"line_number":287,"context_line":"        LOG.warning(_LW(\"Failed to kill the old console process \""},{"line_number":288,"context_line":"                        \"before starting a new socat console \""}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_9e295e3a","line":285,"range":{"start_line":285,"start_character":8,"end_line":285,"end_character":12},"in_reply_to":"3aaa91ec_652ffea1","updated":"2016-06-29 05:16:09.000000000","message":"Done","commit_id":"a170cf11b37bc4d05fd712ea0931e2057c2281f8"},{"author":{"_account_id":13689,"name":"Hironori Shiina","email":"Hironori.Shiina@fujitsu.com","username":"shiina"},"change_message_id":"2086fc623f8d77a84e378ec63a500970527df83f","unresolved":false,"context_lines":[{"line_number":282,"context_line":"    try:"},{"line_number":283,"context_line":"        _stop_console(node_uuid)"},{"line_number":284,"context_line":"    except exception.NoConsolePid:"},{"line_number":285,"context_line":"        pass"},{"line_number":286,"context_line":"    except processutils.ProcessExecutionError as exc:"},{"line_number":287,"context_line":"        LOG.warning(_LW(\"Failed to kill the old console process \""},{"line_number":288,"context_line":"                        \"before starting a new socat console \""}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_783af1ce","line":285,"range":{"start_line":285,"start_character":8,"end_line":285,"end_character":12},"in_reply_to":"3aaa91ec_652ffea1","updated":"2016-06-28 13:41:06.000000000","message":"It usually means there is no old process to stop. So, we can ignore it.","commit_id":"a170cf11b37bc4d05fd712ea0931e2057c2281f8"},{"author":{"_account_id":13719,"name":"Naohiro Tamura","email":"naohirot.openstack@gmail.com","username":"nao"},"change_message_id":"92e4fac033f03e2b0e69d3672aabb5429b8f98bc","unresolved":false,"context_lines":[{"line_number":283,"context_line":"        _stop_console(node_uuid)"},{"line_number":284,"context_line":"    except exception.NoConsolePid:"},{"line_number":285,"context_line":"        pass"},{"line_number":286,"context_line":"    except processutils.ProcessExecutionError as exc:"},{"line_number":287,"context_line":"        LOG.warning(_LW(\"Failed to kill the old console process \""},{"line_number":288,"context_line":"                        \"before starting a new socat console \""},{"line_number":289,"context_line":"                        \"for node %(node)s. Reason: %(err)s\"),"}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_28c4ad90","line":286,"range":{"start_line":286,"start_character":4,"end_line":286,"end_character":52},"updated":"2016-06-28 07:27:38.000000000","message":"Can we continue after failing to kill the old console process?\n\nIf we continue, doesn\u0027t it cause to leak OS process?","commit_id":"a170cf11b37bc4d05fd712ea0931e2057c2281f8"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"3f77c9b989a2e574e346a0f1454697ec607616ae","unresolved":false,"context_lines":[{"line_number":283,"context_line":"        _stop_console(node_uuid)"},{"line_number":284,"context_line":"    except exception.NoConsolePid:"},{"line_number":285,"context_line":"        pass"},{"line_number":286,"context_line":"    except processutils.ProcessExecutionError as exc:"},{"line_number":287,"context_line":"        LOG.warning(_LW(\"Failed to kill the old console process \""},{"line_number":288,"context_line":"                        \"before starting a new socat console \""},{"line_number":289,"context_line":"                        \"for node %(node)s. Reason: %(err)s\"),"}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_1e160ef1","line":286,"range":{"start_line":286,"start_character":4,"end_line":286,"end_character":52},"in_reply_to":"3aaa91ec_28c4ad90","updated":"2016-06-29 05:16:09.000000000","message":"My mistake, processutils.ProcessExecutionError will never be raised. ConsoleError will be raised instead.","commit_id":"a170cf11b37bc4d05fd712ea0931e2057c2281f8"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"95daab6f1eccd6e69ebe5da42deadbe95046ee92","unresolved":false,"context_lines":[{"line_number":283,"context_line":"        _stop_console(node_uuid)"},{"line_number":284,"context_line":"    except exception.NoConsolePid:"},{"line_number":285,"context_line":"        pass"},{"line_number":286,"context_line":"    except processutils.ProcessExecutionError as exc:"},{"line_number":287,"context_line":"        LOG.warning(_LW(\"Failed to kill the old console process \""},{"line_number":288,"context_line":"                        \"before starting a new socat console \""},{"line_number":289,"context_line":"                        \"for node %(node)s. Reason: %(err)s\"),"}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_c90b687c","line":286,"range":{"start_line":286,"start_character":4,"end_line":286,"end_character":52},"in_reply_to":"3aaa91ec_28c4ad90","updated":"2016-06-28 09:27:47.000000000","message":"Yeah, I think it would be safer to fail.\n\nOne corner case here may be that, the PID file exists but the PID is not running, in this case we should not fail (and apparently it doesn\u0027t, judging my the code at L112)","commit_id":"a170cf11b37bc4d05fd712ea0931e2057c2281f8"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"3f77c9b989a2e574e346a0f1454697ec607616ae","unresolved":false,"context_lines":[{"line_number":283,"context_line":"        _stop_console(node_uuid)"},{"line_number":284,"context_line":"    except exception.NoConsolePid:"},{"line_number":285,"context_line":"        pass"},{"line_number":286,"context_line":"    except processutils.ProcessExecutionError as exc:"},{"line_number":287,"context_line":"        LOG.warning(_LW(\"Failed to kill the old console process \""},{"line_number":288,"context_line":"                        \"before starting a new socat console \""},{"line_number":289,"context_line":"                        \"for node %(node)s. Reason: %(err)s\"),"}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_9ee03efc","line":286,"range":{"start_line":286,"start_character":4,"end_line":286,"end_character":52},"in_reply_to":"3aaa91ec_7325f2c0","updated":"2016-06-29 05:16:09.000000000","message":"Thanks.","commit_id":"a170cf11b37bc4d05fd712ea0931e2057c2281f8"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"3f77c9b989a2e574e346a0f1454697ec607616ae","unresolved":false,"context_lines":[{"line_number":283,"context_line":"        _stop_console(node_uuid)"},{"line_number":284,"context_line":"    except exception.NoConsolePid:"},{"line_number":285,"context_line":"        pass"},{"line_number":286,"context_line":"    except processutils.ProcessExecutionError as exc:"},{"line_number":287,"context_line":"        LOG.warning(_LW(\"Failed to kill the old console process \""},{"line_number":288,"context_line":"                        \"before starting a new socat console \""},{"line_number":289,"context_line":"                        \"for node %(node)s. Reason: %(err)s\"),"}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_3ef2ead2","line":286,"range":{"start_line":286,"start_character":4,"end_line":286,"end_character":52},"in_reply_to":"3aaa91ec_c90b687c","updated":"2016-06-29 05:16:09.000000000","message":"Please see my above answer.","commit_id":"a170cf11b37bc4d05fd712ea0931e2057c2281f8"},{"author":{"_account_id":13689,"name":"Hironori Shiina","email":"Hironori.Shiina@fujitsu.com","username":"shiina"},"change_message_id":"2086fc623f8d77a84e378ec63a500970527df83f","unresolved":false,"context_lines":[{"line_number":283,"context_line":"        _stop_console(node_uuid)"},{"line_number":284,"context_line":"    except exception.NoConsolePid:"},{"line_number":285,"context_line":"        pass"},{"line_number":286,"context_line":"    except processutils.ProcessExecutionError as exc:"},{"line_number":287,"context_line":"        LOG.warning(_LW(\"Failed to kill the old console process \""},{"line_number":288,"context_line":"                        \"before starting a new socat console \""},{"line_number":289,"context_line":"                        \"for node %(node)s. Reason: %(err)s\"),"}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_7325f2c0","line":286,"range":{"start_line":286,"start_character":4,"end_line":286,"end_character":52},"in_reply_to":"3aaa91ec_c90b687c","updated":"2016-06-28 13:41:06.000000000","message":"This exception is never raised due to the patches[1][2].\nIn the patch[1], handling this error was removed in stop_shellinabox_console method.\nNow, ConsoleError is raised instead of ProcessExecutionError when failing to kill a process.\nStop_shellinabox_console method in L241 doesn\u0027t catch the error. Then we will fail.\nLike this, all we need to do is to remove this error catching block.\n\n[1]https://review.openstack.org/#/c/242319/\n[2]https://review.openstack.org/#/c/244699/","commit_id":"a170cf11b37bc4d05fd712ea0931e2057c2281f8"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"95daab6f1eccd6e69ebe5da42deadbe95046ee92","unresolved":false,"context_lines":[{"line_number":354,"context_line":"            LOG.warning(locals[\u0027errstr\u0027])"},{"line_number":355,"context_line":"            raise loopingcall.LoopingCallDone()"},{"line_number":356,"context_line":""},{"line_number":357,"context_line":"    locals \u003d {\u0027returncode\u0027: None, \u0027errstr\u0027: \u0027\u0027}"},{"line_number":358,"context_line":"    expiration \u003d time.time() + CONF.console.subprocess_timeout"},{"line_number":359,"context_line":"    timer \u003d loopingcall.FixedIntervalLoopingCall(_wait, node_uuid, obj)"},{"line_number":360,"context_line":"    timer.start(interval\u003dCONF.console.subprocess_checking_interval).wait()"}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_6967d425","line":357,"updated":"2016-06-28 09:27:47.000000000","message":"\"locals\" is a reserved python work, let\u0027s not overwrite it.\n\nhttps://docs.python.org/2/library/functions.html#locals","commit_id":"a170cf11b37bc4d05fd712ea0931e2057c2281f8"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"3f77c9b989a2e574e346a0f1454697ec607616ae","unresolved":false,"context_lines":[{"line_number":354,"context_line":"            LOG.warning(locals[\u0027errstr\u0027])"},{"line_number":355,"context_line":"            raise loopingcall.LoopingCallDone()"},{"line_number":356,"context_line":""},{"line_number":357,"context_line":"    locals \u003d {\u0027returncode\u0027: None, \u0027errstr\u0027: \u0027\u0027}"},{"line_number":358,"context_line":"    expiration \u003d time.time() + CONF.console.subprocess_timeout"},{"line_number":359,"context_line":"    timer \u003d loopingcall.FixedIntervalLoopingCall(_wait, node_uuid, obj)"},{"line_number":360,"context_line":"    timer.start(interval\u003dCONF.console.subprocess_checking_interval).wait()"}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_beb41af2","line":357,"in_reply_to":"3aaa91ec_6967d425","updated":"2016-06-29 05:16:09.000000000","message":"Done","commit_id":"a170cf11b37bc4d05fd712ea0931e2057c2281f8"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"e32c8293f3413aa8d7e545f7f3e7248c7043cefb","unresolved":false,"context_lines":[{"line_number":354,"context_line":"            LOG.warning(locals[\u0027errstr\u0027])"},{"line_number":355,"context_line":"            raise loopingcall.LoopingCallDone()"},{"line_number":356,"context_line":""},{"line_number":357,"context_line":"    locals \u003d {\u0027returncode\u0027: None, \u0027errstr\u0027: \u0027\u0027}"},{"line_number":358,"context_line":"    expiration \u003d time.time() + CONF.console.subprocess_timeout"},{"line_number":359,"context_line":"    timer \u003d loopingcall.FixedIntervalLoopingCall(_wait, node_uuid, obj)"},{"line_number":360,"context_line":"    timer.start(interval\u003dCONF.console.subprocess_checking_interval).wait()"}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_a9489c88","line":357,"in_reply_to":"3aaa91ec_6967d425","updated":"2016-06-28 09:28:07.000000000","message":"word*","commit_id":"a170cf11b37bc4d05fd712ea0931e2057c2281f8"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"299bf84d97f2f5c2a1a8be63e9e5f7ba7d222f51","unresolved":false,"context_lines":[{"line_number":252,"context_line":""},{"line_number":253,"context_line":""},{"line_number":254,"context_line":"def get_socat_console_url(port):"},{"line_number":255,"context_line":"    \"\"\"Get an url to access the console via socat."},{"line_number":256,"context_line":""},{"line_number":257,"context_line":"    :param port: the terminal port (integer) for the node, this value is"},{"line_number":258,"context_line":"        located in the driver info"}],"source_content_type":"text/x-python","patch_set":6,"id":"3aaa91ec_3d0ed032","line":255,"range":{"start_line":255,"start_character":11,"end_line":255,"end_character":17},"updated":"2016-07-01 17:58:17.000000000","message":"nit: a URL","commit_id":"e24ded82ca44662102a77b95c7bb528c278b7eee"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"92144c1ae6e37b3b2f8846be0bf9769d84a72c4b","unresolved":false,"context_lines":[{"line_number":252,"context_line":""},{"line_number":253,"context_line":""},{"line_number":254,"context_line":"def get_socat_console_url(port):"},{"line_number":255,"context_line":"    \"\"\"Get an url to access the console via socat."},{"line_number":256,"context_line":""},{"line_number":257,"context_line":"    :param port: the terminal port (integer) for the node, this value is"},{"line_number":258,"context_line":"        located in the driver info"}],"source_content_type":"text/x-python","patch_set":6,"id":"1aa78d24_7c796e2f","line":255,"range":{"start_line":255,"start_character":11,"end_line":255,"end_character":17},"in_reply_to":"3aaa91ec_3d0ed032","updated":"2016-07-04 03:45:08.000000000","message":"Done","commit_id":"e24ded82ca44662102a77b95c7bb528c278b7eee"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"9f2a1efb5774b328537b9cd4c1299cca5c3aa0c9","unresolved":false,"context_lines":[{"line_number":263,"context_line":"    if netutils.is_valid_ipv6(console_host):"},{"line_number":264,"context_line":"        console_host \u003d \u0027[%s]\u0027 % console_host"},{"line_number":265,"context_line":""},{"line_number":266,"context_line":"    return \u0027%(scheme)s://%(host)s:%(port)s\u0027 % {\u0027scheme\u0027: scheme,"},{"line_number":267,"context_line":"                                               \u0027host\u0027: console_host,"},{"line_number":268,"context_line":"                                               \u0027port\u0027: port}"},{"line_number":269,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"3aaa91ec_acd29859","line":266,"range":{"start_line":266,"start_character":12,"end_line":266,"end_character":22},"updated":"2016-07-01 16:35:03.000000000","message":"nit: scheme is always \u0027tcp\u0027, you can just add it to the string here","commit_id":"e24ded82ca44662102a77b95c7bb528c278b7eee"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"92144c1ae6e37b3b2f8846be0bf9769d84a72c4b","unresolved":false,"context_lines":[{"line_number":263,"context_line":"    if netutils.is_valid_ipv6(console_host):"},{"line_number":264,"context_line":"        console_host \u003d \u0027[%s]\u0027 % console_host"},{"line_number":265,"context_line":""},{"line_number":266,"context_line":"    return \u0027%(scheme)s://%(host)s:%(port)s\u0027 % {\u0027scheme\u0027: scheme,"},{"line_number":267,"context_line":"                                               \u0027host\u0027: console_host,"},{"line_number":268,"context_line":"                                               \u0027port\u0027: port}"},{"line_number":269,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"1aa78d24_dc76a23d","line":266,"range":{"start_line":266,"start_character":12,"end_line":266,"end_character":22},"in_reply_to":"3aaa91ec_acd29859","updated":"2016-07-04 03:45:08.000000000","message":"Done","commit_id":"e24ded82ca44662102a77b95c7bb528c278b7eee"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"299bf84d97f2f5c2a1a8be63e9e5f7ba7d222f51","unresolved":false,"context_lines":[{"line_number":273,"context_line":""},{"line_number":274,"context_line":"    :param node_uuid: the uuid of the node"},{"line_number":275,"context_line":"    :param port: the terminal port for the node"},{"line_number":276,"context_line":"    :param console_cmd: the shell command that gets the console"},{"line_number":277,"context_line":"    :raises ConsoleError: if the directory for the PID file or the PID file"},{"line_number":278,"context_line":"        cannot be created"},{"line_number":279,"context_line":"    :raises ConsoleSubprocessFailed: when invoking the subprocess failed"}],"source_content_type":"text/x-python","patch_set":6,"id":"3aaa91ec_7d721813","line":276,"updated":"2016-07-01 17:58:17.000000000","message":"What does this mean? I don\u0027t understand.","commit_id":"e24ded82ca44662102a77b95c7bb528c278b7eee"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"92144c1ae6e37b3b2f8846be0bf9769d84a72c4b","unresolved":false,"context_lines":[{"line_number":273,"context_line":""},{"line_number":274,"context_line":"    :param node_uuid: the uuid of the node"},{"line_number":275,"context_line":"    :param port: the terminal port for the node"},{"line_number":276,"context_line":"    :param console_cmd: the shell command that gets the console"},{"line_number":277,"context_line":"    :raises ConsoleError: if the directory for the PID file or the PID file"},{"line_number":278,"context_line":"        cannot be created"},{"line_number":279,"context_line":"    :raises ConsoleSubprocessFailed: when invoking the subprocess failed"}],"source_content_type":"text/x-python","patch_set":6,"id":"1aa78d24_3cec06c7","line":276,"in_reply_to":"3aaa91ec_7d721813","updated":"2016-07-04 03:45:08.000000000","message":"Done","commit_id":"e24ded82ca44662102a77b95c7bb528c278b7eee"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"2edbeee9561a1a517b03425607d3253abfc4c924","unresolved":false,"context_lines":[{"line_number":251,"context_line":"                        \"stop shellinabox console.\"), node_uuid)"},{"line_number":252,"context_line":""},{"line_number":253,"context_line":""},{"line_number":254,"context_line":"def get_socat_console_url(port):"},{"line_number":255,"context_line":"    \"\"\"Get a URL to access the console via socat."},{"line_number":256,"context_line":""},{"line_number":257,"context_line":"    :param port: the terminal port (integer) for the node, this value is"}],"source_content_type":"text/x-python","patch_set":8,"id":"1aa78d24_21e94381","line":254,"range":{"start_line":254,"start_character":4,"end_line":254,"end_character":25},"updated":"2016-07-05 10:19:55.000000000","message":"It seems that this method is not called anywhere?","commit_id":"e53be04bccce194413346688b817fa76d843213c"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"eea01402ba812aff113e43d4a5887fa9fa104bc0","unresolved":false,"context_lines":[{"line_number":251,"context_line":"                        \"stop shellinabox console.\"), node_uuid)"},{"line_number":252,"context_line":""},{"line_number":253,"context_line":""},{"line_number":254,"context_line":"def get_socat_console_url(port):"},{"line_number":255,"context_line":"    \"\"\"Get a URL to access the console via socat."},{"line_number":256,"context_line":""},{"line_number":257,"context_line":"    :param port: the terminal port (integer) for the node, this value is"}],"source_content_type":"text/x-python","patch_set":8,"id":"1aa78d24_0327e764","line":254,"range":{"start_line":254,"start_character":4,"end_line":254,"end_character":25},"in_reply_to":"1aa78d24_21e94381","updated":"2016-07-05 12:27:24.000000000","message":"This function is called by IPMISocatConsole::get_console(). Please see https://review.openstack.org/#/c/293873/16/ironic/drivers/modules/ipmitool.py.","commit_id":"e53be04bccce194413346688b817fa76d843213c"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"2edbeee9561a1a517b03425607d3253abfc4c924","unresolved":false,"context_lines":[{"line_number":254,"context_line":"def get_socat_console_url(port):"},{"line_number":255,"context_line":"    \"\"\"Get a URL to access the console via socat."},{"line_number":256,"context_line":""},{"line_number":257,"context_line":"    :param port: the terminal port (integer) for the node, this value is"},{"line_number":258,"context_line":"        located in the driver info"},{"line_number":259,"context_line":"    :return: an access url to the socat console of the node"},{"line_number":260,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":8,"id":"1aa78d24_614ceb42","line":257,"updated":"2016-07-05 10:19:55.000000000","message":"nit: we starting description from Capital letter, and placing dot at the end. If you do another revision please update docstrings accordingly.","commit_id":"e53be04bccce194413346688b817fa76d843213c"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"eea01402ba812aff113e43d4a5887fa9fa104bc0","unresolved":false,"context_lines":[{"line_number":254,"context_line":"def get_socat_console_url(port):"},{"line_number":255,"context_line":"    \"\"\"Get a URL to access the console via socat."},{"line_number":256,"context_line":""},{"line_number":257,"context_line":"    :param port: the terminal port (integer) for the node, this value is"},{"line_number":258,"context_line":"        located in the driver info"},{"line_number":259,"context_line":"    :return: an access url to the socat console of the node"},{"line_number":260,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":8,"id":"1aa78d24_877ac2ef","line":257,"in_reply_to":"1aa78d24_614ceb42","updated":"2016-07-05 12:27:24.000000000","message":"This got two +2 and there are many places like this. Please accept this for now.","commit_id":"e53be04bccce194413346688b817fa76d843213c"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"2edbeee9561a1a517b03425607d3253abfc4c924","unresolved":false,"context_lines":[{"line_number":295,"context_line":"    if netutils.is_valid_ipv6(console_host):"},{"line_number":296,"context_line":"        arg \u003d \u0027TCP6-LISTEN:%(port)s,bind\u003d[%(host)s],reuseaddr,fork\u0027"},{"line_number":297,"context_line":"    else:"},{"line_number":298,"context_line":"        arg \u003d \u0027TCP-LISTEN:%(port)s,bind\u003d%(host)s,reuseaddr,fork\u0027"},{"line_number":299,"context_line":"    args.append(arg % {\u0027host\u0027: console_host,"},{"line_number":300,"context_line":"                       \u0027port\u0027: port})"},{"line_number":301,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"1aa78d24_146f23c6","line":298,"updated":"2016-07-05 10:19:55.000000000","message":"Lets use TCP4-LISTEN here: http://www.dest-unreach.org/socat/doc/socat.html since TCP-LISTEN may listen on both v4 and v6 address.","commit_id":"e53be04bccce194413346688b817fa76d843213c"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"eea01402ba812aff113e43d4a5887fa9fa104bc0","unresolved":false,"context_lines":[{"line_number":295,"context_line":"    if netutils.is_valid_ipv6(console_host):"},{"line_number":296,"context_line":"        arg \u003d \u0027TCP6-LISTEN:%(port)s,bind\u003d[%(host)s],reuseaddr,fork\u0027"},{"line_number":297,"context_line":"    else:"},{"line_number":298,"context_line":"        arg \u003d \u0027TCP-LISTEN:%(port)s,bind\u003d%(host)s,reuseaddr,fork\u0027"},{"line_number":299,"context_line":"    args.append(arg % {\u0027host\u0027: console_host,"},{"line_number":300,"context_line":"                       \u0027port\u0027: port})"},{"line_number":301,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"1aa78d24_e73626e6","line":298,"in_reply_to":"1aa78d24_146f23c6","updated":"2016-07-05 12:27:24.000000000","message":"Done","commit_id":"e53be04bccce194413346688b817fa76d843213c"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"ad4b14817939f818fb33acf1070288d71d795d90","unresolved":false,"context_lines":[{"line_number":312,"context_line":"        error \u003d _(\"%(exec_error)s\\n\""},{"line_number":313,"context_line":"                  \"Command: %(command)s\") % {\u0027exec_error\u0027: str(e),"},{"line_number":314,"context_line":"                                             \u0027command\u0027: \u0027 \u0027.join(args)}"},{"line_number":315,"context_line":"        LOG.warning(error)"},{"line_number":316,"context_line":"        raise exception.ConsoleSubprocessFailed(error\u003derror)"},{"line_number":317,"context_line":""},{"line_number":318,"context_line":"    # NOTE: we need to check if socat fails to start here."}],"source_content_type":"text/x-python","patch_set":8,"id":"1aa78d24_34733fe9","line":315,"updated":"2016-07-05 12:32:27.000000000","message":"We can just do LOG.exception(_LE(\u0027unable to start socat console\u0027)) here, the exception itself will be printed without any substitutions.","commit_id":"e53be04bccce194413346688b817fa76d843213c"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"d313df27a9164374a68342dbfe8c4dd33b8f0e32","unresolved":false,"context_lines":[{"line_number":312,"context_line":"        error \u003d _(\"%(exec_error)s\\n\""},{"line_number":313,"context_line":"                  \"Command: %(command)s\") % {\u0027exec_error\u0027: str(e),"},{"line_number":314,"context_line":"                                             \u0027command\u0027: \u0027 \u0027.join(args)}"},{"line_number":315,"context_line":"        LOG.warning(error)"},{"line_number":316,"context_line":"        raise exception.ConsoleSubprocessFailed(error\u003derror)"},{"line_number":317,"context_line":""},{"line_number":318,"context_line":"    # NOTE: we need to check if socat fails to start here."}],"source_content_type":"text/x-python","patch_set":8,"id":"1aa78d24_04ffc7aa","line":315,"in_reply_to":"1aa78d24_34733fe9","updated":"2016-07-06 03:27:18.000000000","message":"Done","commit_id":"e53be04bccce194413346688b817fa76d843213c"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"ad4b14817939f818fb33acf1070288d71d795d90","unresolved":false,"context_lines":[{"line_number":340,"context_line":"                    \u0027command\u0027: \u0027 \u0027.join(args),"},{"line_number":341,"context_line":"                    \u0027return_code\u0027: wait_state[\u0027returncode\u0027],"},{"line_number":342,"context_line":"                    \u0027error\u0027: err}"},{"line_number":343,"context_line":"            LOG.warning(wait_state[\u0027errstr\u0027])"},{"line_number":344,"context_line":"            raise loopingcall.LoopingCallDone()"},{"line_number":345,"context_line":""},{"line_number":346,"context_line":"        if time.time() \u003e expiration:"}],"source_content_type":"text/x-python","patch_set":8,"id":"1aa78d24_f70c193d","line":343,"updated":"2016-07-05 12:32:27.000000000","message":"LOG.error as we\u0027ll fail","commit_id":"e53be04bccce194413346688b817fa76d843213c"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"d313df27a9164374a68342dbfe8c4dd33b8f0e32","unresolved":false,"context_lines":[{"line_number":340,"context_line":"                    \u0027command\u0027: \u0027 \u0027.join(args),"},{"line_number":341,"context_line":"                    \u0027return_code\u0027: wait_state[\u0027returncode\u0027],"},{"line_number":342,"context_line":"                    \u0027error\u0027: err}"},{"line_number":343,"context_line":"            LOG.warning(wait_state[\u0027errstr\u0027])"},{"line_number":344,"context_line":"            raise loopingcall.LoopingCallDone()"},{"line_number":345,"context_line":""},{"line_number":346,"context_line":"        if time.time() \u003e expiration:"}],"source_content_type":"text/x-python","patch_set":8,"id":"1aa78d24_a46cf3d0","line":343,"in_reply_to":"1aa78d24_f70c193d","updated":"2016-07-06 03:27:18.000000000","message":"Done","commit_id":"e53be04bccce194413346688b817fa76d843213c"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"ad4b14817939f818fb33acf1070288d71d795d90","unresolved":false,"context_lines":[{"line_number":347,"context_line":"            wait_state[\u0027errstr\u0027] \u003d (_(\"Timeout while waiting for console \""},{"line_number":348,"context_line":"                                      \"subprocess to start for node %s.\") %"},{"line_number":349,"context_line":"                                    node_uuid)"},{"line_number":350,"context_line":"            LOG.warning(wait_state[\u0027errstr\u0027])"},{"line_number":351,"context_line":"            raise loopingcall.LoopingCallDone()"},{"line_number":352,"context_line":""},{"line_number":353,"context_line":"    wait_state \u003d {\u0027returncode\u0027: None, \u0027errstr\u0027: \u0027\u0027}"}],"source_content_type":"text/x-python","patch_set":8,"id":"1aa78d24_170a8521","line":350,"updated":"2016-07-05 12:32:27.000000000","message":"LOG.error as we\u0027ll fail","commit_id":"e53be04bccce194413346688b817fa76d843213c"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"d313df27a9164374a68342dbfe8c4dd33b8f0e32","unresolved":false,"context_lines":[{"line_number":347,"context_line":"            wait_state[\u0027errstr\u0027] \u003d (_(\"Timeout while waiting for console \""},{"line_number":348,"context_line":"                                      \"subprocess to start for node %s.\") %"},{"line_number":349,"context_line":"                                    node_uuid)"},{"line_number":350,"context_line":"            LOG.warning(wait_state[\u0027errstr\u0027])"},{"line_number":351,"context_line":"            raise loopingcall.LoopingCallDone()"},{"line_number":352,"context_line":""},{"line_number":353,"context_line":"    wait_state \u003d {\u0027returncode\u0027: None, \u0027errstr\u0027: \u0027\u0027}"}],"source_content_type":"text/x-python","patch_set":8,"id":"1aa78d24_447b8f8c","line":350,"in_reply_to":"1aa78d24_170a8521","updated":"2016-07-06 03:27:18.000000000","message":"Done","commit_id":"e53be04bccce194413346688b817fa76d843213c"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"9030a80e541ba6d8099a5a7d04317eab0b610270","unresolved":false,"context_lines":[{"line_number":256,"context_line":"    \"\"\"Get a URL to access the console via socat."},{"line_number":257,"context_line":""},{"line_number":258,"context_line":"    :param port: the terminal port (integer) for the node, this value is"},{"line_number":259,"context_line":"        located in the driver info"},{"line_number":260,"context_line":"    :return: an access url to the socat console of the node"},{"line_number":261,"context_line":"    \"\"\""},{"line_number":262,"context_line":"    console_host \u003d CONF.my_ip"}],"source_content_type":"text/x-python","patch_set":10,"id":"1aa78d24_bc432d6b","line":259,"updated":"2016-07-07 00:26:52.000000000","message":"I don\u0027t think we should put \u0027 this value is located in the driver info\u0027. This value is being passed as a parameter to this method; it doesn\u0027t matter where it might have been located before calling this method.","commit_id":"13d9d99458535bf75bed109f3e65aed83cb8f3c9"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"51df385919f27b6fe72077a2d1e1013d6d1e7a8f","unresolved":false,"context_lines":[{"line_number":256,"context_line":"    \"\"\"Get a URL to access the console via socat."},{"line_number":257,"context_line":""},{"line_number":258,"context_line":"    :param port: the terminal port (integer) for the node, this value is"},{"line_number":259,"context_line":"        located in the driver info"},{"line_number":260,"context_line":"    :return: an access url to the socat console of the node"},{"line_number":261,"context_line":"    \"\"\""},{"line_number":262,"context_line":"    console_host \u003d CONF.my_ip"}],"source_content_type":"text/x-python","patch_set":10,"id":"1aa78d24_8d071d81","line":259,"in_reply_to":"1aa78d24_bc432d6b","updated":"2016-07-07 02:21:30.000000000","message":"Done","commit_id":"13d9d99458535bf75bed109f3e65aed83cb8f3c9"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"9030a80e541ba6d8099a5a7d04317eab0b610270","unresolved":false,"context_lines":[{"line_number":257,"context_line":""},{"line_number":258,"context_line":"    :param port: the terminal port (integer) for the node, this value is"},{"line_number":259,"context_line":"        located in the driver info"},{"line_number":260,"context_line":"    :return: an access url to the socat console of the node"},{"line_number":261,"context_line":"    \"\"\""},{"line_number":262,"context_line":"    console_host \u003d CONF.my_ip"},{"line_number":263,"context_line":"    if netutils.is_valid_ipv6(console_host):"}],"source_content_type":"text/x-python","patch_set":10,"id":"1aa78d24_7c3425fb","line":260,"updated":"2016-07-07 00:26:52.000000000","message":"s/url/URL/","commit_id":"13d9d99458535bf75bed109f3e65aed83cb8f3c9"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"51df385919f27b6fe72077a2d1e1013d6d1e7a8f","unresolved":false,"context_lines":[{"line_number":257,"context_line":""},{"line_number":258,"context_line":"    :param port: the terminal port (integer) for the node, this value is"},{"line_number":259,"context_line":"        located in the driver info"},{"line_number":260,"context_line":"    :return: an access url to the socat console of the node"},{"line_number":261,"context_line":"    \"\"\""},{"line_number":262,"context_line":"    console_host \u003d CONF.my_ip"},{"line_number":263,"context_line":"    if netutils.is_valid_ipv6(console_host):"}],"source_content_type":"text/x-python","patch_set":10,"id":"1aa78d24_8d2efdf8","line":260,"in_reply_to":"1aa78d24_7c3425fb","updated":"2016-07-07 02:21:30.000000000","message":"Done","commit_id":"13d9d99458535bf75bed109f3e65aed83cb8f3c9"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"9030a80e541ba6d8099a5a7d04317eab0b610270","unresolved":false,"context_lines":[{"line_number":313,"context_line":"        error \u003d _(\"%(exec_error)s\\n\""},{"line_number":314,"context_line":"                  \"Command: %(command)s\") % {\u0027exec_error\u0027: str(e),"},{"line_number":315,"context_line":"                                             \u0027command\u0027: \u0027 \u0027.join(args)}"},{"line_number":316,"context_line":"        LOG.exception(_LE(\u0027Unable to start socat console\u0027))"},{"line_number":317,"context_line":"        raise exception.ConsoleSubprocessFailed(error\u003derror)"},{"line_number":318,"context_line":""},{"line_number":319,"context_line":"    # NOTE: we need to check if socat fails to start here."}],"source_content_type":"text/x-python","patch_set":10,"id":"1aa78d24_8729be8c","line":316,"updated":"2016-07-07 00:26:52.000000000","message":"There are a lot of similarities to the shellinabox method -- which does a LOG.warning(). Any reason to do it differently and use LOG.exception here?","commit_id":"13d9d99458535bf75bed109f3e65aed83cb8f3c9"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"51df385919f27b6fe72077a2d1e1013d6d1e7a8f","unresolved":false,"context_lines":[{"line_number":313,"context_line":"        error \u003d _(\"%(exec_error)s\\n\""},{"line_number":314,"context_line":"                  \"Command: %(command)s\") % {\u0027exec_error\u0027: str(e),"},{"line_number":315,"context_line":"                                             \u0027command\u0027: \u0027 \u0027.join(args)}"},{"line_number":316,"context_line":"        LOG.exception(_LE(\u0027Unable to start socat console\u0027))"},{"line_number":317,"context_line":"        raise exception.ConsoleSubprocessFailed(error\u003derror)"},{"line_number":318,"context_line":""},{"line_number":319,"context_line":"    # NOTE: we need to check if socat fails to start here."}],"source_content_type":"text/x-python","patch_set":10,"id":"1aa78d24_add3f9d3","line":316,"in_reply_to":"1aa78d24_8729be8c","updated":"2016-07-07 02:21:30.000000000","message":"I vote for LOG.exception() here. I see that the old LOG.warning() way causes the message to be printed twice, one here and one later from the place that called this function, because the message is passed to the ConsoleSubprocessFailed exception.","commit_id":"13d9d99458535bf75bed109f3e65aed83cb8f3c9"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"9030a80e541ba6d8099a5a7d04317eab0b610270","unresolved":false,"context_lines":[{"line_number":318,"context_line":""},{"line_number":319,"context_line":"    # NOTE: we need to check if socat fails to start here."},{"line_number":320,"context_line":"    # If it starts successfully, it will run in non-daemon mode and"},{"line_number":321,"context_line":"    # will not return until the console session is stopped."},{"line_number":322,"context_line":""},{"line_number":323,"context_line":"    def _wait(node_uuid, popen_obj):"},{"line_number":324,"context_line":"        wait_state[\u0027returncode\u0027] \u003d popen_obj.poll()"}],"source_content_type":"text/x-python","patch_set":10,"id":"1aa78d24_a7a79a09","line":321,"updated":"2016-07-07 00:26:52.000000000","message":"I don\u0027t understand this NOTE. Is it part of the above method or part of the _wait() below?","commit_id":"13d9d99458535bf75bed109f3e65aed83cb8f3c9"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"51df385919f27b6fe72077a2d1e1013d6d1e7a8f","unresolved":false,"context_lines":[{"line_number":318,"context_line":""},{"line_number":319,"context_line":"    # NOTE: we need to check if socat fails to start here."},{"line_number":320,"context_line":"    # If it starts successfully, it will run in non-daemon mode and"},{"line_number":321,"context_line":"    # will not return until the console session is stopped."},{"line_number":322,"context_line":""},{"line_number":323,"context_line":"    def _wait(node_uuid, popen_obj):"},{"line_number":324,"context_line":"        wait_state[\u0027returncode\u0027] \u003d popen_obj.poll()"}],"source_content_type":"text/x-python","patch_set":10,"id":"1aa78d24_88770b9f","line":321,"in_reply_to":"1aa78d24_a7a79a09","updated":"2016-07-07 02:21:30.000000000","message":"This is part of the above method for explaining what we do after Popen(). And note that socat runs in a different mode in comparison to shellinabox.","commit_id":"13d9d99458535bf75bed109f3e65aed83cb8f3c9"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"9030a80e541ba6d8099a5a7d04317eab0b610270","unresolved":false,"context_lines":[{"line_number":340,"context_line":"                \"Error: %(error)r\") % {"},{"line_number":341,"context_line":"                    \u0027command\u0027: \u0027 \u0027.join(args),"},{"line_number":342,"context_line":"                    \u0027return_code\u0027: wait_state[\u0027returncode\u0027],"},{"line_number":343,"context_line":"                    \u0027error\u0027: err}"},{"line_number":344,"context_line":"            LOG.error(wait_state[\u0027errstr\u0027])"},{"line_number":345,"context_line":"            raise loopingcall.LoopingCallDone()"},{"line_number":346,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"1aa78d24_a7e95ab9","line":343,"updated":"2016-07-07 00:26:52.000000000","message":"Is there any value to using a similar error string as shellinabox uses? Having Exit code, Stdout, Stderr, instead of return_code, error?","commit_id":"13d9d99458535bf75bed109f3e65aed83cb8f3c9"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"51df385919f27b6fe72077a2d1e1013d6d1e7a8f","unresolved":false,"context_lines":[{"line_number":340,"context_line":"                \"Error: %(error)r\") % {"},{"line_number":341,"context_line":"                    \u0027command\u0027: \u0027 \u0027.join(args),"},{"line_number":342,"context_line":"                    \u0027return_code\u0027: wait_state[\u0027returncode\u0027],"},{"line_number":343,"context_line":"                    \u0027error\u0027: err}"},{"line_number":344,"context_line":"            LOG.error(wait_state[\u0027errstr\u0027])"},{"line_number":345,"context_line":"            raise loopingcall.LoopingCallDone()"},{"line_number":346,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"1aa78d24_28bff7aa","line":343,"in_reply_to":"1aa78d24_a7e95ab9","updated":"2016-07-07 02:21:30.000000000","message":"Socat uses stdout data for transmission/redirection, not like Shellinabox. So, the call to Popen() above is not similar to the one of start_shellinabox_console(). Because of that, out data will be None always, so we only log the error.","commit_id":"13d9d99458535bf75bed109f3e65aed83cb8f3c9"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"9030a80e541ba6d8099a5a7d04317eab0b610270","unresolved":false,"context_lines":[{"line_number":341,"context_line":"                    \u0027command\u0027: \u0027 \u0027.join(args),"},{"line_number":342,"context_line":"                    \u0027return_code\u0027: wait_state[\u0027returncode\u0027],"},{"line_number":343,"context_line":"                    \u0027error\u0027: err}"},{"line_number":344,"context_line":"            LOG.error(wait_state[\u0027errstr\u0027])"},{"line_number":345,"context_line":"            raise loopingcall.LoopingCallDone()"},{"line_number":346,"context_line":""},{"line_number":347,"context_line":"        if time.time() \u003e expiration:"}],"source_content_type":"text/x-python","patch_set":10,"id":"1aa78d24_673db28e","line":344,"updated":"2016-07-07 00:26:52.000000000","message":"shellinabox version has LOG.warning(). Shouldn\u0027t we be consistent?","commit_id":"13d9d99458535bf75bed109f3e65aed83cb8f3c9"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"51df385919f27b6fe72077a2d1e1013d6d1e7a8f","unresolved":false,"context_lines":[{"line_number":341,"context_line":"                    \u0027command\u0027: \u0027 \u0027.join(args),"},{"line_number":342,"context_line":"                    \u0027return_code\u0027: wait_state[\u0027returncode\u0027],"},{"line_number":343,"context_line":"                    \u0027error\u0027: err}"},{"line_number":344,"context_line":"            LOG.error(wait_state[\u0027errstr\u0027])"},{"line_number":345,"context_line":"            raise loopingcall.LoopingCallDone()"},{"line_number":346,"context_line":""},{"line_number":347,"context_line":"        if time.time() \u003e expiration:"}],"source_content_type":"text/x-python","patch_set":10,"id":"1aa78d24_882eebf8","line":344,"in_reply_to":"1aa78d24_673db28e","updated":"2016-07-07 02:21:30.000000000","message":"I vote for the use of LOG.error() here because this is an error. May we consider updating code of shellinabox console later?","commit_id":"13d9d99458535bf75bed109f3e65aed83cb8f3c9"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"9030a80e541ba6d8099a5a7d04317eab0b610270","unresolved":false,"context_lines":[{"line_number":348,"context_line":"            wait_state[\u0027errstr\u0027] \u003d (_(\"Timeout while waiting for console \""},{"line_number":349,"context_line":"                                      \"subprocess to start for node %s.\") %"},{"line_number":350,"context_line":"                                    node_uuid)"},{"line_number":351,"context_line":"            LOG.error(wait_state[\u0027errstr\u0027])"},{"line_number":352,"context_line":"            raise loopingcall.LoopingCallDone()"},{"line_number":353,"context_line":""},{"line_number":354,"context_line":"    wait_state \u003d {\u0027returncode\u0027: None, \u0027errstr\u0027: \u0027\u0027}"}],"source_content_type":"text/x-python","patch_set":10,"id":"1aa78d24_c740e609","line":351,"updated":"2016-07-07 00:26:52.000000000","message":"ditto","commit_id":"13d9d99458535bf75bed109f3e65aed83cb8f3c9"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"51df385919f27b6fe72077a2d1e1013d6d1e7a8f","unresolved":false,"context_lines":[{"line_number":348,"context_line":"            wait_state[\u0027errstr\u0027] \u003d (_(\"Timeout while waiting for console \""},{"line_number":349,"context_line":"                                      \"subprocess to start for node %s.\") %"},{"line_number":350,"context_line":"                                    node_uuid)"},{"line_number":351,"context_line":"            LOG.error(wait_state[\u0027errstr\u0027])"},{"line_number":352,"context_line":"            raise loopingcall.LoopingCallDone()"},{"line_number":353,"context_line":""},{"line_number":354,"context_line":"    wait_state \u003d {\u0027returncode\u0027: None, \u0027errstr\u0027: \u0027\u0027}"}],"source_content_type":"text/x-python","patch_set":10,"id":"1aa78d24_28d6d7f0","line":351,"in_reply_to":"1aa78d24_c740e609","updated":"2016-07-07 02:21:30.000000000","message":"Please see my above answer.","commit_id":"13d9d99458535bf75bed109f3e65aed83cb8f3c9"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"9030a80e541ba6d8099a5a7d04317eab0b610270","unresolved":false,"context_lines":[{"line_number":370,"context_line":"        _stop_console(node_uuid)"},{"line_number":371,"context_line":"    except exception.NoConsolePid:"},{"line_number":372,"context_line":"        LOG.warning(_LW(\"No console pid found for node %s while trying to \""},{"line_number":373,"context_line":"                        \"stop socat console.\"), node_uuid)"}],"source_content_type":"text/x-python","patch_set":10,"id":"1aa78d24_8761beab","line":373,"updated":"2016-07-07 00:26:52.000000000","message":"this is VERY similar to stop_shellinabox_console().","commit_id":"13d9d99458535bf75bed109f3e65aed83cb8f3c9"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"51df385919f27b6fe72077a2d1e1013d6d1e7a8f","unresolved":false,"context_lines":[{"line_number":370,"context_line":"        _stop_console(node_uuid)"},{"line_number":371,"context_line":"    except exception.NoConsolePid:"},{"line_number":372,"context_line":"        LOG.warning(_LW(\"No console pid found for node %s while trying to \""},{"line_number":373,"context_line":"                        \"stop socat console.\"), node_uuid)"}],"source_content_type":"text/x-python","patch_set":10,"id":"1aa78d24_68f45f5a","line":373,"in_reply_to":"1aa78d24_8761beab","updated":"2016-07-07 02:21:30.000000000","message":"Yes, but the log messages are different. And the code includes only one call, I think this better separated.","commit_id":"13d9d99458535bf75bed109f3e65aed83cb8f3c9"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"1a727f457edc64e420f8cb6afde92e2658bb0aed","unresolved":false,"context_lines":[{"line_number":255,"context_line":"def get_socat_console_url(port):"},{"line_number":256,"context_line":"    \"\"\"Get a URL to access the console via socat."},{"line_number":257,"context_line":""},{"line_number":258,"context_line":"    :param port: the terminal port (integer) for the node"},{"line_number":259,"context_line":"    :return: an access URL to the socat console of the node"},{"line_number":260,"context_line":"    \"\"\""},{"line_number":261,"context_line":"    console_host \u003d CONF.my_ip"}],"source_content_type":"text/x-python","patch_set":12,"id":"1aa78d24_b14dc6c6","line":258,"updated":"2016-07-08 08:37:41.000000000","message":"param description should start with capital letter and have a dot in the end. It is a nit: but likely to have.","commit_id":"74fa8b37b606bb3acabef89359f3b208c3ffe4bc"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"ae29ff24833636d82d5b08e03f26e9d05f0f99a5","unresolved":false,"context_lines":[{"line_number":344,"context_line":"            raise loopingcall.LoopingCallDone()"},{"line_number":345,"context_line":""},{"line_number":346,"context_line":"        if time.time() \u003e expiration:"},{"line_number":347,"context_line":"            wait_state[\u0027errstr\u0027] \u003d (_(\"Timeout while waiting for console \""},{"line_number":348,"context_line":"                                      \"subprocess to start for node %s.\") %"},{"line_number":349,"context_line":"                                    node_uuid)"},{"line_number":350,"context_line":"            LOG.error(wait_state[\u0027errstr\u0027])"}],"source_content_type":"text/x-python","patch_set":15,"id":"1aa78d24_fd85650a","line":347,"updated":"2016-07-13 23:01:02.000000000","message":"This should be _LE(), I think","commit_id":"9eb9d5d6d37988d2d12603d4a5969eadd614ecb6"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"d12057b67d73132a16b9aa7e99e0d33db548ee51","unresolved":false,"context_lines":[{"line_number":344,"context_line":"            raise loopingcall.LoopingCallDone()"},{"line_number":345,"context_line":""},{"line_number":346,"context_line":"        if time.time() \u003e expiration:"},{"line_number":347,"context_line":"            wait_state[\u0027errstr\u0027] \u003d (_(\"Timeout while waiting for console \""},{"line_number":348,"context_line":"                                      \"subprocess to start for node %s.\") %"},{"line_number":349,"context_line":"                                    node_uuid)"},{"line_number":350,"context_line":"            LOG.error(wait_state[\u0027errstr\u0027])"}],"source_content_type":"text/x-python","patch_set":15,"id":"1aa78d24_f1b90e7e","line":347,"in_reply_to":"1aa78d24_fd85650a","updated":"2016-07-14 01:42:31.000000000","message":"Ruby Loo once suggested using _LE, _LW only for the log. If the msg is passed to an exception, using _() only. In this situation the msg will be passed to an exception ConsoleSubprocessFailed later.\n\nThe guideline is at:\nhttp://docs.openstack.org/developer/oslo.i18n/guidelines.html#choosing-a-marker-function","commit_id":"9eb9d5d6d37988d2d12603d4a5969eadd614ecb6"}],"ironic/tests/unit/drivers/modules/test_console_utils.py":[{"author":{"_account_id":7882,"name":"Yuiko Takada Mori","email":"yuiko-mori@nec.com","username":"YuikoTakada"},"change_message_id":"ba35b1ba64e0304db16f29f80cd7cc9e6b672234","unresolved":false,"context_lines":[{"line_number":435,"context_line":"                                 mock_dir_exists,"},{"line_number":436,"context_line":"                                 mock_pid_exists,"},{"line_number":437,"context_line":"                                 mock_popen):"},{"line_number":438,"context_line":"        # set \u0027socat\u0027 to CONF.console.terminal"},{"line_number":439,"context_line":"        self.config(terminal\u003d\u0027socat\u0027, group\u003d\u0027console\u0027)"},{"line_number":440,"context_line":""},{"line_number":441,"context_line":"        mock_popen.return_value.pid \u003d 23456"},{"line_number":442,"context_line":"        mock_popen.return_value.poll.return_value \u003d None"}],"source_content_type":"text/x-python","patch_set":4,"id":"3aaa91ec_09665a29","line":439,"range":{"start_line":438,"start_character":8,"end_line":439,"end_character":54},"updated":"2016-06-27 04:59:12.000000000","message":"We need to remove here, right?","commit_id":"542d8ce5489e028aba592e2ec3bfe971657d626a"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"1135a777f52213893fd6479b68cf63a900754f9a","unresolved":false,"context_lines":[{"line_number":435,"context_line":"                                 mock_dir_exists,"},{"line_number":436,"context_line":"                                 mock_pid_exists,"},{"line_number":437,"context_line":"                                 mock_popen):"},{"line_number":438,"context_line":"        # set \u0027socat\u0027 to CONF.console.terminal"},{"line_number":439,"context_line":"        self.config(terminal\u003d\u0027socat\u0027, group\u003d\u0027console\u0027)"},{"line_number":440,"context_line":""},{"line_number":441,"context_line":"        mock_popen.return_value.pid \u003d 23456"},{"line_number":442,"context_line":"        mock_popen.return_value.poll.return_value \u003d None"}],"source_content_type":"text/x-python","patch_set":4,"id":"3aaa91ec_eb474649","line":439,"range":{"start_line":438,"start_character":8,"end_line":439,"end_character":54},"in_reply_to":"3aaa91ec_09665a29","updated":"2016-06-28 03:47:22.000000000","message":"Done","commit_id":"542d8ce5489e028aba592e2ec3bfe971657d626a"},{"author":{"_account_id":7882,"name":"Yuiko Takada Mori","email":"yuiko-mori@nec.com","username":"YuikoTakada"},"change_message_id":"ba35b1ba64e0304db16f29f80cd7cc9e6b672234","unresolved":false,"context_lines":[{"line_number":466,"context_line":"                                       mock_dir_exists,"},{"line_number":467,"context_line":"                                       mock_pid_exists,"},{"line_number":468,"context_line":"                                       mock_popen):"},{"line_number":469,"context_line":"        # set \u0027socat\u0027 to CONF.console.terminal"},{"line_number":470,"context_line":"        self.config(terminal\u003d\u0027socat\u0027, group\u003d\u0027console\u0027)"},{"line_number":471,"context_line":""},{"line_number":472,"context_line":"        # no existing PID file before starting"},{"line_number":473,"context_line":"        mock_stop.side_effect \u003d exception.NoConsolePid(\u0027/tmp/blah\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"3aaa91ec_496ce207","line":470,"range":{"start_line":469,"start_character":8,"end_line":470,"end_character":54},"updated":"2016-06-27 04:59:12.000000000","message":"ditto","commit_id":"542d8ce5489e028aba592e2ec3bfe971657d626a"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"1135a777f52213893fd6479b68cf63a900754f9a","unresolved":false,"context_lines":[{"line_number":466,"context_line":"                                       mock_dir_exists,"},{"line_number":467,"context_line":"                                       mock_pid_exists,"},{"line_number":468,"context_line":"                                       mock_popen):"},{"line_number":469,"context_line":"        # set \u0027socat\u0027 to CONF.console.terminal"},{"line_number":470,"context_line":"        self.config(terminal\u003d\u0027socat\u0027, group\u003d\u0027console\u0027)"},{"line_number":471,"context_line":""},{"line_number":472,"context_line":"        # no existing PID file before starting"},{"line_number":473,"context_line":"        mock_stop.side_effect \u003d exception.NoConsolePid(\u0027/tmp/blah\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"3aaa91ec_4b73fab4","line":470,"range":{"start_line":469,"start_character":8,"end_line":470,"end_character":54},"in_reply_to":"3aaa91ec_496ce207","updated":"2016-06-28 03:47:22.000000000","message":"Done","commit_id":"542d8ce5489e028aba592e2ec3bfe971657d626a"},{"author":{"_account_id":7882,"name":"Yuiko Takada Mori","email":"yuiko-mori@nec.com","username":"YuikoTakada"},"change_message_id":"ba35b1ba64e0304db16f29f80cd7cc9e6b672234","unresolved":false,"context_lines":[{"line_number":496,"context_line":"    @mock.patch.object(console_utils, \u0027_stop_console\u0027, autospec\u003dTrue)"},{"line_number":497,"context_line":"    def test_start_socat_console_fail(self, mock_stop, mock_dir_exists,"},{"line_number":498,"context_line":"                                      mock_popen):"},{"line_number":499,"context_line":"        # set \u0027socat\u0027 to CONF.console.terminal"},{"line_number":500,"context_line":"        self.config(terminal\u003d\u0027socat\u0027, group\u003d\u0027console\u0027)"},{"line_number":501,"context_line":""},{"line_number":502,"context_line":"        mock_popen.side_effect \u003d OSError()"},{"line_number":503,"context_line":"        mock_popen.return_value.pid \u003d 23456"}],"source_content_type":"text/x-python","patch_set":4,"id":"3aaa91ec_09349af9","line":500,"range":{"start_line":499,"start_character":8,"end_line":500,"end_character":54},"updated":"2016-06-27 04:59:12.000000000","message":"ditto","commit_id":"542d8ce5489e028aba592e2ec3bfe971657d626a"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"1135a777f52213893fd6479b68cf63a900754f9a","unresolved":false,"context_lines":[{"line_number":496,"context_line":"    @mock.patch.object(console_utils, \u0027_stop_console\u0027, autospec\u003dTrue)"},{"line_number":497,"context_line":"    def test_start_socat_console_fail(self, mock_stop, mock_dir_exists,"},{"line_number":498,"context_line":"                                      mock_popen):"},{"line_number":499,"context_line":"        # set \u0027socat\u0027 to CONF.console.terminal"},{"line_number":500,"context_line":"        self.config(terminal\u003d\u0027socat\u0027, group\u003d\u0027console\u0027)"},{"line_number":501,"context_line":""},{"line_number":502,"context_line":"        mock_popen.side_effect \u003d OSError()"},{"line_number":503,"context_line":"        mock_popen.return_value.pid \u003d 23456"}],"source_content_type":"text/x-python","patch_set":4,"id":"3aaa91ec_2b782e8f","line":500,"range":{"start_line":499,"start_character":8,"end_line":500,"end_character":54},"in_reply_to":"3aaa91ec_09349af9","updated":"2016-06-28 03:47:22.000000000","message":"Done","commit_id":"542d8ce5489e028aba592e2ec3bfe971657d626a"},{"author":{"_account_id":7882,"name":"Yuiko Takada Mori","email":"yuiko-mori@nec.com","username":"YuikoTakada"},"change_message_id":"ba35b1ba64e0304db16f29f80cd7cc9e6b672234","unresolved":false,"context_lines":[{"line_number":521,"context_line":"    def test_start_socat_console_fail_nopiddir(self, mock_stop,"},{"line_number":522,"context_line":"                                               mock_dir_exists,"},{"line_number":523,"context_line":"                                               mock_popen):"},{"line_number":524,"context_line":"        # set \u0027socat\u0027 to CONF.console.terminal"},{"line_number":525,"context_line":"        self.config(terminal\u003d\u0027socat\u0027, group\u003d\u0027console\u0027)"},{"line_number":526,"context_line":""},{"line_number":527,"context_line":"        mock_dir_exists.side_effect \u003d exception.ConsoleError(message\u003d\u0027fail\u0027)"},{"line_number":528,"context_line":"        mock_popen.return_value.pid \u003d 23456"}],"source_content_type":"text/x-python","patch_set":4,"id":"3aaa91ec_89288a9b","line":525,"range":{"start_line":524,"start_character":8,"end_line":525,"end_character":54},"updated":"2016-06-27 04:59:12.000000000","message":"ditto","commit_id":"542d8ce5489e028aba592e2ec3bfe971657d626a"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"1135a777f52213893fd6479b68cf63a900754f9a","unresolved":false,"context_lines":[{"line_number":521,"context_line":"    def test_start_socat_console_fail_nopiddir(self, mock_stop,"},{"line_number":522,"context_line":"                                               mock_dir_exists,"},{"line_number":523,"context_line":"                                               mock_popen):"},{"line_number":524,"context_line":"        # set \u0027socat\u0027 to CONF.console.terminal"},{"line_number":525,"context_line":"        self.config(terminal\u003d\u0027socat\u0027, group\u003d\u0027console\u0027)"},{"line_number":526,"context_line":""},{"line_number":527,"context_line":"        mock_dir_exists.side_effect \u003d exception.ConsoleError(message\u003d\u0027fail\u0027)"},{"line_number":528,"context_line":"        mock_popen.return_value.pid \u003d 23456"}],"source_content_type":"text/x-python","patch_set":4,"id":"3aaa91ec_6b7236af","line":525,"range":{"start_line":524,"start_character":8,"end_line":525,"end_character":54},"in_reply_to":"3aaa91ec_89288a9b","updated":"2016-06-28 03:47:22.000000000","message":"Done","commit_id":"542d8ce5489e028aba592e2ec3bfe971657d626a"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"299bf84d97f2f5c2a1a8be63e9e5f7ba7d222f51","unresolved":false,"context_lines":[{"line_number":410,"context_line":""},{"line_number":411,"context_line":"        mock_stop.assert_called_once_with(self.info[\u0027uuid\u0027])"},{"line_number":412,"context_line":""},{"line_number":413,"context_line":"    def _get_socat_console(self, scheme):"},{"line_number":414,"context_line":"        url \u003d console_utils.get_socat_console_url(self.info[\u0027port\u0027])"},{"line_number":415,"context_line":"        console_host \u003d CONF.my_ip"},{"line_number":416,"context_line":"        if netutils.is_valid_ipv6(console_host):"}],"source_content_type":"text/x-python","patch_set":6,"id":"3aaa91ec_1d331464","line":413,"updated":"2016-07-01 17:58:17.000000000","message":"What is purpose of \u0027scheme\u0027 if always \u0027tcp\u0027?\n\nI think passing in the IP address would be cleaner.\n\nAlso I am not a fan of having the logic in here for if IPv6 vs IPv4. It is basically duplicating the code in the function. So I don\u0027t think this function has much use in testing the code.\n\n\nThis seems better:\n\n def test_get_socat_console_url_tcp(self):\n   self.conf(my_ip\u003d\"10.0.0.1\")\n   url \u003d console_utils.get_socat_console_url(self.info[\u0027port\u0027])\n   self.assertEqual(\"tcp://10.0.0.1:%s\" % self.info[\u0027port\u0027], url)\n\nAnd repeat for IPv6","commit_id":"e24ded82ca44662102a77b95c7bb528c278b7eee"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"92144c1ae6e37b3b2f8846be0bf9769d84a72c4b","unresolved":false,"context_lines":[{"line_number":410,"context_line":""},{"line_number":411,"context_line":"        mock_stop.assert_called_once_with(self.info[\u0027uuid\u0027])"},{"line_number":412,"context_line":""},{"line_number":413,"context_line":"    def _get_socat_console(self, scheme):"},{"line_number":414,"context_line":"        url \u003d console_utils.get_socat_console_url(self.info[\u0027port\u0027])"},{"line_number":415,"context_line":"        console_host \u003d CONF.my_ip"},{"line_number":416,"context_line":"        if netutils.is_valid_ipv6(console_host):"}],"source_content_type":"text/x-python","patch_set":6,"id":"1aa78d24_5c359244","line":413,"in_reply_to":"3aaa91ec_1d331464","updated":"2016-07-04 03:45:08.000000000","message":"Done","commit_id":"e24ded82ca44662102a77b95c7bb528c278b7eee"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"5afc03b857df28d56e44d6d5acc0e30d55fce843","unresolved":false,"context_lines":[{"line_number":441,"context_line":""},{"line_number":442,"context_line":"        # touch the pid file"},{"line_number":443,"context_line":"        pid_file \u003d console_utils._get_console_pid_file(self.info[\u0027uuid\u0027])"},{"line_number":444,"context_line":"        with open(pid_file, \u0027w\u0027) as pidf:"},{"line_number":445,"context_line":"            pidf.write(\"%s\" % 23456)"},{"line_number":446,"context_line":"        self.addCleanup(os.remove, pid_file)"},{"line_number":447,"context_line":"        self.assertTrue(os.path.exists(pid_file))"}],"source_content_type":"text/x-python","patch_set":6,"id":"3aaa91ec_fe927ffb","line":444,"updated":"2016-07-01 18:48:31.000000000","message":"Not a fan of writing to the disk in a unit test.\n\nCan this be changed to use the mock.mock_open() method instead?\n\nhttps://docs.python.org/3/library/unittest.mock.html#mock-open","commit_id":"e24ded82ca44662102a77b95c7bb528c278b7eee"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"92144c1ae6e37b3b2f8846be0bf9769d84a72c4b","unresolved":false,"context_lines":[{"line_number":441,"context_line":""},{"line_number":442,"context_line":"        # touch the pid file"},{"line_number":443,"context_line":"        pid_file \u003d console_utils._get_console_pid_file(self.info[\u0027uuid\u0027])"},{"line_number":444,"context_line":"        with open(pid_file, \u0027w\u0027) as pidf:"},{"line_number":445,"context_line":"            pidf.write(\"%s\" % 23456)"},{"line_number":446,"context_line":"        self.addCleanup(os.remove, pid_file)"},{"line_number":447,"context_line":"        self.assertTrue(os.path.exists(pid_file))"}],"source_content_type":"text/x-python","patch_set":6,"id":"1aa78d24_9c253ac4","line":444,"in_reply_to":"3aaa91ec_fe927ffb","updated":"2016-07-04 03:45:08.000000000","message":"This code is to create a real pid file, so _get_console_pid() will read the pid later. Now updated that mock the _get_console_pid(), no real file needed.","commit_id":"e24ded82ca44662102a77b95c7bb528c278b7eee"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"5afc03b857df28d56e44d6d5acc0e30d55fce843","unresolved":false,"context_lines":[{"line_number":471,"context_line":""},{"line_number":472,"context_line":"        # touch the pid file"},{"line_number":473,"context_line":"        pid_file \u003d console_utils._get_console_pid_file(self.info[\u0027uuid\u0027])"},{"line_number":474,"context_line":"        with open(pid_file, \u0027w\u0027) as pidf:"},{"line_number":475,"context_line":"            pidf.write(\"%s\" % 23456)"},{"line_number":476,"context_line":"        self.addCleanup(os.remove, pid_file)"},{"line_number":477,"context_line":"        self.assertTrue(os.path.exists(pid_file))"}],"source_content_type":"text/x-python","patch_set":6,"id":"3aaa91ec_1eeb0b7a","line":474,"updated":"2016-07-01 18:48:31.000000000","message":"Not a fan of writing to the disk in a unit test.\n\nCan this be changed to use the mock.mock_open() method instead?\n\nhttps://docs.python.org/3/library/unittest.mock.html#mock-open","commit_id":"e24ded82ca44662102a77b95c7bb528c278b7eee"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"92144c1ae6e37b3b2f8846be0bf9769d84a72c4b","unresolved":false,"context_lines":[{"line_number":471,"context_line":""},{"line_number":472,"context_line":"        # touch the pid file"},{"line_number":473,"context_line":"        pid_file \u003d console_utils._get_console_pid_file(self.info[\u0027uuid\u0027])"},{"line_number":474,"context_line":"        with open(pid_file, \u0027w\u0027) as pidf:"},{"line_number":475,"context_line":"            pidf.write(\"%s\" % 23456)"},{"line_number":476,"context_line":"        self.addCleanup(os.remove, pid_file)"},{"line_number":477,"context_line":"        self.assertTrue(os.path.exists(pid_file))"}],"source_content_type":"text/x-python","patch_set":6,"id":"1aa78d24_dc2fc29f","line":474,"in_reply_to":"3aaa91ec_1eeb0b7a","updated":"2016-07-04 03:45:08.000000000","message":"Ditto.","commit_id":"e24ded82ca44662102a77b95c7bb528c278b7eee"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"5afc03b857df28d56e44d6d5acc0e30d55fce843","unresolved":false,"context_lines":[{"line_number":513,"context_line":"                                               mock_dir_exists,"},{"line_number":514,"context_line":"                                               mock_popen):"},{"line_number":515,"context_line":"        mock_dir_exists.side_effect \u003d exception.ConsoleError(message\u003d\u0027fail\u0027)"},{"line_number":516,"context_line":"        mock_popen.return_value.pid \u003d 23456"},{"line_number":517,"context_line":""},{"line_number":518,"context_line":"        self.assertRaises(exception.ConsoleError,"},{"line_number":519,"context_line":"                          console_utils.start_socat_console,"}],"source_content_type":"text/x-python","patch_set":6,"id":"3aaa91ec_1eeaebac","line":516,"updated":"2016-07-01 18:48:31.000000000","message":"I don\u0027t think this is needed.","commit_id":"e24ded82ca44662102a77b95c7bb528c278b7eee"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"92144c1ae6e37b3b2f8846be0bf9769d84a72c4b","unresolved":false,"context_lines":[{"line_number":513,"context_line":"                                               mock_dir_exists,"},{"line_number":514,"context_line":"                                               mock_popen):"},{"line_number":515,"context_line":"        mock_dir_exists.side_effect \u003d exception.ConsoleError(message\u003d\u0027fail\u0027)"},{"line_number":516,"context_line":"        mock_popen.return_value.pid \u003d 23456"},{"line_number":517,"context_line":""},{"line_number":518,"context_line":"        self.assertRaises(exception.ConsoleError,"},{"line_number":519,"context_line":"                          console_utils.start_socat_console,"}],"source_content_type":"text/x-python","patch_set":6,"id":"1aa78d24_3c17e652","line":516,"in_reply_to":"3aaa91ec_1eeaebac","updated":"2016-07-04 03:45:08.000000000","message":"Done","commit_id":"e24ded82ca44662102a77b95c7bb528c278b7eee"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"5afc03b857df28d56e44d6d5acc0e30d55fce843","unresolved":false,"context_lines":[{"line_number":523,"context_line":""},{"line_number":524,"context_line":"        mock_stop.assert_called_once_with(self.info[\u0027uuid\u0027])"},{"line_number":525,"context_line":"        mock_dir_exists.assert_called_once_with()"},{"line_number":526,"context_line":"        self.assertFalse(mock_popen.called)"},{"line_number":527,"context_line":""},{"line_number":528,"context_line":"    @mock.patch.object(console_utils, \u0027_stop_console\u0027, autospec\u003dTrue)"},{"line_number":529,"context_line":"    def test_stop_socat_console(self, mock_stop):"}],"source_content_type":"text/x-python","patch_set":6,"id":"3aaa91ec_bec2b732","line":526,"updated":"2016-07-01 18:48:31.000000000","message":"mock_popen.assert_not_called()\n\nhttps://docs.python.org/3/library/unittest.mock.html#the-mock-class\n\nThis has been backported to the testing library we use.","commit_id":"e24ded82ca44662102a77b95c7bb528c278b7eee"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"92144c1ae6e37b3b2f8846be0bf9769d84a72c4b","unresolved":false,"context_lines":[{"line_number":523,"context_line":""},{"line_number":524,"context_line":"        mock_stop.assert_called_once_with(self.info[\u0027uuid\u0027])"},{"line_number":525,"context_line":"        mock_dir_exists.assert_called_once_with()"},{"line_number":526,"context_line":"        self.assertFalse(mock_popen.called)"},{"line_number":527,"context_line":""},{"line_number":528,"context_line":"    @mock.patch.object(console_utils, \u0027_stop_console\u0027, autospec\u003dTrue)"},{"line_number":529,"context_line":"    def test_stop_socat_console(self, mock_stop):"}],"source_content_type":"text/x-python","patch_set":6,"id":"1aa78d24_1fff7c02","line":526,"in_reply_to":"3aaa91ec_bec2b732","updated":"2016-07-04 03:45:08.000000000","message":"Done","commit_id":"e24ded82ca44662102a77b95c7bb528c278b7eee"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"5afc03b857df28d56e44d6d5acc0e30d55fce843","unresolved":false,"context_lines":[{"line_number":530,"context_line":"        console_utils.stop_socat_console(self.info[\u0027uuid\u0027])"},{"line_number":531,"context_line":"        mock_stop.assert_called_once_with(self.info[\u0027uuid\u0027])"},{"line_number":532,"context_line":""},{"line_number":533,"context_line":"    @mock.patch.object(console_utils, \u0027_stop_console\u0027, autospec\u003dTrue)"},{"line_number":534,"context_line":"    def test_stop_socat_console_fail_nopid(self, mock_stop):"},{"line_number":535,"context_line":"        mock_stop.side_effect \u003d exception.NoConsolePid(\u0027/tmp/blah\u0027)"},{"line_number":536,"context_line":"        console_utils.stop_socat_console(self.info[\u0027uuid\u0027])"}],"source_content_type":"text/x-python","patch_set":6,"id":"3aaa91ec_3891be9b","line":533,"updated":"2016-07-01 18:48:31.000000000","message":"Please mock the log.warning call and assert that it is called","commit_id":"e24ded82ca44662102a77b95c7bb528c278b7eee"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"92144c1ae6e37b3b2f8846be0bf9769d84a72c4b","unresolved":false,"context_lines":[{"line_number":530,"context_line":"        console_utils.stop_socat_console(self.info[\u0027uuid\u0027])"},{"line_number":531,"context_line":"        mock_stop.assert_called_once_with(self.info[\u0027uuid\u0027])"},{"line_number":532,"context_line":""},{"line_number":533,"context_line":"    @mock.patch.object(console_utils, \u0027_stop_console\u0027, autospec\u003dTrue)"},{"line_number":534,"context_line":"    def test_stop_socat_console_fail_nopid(self, mock_stop):"},{"line_number":535,"context_line":"        mock_stop.side_effect \u003d exception.NoConsolePid(\u0027/tmp/blah\u0027)"},{"line_number":536,"context_line":"        console_utils.stop_socat_console(self.info[\u0027uuid\u0027])"}],"source_content_type":"text/x-python","patch_set":6,"id":"1aa78d24_bf8d887d","line":533,"in_reply_to":"3aaa91ec_3891be9b","updated":"2016-07-04 03:45:08.000000000","message":"Done","commit_id":"e24ded82ca44662102a77b95c7bb528c278b7eee"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"80c1ed8188a200996f3b54e9c733a5c6c6acca59","unresolved":false,"context_lines":[{"line_number":528,"context_line":"        console_utils.stop_socat_console(self.info[\u0027uuid\u0027])"},{"line_number":529,"context_line":"        mock_stop.assert_called_once_with(self.info[\u0027uuid\u0027])"},{"line_number":530,"context_line":""},{"line_number":531,"context_line":"    @mock.patch.object(logging.Logger, \u0027warning\u0027, autospec\u003dTrue)"},{"line_number":532,"context_line":"    @mock.patch.object(console_utils, \u0027_stop_console\u0027, autospec\u003dTrue)"},{"line_number":533,"context_line":"    def test_stop_socat_console_fail_nopid(self, mock_stop, mock_warning):"},{"line_number":534,"context_line":"        mock_stop.side_effect \u003d exception.NoConsolePid(\u0027/tmp/blah\u0027)"}],"source_content_type":"text/x-python","patch_set":7,"id":"1aa78d24_505a9384","line":531,"updated":"2016-07-04 06:15:30.000000000","message":"@mock.patch.object(console_utils, \u0027LOG\u0027, autospec\u003dTrue)","commit_id":"5dac4786a9ca395c5fb159d8901bcfb35fb8aa90"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"6ab7151c7f4574f03af596d4fd090aadac4fcbe4","unresolved":false,"context_lines":[{"line_number":528,"context_line":"        console_utils.stop_socat_console(self.info[\u0027uuid\u0027])"},{"line_number":529,"context_line":"        mock_stop.assert_called_once_with(self.info[\u0027uuid\u0027])"},{"line_number":530,"context_line":""},{"line_number":531,"context_line":"    @mock.patch.object(logging.Logger, \u0027warning\u0027, autospec\u003dTrue)"},{"line_number":532,"context_line":"    @mock.patch.object(console_utils, \u0027_stop_console\u0027, autospec\u003dTrue)"},{"line_number":533,"context_line":"    def test_stop_socat_console_fail_nopid(self, mock_stop, mock_warning):"},{"line_number":534,"context_line":"        mock_stop.side_effect \u003d exception.NoConsolePid(\u0027/tmp/blah\u0027)"}],"source_content_type":"text/x-python","patch_set":7,"id":"1aa78d24_0be9fe1a","line":531,"in_reply_to":"1aa78d24_505a9384","updated":"2016-07-04 06:33:10.000000000","message":"It seems mocking \u0027logging.Logger.warning\u0027 failed in py34. Updated to mock console_utils.LOG.warning. Thanks.","commit_id":"5dac4786a9ca395c5fb159d8901bcfb35fb8aa90"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"80c1ed8188a200996f3b54e9c733a5c6c6acca59","unresolved":false,"context_lines":[{"line_number":530,"context_line":""},{"line_number":531,"context_line":"    @mock.patch.object(logging.Logger, \u0027warning\u0027, autospec\u003dTrue)"},{"line_number":532,"context_line":"    @mock.patch.object(console_utils, \u0027_stop_console\u0027, autospec\u003dTrue)"},{"line_number":533,"context_line":"    def test_stop_socat_console_fail_nopid(self, mock_stop, mock_warning):"},{"line_number":534,"context_line":"        mock_stop.side_effect \u003d exception.NoConsolePid(\u0027/tmp/blah\u0027)"},{"line_number":535,"context_line":"        console_utils.stop_socat_console(self.info[\u0027uuid\u0027])"},{"line_number":536,"context_line":"        mock_stop.assert_called_once_with(self.info[\u0027uuid\u0027])"}],"source_content_type":"text/x-python","patch_set":7,"id":"1aa78d24_f0cbbf1c","line":533,"updated":"2016-07-04 06:15:30.000000000","message":"s/mock_warning/mock_log/","commit_id":"5dac4786a9ca395c5fb159d8901bcfb35fb8aa90"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"6ab7151c7f4574f03af596d4fd090aadac4fcbe4","unresolved":false,"context_lines":[{"line_number":530,"context_line":""},{"line_number":531,"context_line":"    @mock.patch.object(logging.Logger, \u0027warning\u0027, autospec\u003dTrue)"},{"line_number":532,"context_line":"    @mock.patch.object(console_utils, \u0027_stop_console\u0027, autospec\u003dTrue)"},{"line_number":533,"context_line":"    def test_stop_socat_console_fail_nopid(self, mock_stop, mock_warning):"},{"line_number":534,"context_line":"        mock_stop.side_effect \u003d exception.NoConsolePid(\u0027/tmp/blah\u0027)"},{"line_number":535,"context_line":"        console_utils.stop_socat_console(self.info[\u0027uuid\u0027])"},{"line_number":536,"context_line":"        mock_stop.assert_called_once_with(self.info[\u0027uuid\u0027])"}],"source_content_type":"text/x-python","patch_set":7,"id":"1aa78d24_ebed9226","line":533,"in_reply_to":"1aa78d24_f0cbbf1c","updated":"2016-07-04 06:33:10.000000000","message":"Done","commit_id":"5dac4786a9ca395c5fb159d8901bcfb35fb8aa90"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"80c1ed8188a200996f3b54e9c733a5c6c6acca59","unresolved":false,"context_lines":[{"line_number":535,"context_line":"        console_utils.stop_socat_console(self.info[\u0027uuid\u0027])"},{"line_number":536,"context_line":"        mock_stop.assert_called_once_with(self.info[\u0027uuid\u0027])"},{"line_number":537,"context_line":"        # log.warning is called when _stop_console() raises NoConsolePid"},{"line_number":538,"context_line":"        self.assertTrue(mock_warning.called)"}],"source_content_type":"text/x-python","patch_set":7,"id":"1aa78d24_70d86ff0","line":538,"updated":"2016-07-04 06:15:30.000000000","message":"self.assertTrue(mock_log.warning.called)\n\nOr something like that :)","commit_id":"5dac4786a9ca395c5fb159d8901bcfb35fb8aa90"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"6ab7151c7f4574f03af596d4fd090aadac4fcbe4","unresolved":false,"context_lines":[{"line_number":535,"context_line":"        console_utils.stop_socat_console(self.info[\u0027uuid\u0027])"},{"line_number":536,"context_line":"        mock_stop.assert_called_once_with(self.info[\u0027uuid\u0027])"},{"line_number":537,"context_line":"        # log.warning is called when _stop_console() raises NoConsolePid"},{"line_number":538,"context_line":"        self.assertTrue(mock_warning.called)"}],"source_content_type":"text/x-python","patch_set":7,"id":"1aa78d24_4bf3060b","line":538,"in_reply_to":"1aa78d24_70d86ff0","updated":"2016-07-04 06:33:10.000000000","message":"Done","commit_id":"5dac4786a9ca395c5fb159d8901bcfb35fb8aa90"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"fc0c1a480ef4e4a3a73d3c271a570c8782add773","unresolved":false,"context_lines":[{"line_number":534,"context_line":"        console_utils.stop_socat_console(self.info[\u0027uuid\u0027])"},{"line_number":535,"context_line":"        mock_stop.assert_called_once_with(self.info[\u0027uuid\u0027])"},{"line_number":536,"context_line":"        # LOG.warning() is called when _stop_console() raises NoConsolePid"},{"line_number":537,"context_line":"        self.assertTrue(mock_log_warning.called)"}],"source_content_type":"text/x-python","patch_set":8,"id":"1aa78d24_16f90c81","line":537,"updated":"2016-07-04 14:32:46.000000000","message":"nit: mock_log_warning.warning.called","commit_id":"e53be04bccce194413346688b817fa76d843213c"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"bae4fdc90b8cb9b41b7503f2264f4842a8d81e65","unresolved":false,"context_lines":[{"line_number":534,"context_line":"        console_utils.stop_socat_console(self.info[\u0027uuid\u0027])"},{"line_number":535,"context_line":"        mock_stop.assert_called_once_with(self.info[\u0027uuid\u0027])"},{"line_number":536,"context_line":"        # LOG.warning() is called when _stop_console() raises NoConsolePid"},{"line_number":537,"context_line":"        self.assertTrue(mock_log_warning.called)"}],"source_content_type":"text/x-python","patch_set":8,"id":"1aa78d24_8f96704a","line":537,"in_reply_to":"1aa78d24_16f90c81","updated":"2016-07-05 02:45:22.000000000","message":"I rechecked this, because I did mock for console_utils.LOG.warning, then mock_log_warning.warning.called is not correct.","commit_id":"e53be04bccce194413346688b817fa76d843213c"}],"releasenotes/notes/add-socat-console-utils-75a61e29c6eb1045.yaml":[{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"9474a7dad1ea160f954e6e564a2b5483bf437d49","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - Adds socat serial console support to console utils."}],"source_content_type":"text/x-yaml","patch_set":1,"id":"7aa08908_ac1fffb5","line":3,"updated":"2016-06-16 09:31:49.000000000","message":"This patch only contains the base code and the patch on top of this makes it usable for the users, correct? If so, this release note should be added to the next patch and not this one.","commit_id":"a3b22ea63c8251cf11c6d065cc5514c08ae5141a"}]}
