)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":13362,"name":"Tan Lin","email":"lin.tan@intel.com","username":"zero"},"change_message_id":"279a06166ce93cbd29a7cfd9b2dc6957d4ff38af","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Some nodes\u0027 console_enabled may be True but the corresponding"},{"line_number":10,"context_line":"shellinabox services stopped while starting conductors, so try"},{"line_number":11,"context_line":"to start dead consoles on conductor startup."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: Ida5fda35340d62e08c779655183ef82211cd8703"},{"line_number":14,"context_line":"Closes-Bug: #1525790"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"3a7e1126_bdf22005","line":11,"range":{"start_line":11,"start_character":26,"end_line":11,"end_character":35},"updated":"2015-12-17 03:36:43.000000000","message":"Better to say things \u0027start dead consoles of nodes belong the conductor.\u0027","commit_id":"14e78fd568567446d0e684b3261f75c6a77c6806"}],"ironic/conductor/base_manager.py":[{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"48634dfd7fd2197eb39141576c9f2d21e5c75bbe","unresolved":false,"context_lines":[{"line_number":347,"context_line":"                        # back to False and set node\u0027s last error."},{"line_number":348,"context_line":"                        task.node.last_error \u003d msg"},{"line_number":349,"context_line":"                        task.node.console_enabled \u003d False"},{"line_number":350,"context_line":"            except exception.NoFreeConductorWorker:"},{"line_number":351,"context_line":"                break"},{"line_number":352,"context_line":"            except (exception.NodeLocked, exception.NodeNotFound):"},{"line_number":353,"context_line":"                continue"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a740942_1ec847a7","line":350,"updated":"2015-12-14 11:10:49.000000000","message":"No new green thread spawning, this exception will not be raised.","commit_id":"c22ccc458722b524a46b6d909ae72648b6e4686f"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"48634dfd7fd2197eb39141576c9f2d21e5c75bbe","unresolved":false,"context_lines":[{"line_number":352,"context_line":"            except (exception.NodeLocked, exception.NodeNotFound):"},{"line_number":353,"context_line":"                continue"},{"line_number":354,"context_line":"            workers_count +\u003d 1"},{"line_number":355,"context_line":"            if workers_count \u003e\u003d CONF.conductor.periodic_max_workers:"},{"line_number":356,"context_line":"                break"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a740942_de4ddf3e","line":355,"updated":"2015-12-14 11:10:49.000000000","message":"This is not a periodic task, some nodes can be missing.","commit_id":"c22ccc458722b524a46b6d909ae72648b6e4686f"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"41299556ecbdf150f0e7685a22bd0f8cf85df67d","unresolved":false,"context_lines":[{"line_number":325,"context_line":""},{"line_number":326,"context_line":"        :param: context: request context"},{"line_number":327,"context_line":"        \"\"\""},{"line_number":328,"context_line":"        filters \u003d {\u0027console_enabled\u0027: True}"},{"line_number":329,"context_line":""},{"line_number":330,"context_line":"        node_iter \u003d self.iter_nodes(filters\u003dfilters)"},{"line_number":331,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"7a740942_04b543eb","line":328,"updated":"2015-12-14 16:33:54.000000000","message":"I don\u0027t see such filter here https://github.com/openstack/ironic/blob/master/ironic/db/sqlalchemy/api.py#L152-L190 . Will it work?","commit_id":"2a5f2975816d6c239de32b6ef9430ce2249c174a"},{"author":{"_account_id":6610,"name":"Zhenguo Niu","email":"Niu.ZGlinux@gmail.com","username":"niu-zglinux"},"change_message_id":"f698cbbafb4e91b21e92c0a0e96f0fcb1106830e","unresolved":false,"context_lines":[{"line_number":325,"context_line":""},{"line_number":326,"context_line":"        :param: context: request context"},{"line_number":327,"context_line":"        \"\"\""},{"line_number":328,"context_line":"        filters \u003d {\u0027console_enabled\u0027: True}"},{"line_number":329,"context_line":""},{"line_number":330,"context_line":"        node_iter \u003d self.iter_nodes(filters\u003dfilters)"},{"line_number":331,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"5a710552_751daabc","line":328,"in_reply_to":"7a740942_04b543eb","updated":"2015-12-15 01:57:11.000000000","message":"thanks, will add this filter there.","commit_id":"2a5f2975816d6c239de32b6ef9430ce2249c174a"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"41299556ecbdf150f0e7685a22bd0f8cf85df67d","unresolved":false,"context_lines":[{"line_number":335,"context_line":"            with task_manager.acquire(context, node_uuid,"},{"line_number":336,"context_line":"                                      purpose\u003d\u0027start console\u0027) as task:"},{"line_number":337,"context_line":"                try:"},{"line_number":338,"context_line":"                    task.driver.console.start_console(task)"},{"line_number":339,"context_line":"                except Exception as err:"},{"line_number":340,"context_line":"                    msg \u003d (_(\u0027Failed to start console of node %(node)s \u0027"},{"line_number":341,"context_line":"                             \u0027while starting the conductor: %(err)s.\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a740942_c43e5bb7","line":338,"updated":"2015-12-14 16:33:54.000000000","message":"What happens if a driver does not have a console, but console_enabled set to True for some reason?","commit_id":"2a5f2975816d6c239de32b6ef9430ce2249c174a"},{"author":{"_account_id":6610,"name":"Zhenguo Niu","email":"Niu.ZGlinux@gmail.com","username":"niu-zglinux"},"change_message_id":"f698cbbafb4e91b21e92c0a0e96f0fcb1106830e","unresolved":false,"context_lines":[{"line_number":335,"context_line":"            with task_manager.acquire(context, node_uuid,"},{"line_number":336,"context_line":"                                      purpose\u003d\u0027start console\u0027) as task:"},{"line_number":337,"context_line":"                try:"},{"line_number":338,"context_line":"                    task.driver.console.start_console(task)"},{"line_number":339,"context_line":"                except Exception as err:"},{"line_number":340,"context_line":"                    msg \u003d (_(\u0027Failed to start console of node %(node)s \u0027"},{"line_number":341,"context_line":"                             \u0027while starting the conductor: %(err)s.\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a710552_158f8624","line":338,"in_reply_to":"7a740942_c43e5bb7","updated":"2015-12-15 01:57:11.000000000","message":"console_enabled can not be set to True if a driver does not support console, we will validate that when setting console mode, so the only way is manually do that in DB by admin. in this situation we will set console_enabled back to Fase.","commit_id":"2a5f2975816d6c239de32b6ef9430ce2249c174a"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"41299556ecbdf150f0e7685a22bd0f8cf85df67d","unresolved":false,"context_lines":[{"line_number":344,"context_line":"                    # If starting console failed, set node console_enabled"},{"line_number":345,"context_line":"                    # back to False and set node\u0027s last error."},{"line_number":346,"context_line":"                    task.node.last_error \u003d msg"},{"line_number":347,"context_line":"                    task.node.console_enabled \u003d False"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a740942_01e8d5b1","line":347,"updated":"2015-12-14 16:33:54.000000000","message":"There should be node.save() call, in case of _fail_if_in_state it was done during process_event.","commit_id":"2a5f2975816d6c239de32b6ef9430ce2249c174a"},{"author":{"_account_id":6610,"name":"Zhenguo Niu","email":"Niu.ZGlinux@gmail.com","username":"niu-zglinux"},"change_message_id":"f698cbbafb4e91b21e92c0a0e96f0fcb1106830e","unresolved":false,"context_lines":[{"line_number":344,"context_line":"                    # If starting console failed, set node console_enabled"},{"line_number":345,"context_line":"                    # back to False and set node\u0027s last error."},{"line_number":346,"context_line":"                    task.node.last_error \u003d msg"},{"line_number":347,"context_line":"                    task.node.console_enabled \u003d False"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a710552_f502fa6e","line":347,"in_reply_to":"7a740942_01e8d5b1","updated":"2015-12-15 01:57:11.000000000","message":"thanks, will address in the comming patch set.","commit_id":"2a5f2975816d6c239de32b6ef9430ce2249c174a"},{"author":{"_account_id":13362,"name":"Tan Lin","email":"lin.tan@intel.com","username":"zero"},"change_message_id":"16870d63186f1bbb1e63b1bd36f0455e74411f4b","unresolved":false,"context_lines":[{"line_number":325,"context_line":""},{"line_number":326,"context_line":"        :param: context: request context"},{"line_number":327,"context_line":"        \"\"\""},{"line_number":328,"context_line":"        filters \u003d {\u0027console_enabled\u0027: True}"},{"line_number":329,"context_line":""},{"line_number":330,"context_line":"        node_iter \u003d self.iter_nodes(filters\u003dfilters)"},{"line_number":331,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"5a710552_08a5d6a0","line":328,"updated":"2015-12-16 09:53:47.000000000","message":"this seems only works  for the case of a single conductor. What about the case of multiple conductors. Nodes are reserved by conductor A and have console services running on conductor A, but If you restart conductor B, then what will happen?\n\nI didn\u0027t test this yet, but add {\u0027reserved\u0027: False} maybe solve this issue. Because once you restart the conductor, will clear its node reservation.","commit_id":"14e78fd568567446d0e684b3261f75c6a77c6806"},{"author":{"_account_id":13362,"name":"Tan Lin","email":"lin.tan@intel.com","username":"zero"},"change_message_id":"279a06166ce93cbd29a7cfd9b2dc6957d4ff38af","unresolved":false,"context_lines":[{"line_number":325,"context_line":""},{"line_number":326,"context_line":"        :param: context: request context"},{"line_number":327,"context_line":"        \"\"\""},{"line_number":328,"context_line":"        filters \u003d {\u0027console_enabled\u0027: True}"},{"line_number":329,"context_line":""},{"line_number":330,"context_line":"        node_iter \u003d self.iter_nodes(filters\u003dfilters)"},{"line_number":331,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3a7e1126_fdfe6804","line":328,"in_reply_to":"3a7e1126_8c3cdc30","updated":"2015-12-17 03:36:43.000000000","message":"Oh, that\u0027s true. I see the _mapped_to_this_conductor method. But it also says \"Any operation that depends on exclusive control of a node should take out a lock\". Better to add shared\u003dFalse for the task below to start_console()","commit_id":"14e78fd568567446d0e684b3261f75c6a77c6806"},{"author":{"_account_id":6610,"name":"Zhenguo Niu","email":"Niu.ZGlinux@gmail.com","username":"niu-zglinux"},"change_message_id":"a478d228a11068678fd02cccba9273b3c335bb62","unresolved":false,"context_lines":[{"line_number":325,"context_line":""},{"line_number":326,"context_line":"        :param: context: request context"},{"line_number":327,"context_line":"        \"\"\""},{"line_number":328,"context_line":"        filters \u003d {\u0027console_enabled\u0027: True}"},{"line_number":329,"context_line":""},{"line_number":330,"context_line":"        node_iter \u003d self.iter_nodes(filters\u003dfilters)"},{"line_number":331,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3a7e1126_8c3cdc30","line":328,"in_reply_to":"5a710552_08a5d6a0","updated":"2015-12-17 02:09:23.000000000","message":"hi Tan, for multiple conductors case, if you restart conductor B, iter_nodes will only fetch console_enabled nodes mapped to it.","commit_id":"14e78fd568567446d0e684b3261f75c6a77c6806"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"change_message_id":"4a2a9090b8596c2e6995f776cd9fa4f8914de6b8","unresolved":false,"context_lines":[{"line_number":337,"context_line":"                try:"},{"line_number":338,"context_line":"                    task.driver.console.start_console(task)"},{"line_number":339,"context_line":"                except Exception as err:"},{"line_number":340,"context_line":"                    msg \u003d (_(\u0027Failed to start console of node %(node)s \u0027"},{"line_number":341,"context_line":"                             \u0027while starting the conductor: %(err)s.\u0027)"},{"line_number":342,"context_line":"                           % {\u0027node\u0027: task.node.uuid, \u0027err\u0027: err})"},{"line_number":343,"context_line":"                    LOG.error(msg)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a7b0d38_47f51a81","line":340,"range":{"start_line":340,"start_character":28,"end_line":340,"end_character":30},"updated":"2015-12-25 00:36:12.000000000","message":"_LE","commit_id":"0cbb143ca6e546012dc0fe51c3c6292523d2ef2c"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"change_message_id":"471d18cb49e3176a2770a1a9ffdd0f6e841623bc","unresolved":false,"context_lines":[{"line_number":337,"context_line":"                try:"},{"line_number":338,"context_line":"                    task.driver.console.start_console(task)"},{"line_number":339,"context_line":"                except Exception as err:"},{"line_number":340,"context_line":"                    msg \u003d (_(\u0027Failed to start console of node %(node)s \u0027"},{"line_number":341,"context_line":"                             \u0027while starting the conductor: %(err)s.\u0027)"},{"line_number":342,"context_line":"                           % {\u0027node\u0027: task.node.uuid, \u0027err\u0027: err})"},{"line_number":343,"context_line":"                    LOG.error(msg)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a7b0d38_278b2ec5","line":340,"range":{"start_line":340,"start_character":28,"end_line":340,"end_character":30},"in_reply_to":"1a7b0d38_47f51a81","updated":"2015-12-25 00:59:46.000000000","message":"here _ should be fine, ignore previous comments.","commit_id":"0cbb143ca6e546012dc0fe51c3c6292523d2ef2c"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"change_message_id":"4a2a9090b8596c2e6995f776cd9fa4f8914de6b8","unresolved":false,"context_lines":[{"line_number":338,"context_line":"                    task.driver.console.start_console(task)"},{"line_number":339,"context_line":"                except Exception as err:"},{"line_number":340,"context_line":"                    msg \u003d (_(\u0027Failed to start console of node %(node)s \u0027"},{"line_number":341,"context_line":"                             \u0027while starting the conductor: %(err)s.\u0027)"},{"line_number":342,"context_line":"                           % {\u0027node\u0027: task.node.uuid, \u0027err\u0027: err})"},{"line_number":343,"context_line":"                    LOG.error(msg)"},{"line_number":344,"context_line":"                    # If starting console failed, set node console_enabled"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a7b0d38_07ef12b1","line":341,"range":{"start_line":341,"start_character":67,"end_line":341,"end_character":70},"updated":"2015-12-25 00:36:12.000000000","message":"How about below message?\n\n\u0027while starting the conductor, error: %(err)s.\u0027)","commit_id":"0cbb143ca6e546012dc0fe51c3c6292523d2ef2c"},{"author":{"_account_id":6610,"name":"Zhenguo Niu","email":"Niu.ZGlinux@gmail.com","username":"niu-zglinux"},"change_message_id":"226eadac25de5d321d9dc4c389ce269732b45ae2","unresolved":false,"context_lines":[{"line_number":338,"context_line":"                    task.driver.console.start_console(task)"},{"line_number":339,"context_line":"                except Exception as err:"},{"line_number":340,"context_line":"                    msg \u003d (_(\u0027Failed to start console of node %(node)s \u0027"},{"line_number":341,"context_line":"                             \u0027while starting the conductor: %(err)s.\u0027)"},{"line_number":342,"context_line":"                           % {\u0027node\u0027: task.node.uuid, \u0027err\u0027: err})"},{"line_number":343,"context_line":"                    LOG.error(msg)"},{"line_number":344,"context_line":"                    # If starting console failed, set node console_enabled"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a7b0d38_8ab8e7e6","line":341,"range":{"start_line":341,"start_character":67,"end_line":341,"end_character":70},"in_reply_to":"1a7b0d38_07ef12b1","updated":"2015-12-25 02:44:12.000000000","message":"yes, will update in the coming patch set, thanks.","commit_id":"0cbb143ca6e546012dc0fe51c3c6292523d2ef2c"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"change_message_id":"471d18cb49e3176a2770a1a9ffdd0f6e841623bc","unresolved":false,"context_lines":[{"line_number":340,"context_line":"                    msg \u003d (_(\u0027Failed to start console of node %(node)s \u0027"},{"line_number":341,"context_line":"                             \u0027while starting the conductor: %(err)s.\u0027)"},{"line_number":342,"context_line":"                           % {\u0027node\u0027: task.node.uuid, \u0027err\u0027: err})"},{"line_number":343,"context_line":"                    LOG.error(msg)"},{"line_number":344,"context_line":"                    # If starting console failed, set node console_enabled"},{"line_number":345,"context_line":"                    # back to False and set node\u0027s last error."},{"line_number":346,"context_line":"                    task.node.last_error \u003d msg"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a7b0d38_e7e686b3","line":343,"range":{"start_line":343,"start_character":33,"end_line":343,"end_character":34},"updated":"2015-12-25 00:59:46.000000000","message":"how about LOG.exception(_LE(msg))","commit_id":"0cbb143ca6e546012dc0fe51c3c6292523d2ef2c"},{"author":{"_account_id":6610,"name":"Zhenguo Niu","email":"Niu.ZGlinux@gmail.com","username":"niu-zglinux"},"change_message_id":"226eadac25de5d321d9dc4c389ce269732b45ae2","unresolved":false,"context_lines":[{"line_number":340,"context_line":"                    msg \u003d (_(\u0027Failed to start console of node %(node)s \u0027"},{"line_number":341,"context_line":"                             \u0027while starting the conductor: %(err)s.\u0027)"},{"line_number":342,"context_line":"                           % {\u0027node\u0027: task.node.uuid, \u0027err\u0027: err})"},{"line_number":343,"context_line":"                    LOG.error(msg)"},{"line_number":344,"context_line":"                    # If starting console failed, set node console_enabled"},{"line_number":345,"context_line":"                    # back to False and set node\u0027s last error."},{"line_number":346,"context_line":"                    task.node.last_error \u003d msg"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a7b0d38_aa9603ee","line":343,"range":{"start_line":343,"start_character":33,"end_line":343,"end_character":34},"in_reply_to":"1a7b0d38_e7e686b3","updated":"2015-12-25 02:44:12.000000000","message":"thanks for the suggestion Haomeng, the difference is that LOG.exception will dump a stack trace here, but as starting console failed has no side affect on conductor start, I think logging an error msg is enough here, make sense?","commit_id":"0cbb143ca6e546012dc0fe51c3c6292523d2ef2c"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"0953d888049b89509ef9ca15872c5ac811e581fc","unresolved":false,"context_lines":[{"line_number":36,"context_line":"from ironic.common import states"},{"line_number":37,"context_line":"from ironic.conductor import task_manager"},{"line_number":38,"context_line":"from ironic.db import api as dbapi"},{"line_number":39,"context_line":"from ironic.drivers.modules import console_utils"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"conductor_opts \u003d ["},{"line_number":42,"context_line":"    cfg.IntOpt(\u0027workers_pool_size\u0027,"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa69d971_a106691e","line":39,"updated":"2015-12-31 00:23:17.000000000","message":"I\u0027m immediately concerned that this is creating a dependency on driver/modules from the conductor.\n\nOur Driver API contract requires the conductor to only utilize methods defined in drivers.base","commit_id":"7e4fafa40ffca6f4c55117d803db2b2186400de5"},{"author":{"_account_id":13362,"name":"Tan Lin","email":"lin.tan@intel.com","username":"zero"},"change_message_id":"da562e23b4fcb47fb24f25fe76e2ab234de371fc","unresolved":false,"context_lines":[{"line_number":37,"context_line":"from ironic.conductor import task_manager"},{"line_number":38,"context_line":"from ironic.db import api as dbapi"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"conductor_opts \u003d ["},{"line_number":42,"context_line":"    cfg.IntOpt(\u0027workers_pool_size\u0027,"},{"line_number":43,"context_line":"               default\u003d100,"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa69d971_31f379a0","side":"PARENT","line":40,"updated":"2016-01-04 09:04:20.000000000","message":"nit: why do you delete this line?","commit_id":"fa20ceb739f0f6b0016872db7ec9aea3c19cb403"},{"author":{"_account_id":13362,"name":"Tan Lin","email":"lin.tan@intel.com","username":"zero"},"change_message_id":"da562e23b4fcb47fb24f25fe76e2ab234de371fc","unresolved":false,"context_lines":[{"line_number":332,"context_line":"            with task_manager.acquire(context, node_uuid, shared\u003dFalse,"},{"line_number":333,"context_line":"                                      purpose\u003d\u0027start console\u0027) as task:"},{"line_number":334,"context_line":"                try:"},{"line_number":335,"context_line":"                    task.driver.console.start_console(task)"},{"line_number":336,"context_line":"                except Exception as err:"},{"line_number":337,"context_line":"                    msg \u003d (_(\u0027Failed to start console of node %(node)s \u0027"},{"line_number":338,"context_line":"                             \u0027while starting the conductor, error: %(err)s.\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa69d971_d1b9bd7a","line":335,"updated":"2016-01-04 09:04:20.000000000","message":"what happened if you try to start console of a node while you already have one? An exception or nothing? Because you will set console_enable to False with exception.","commit_id":"4d50e7fee9eebcfc7a53fe931409e1668e195e67"},{"author":{"_account_id":6610,"name":"Zhenguo Niu","email":"Niu.ZGlinux@gmail.com","username":"niu-zglinux"},"change_message_id":"03b9ddccf160f7c6ce466bb17e0c3e0665b20a68","unresolved":false,"context_lines":[{"line_number":332,"context_line":"            with task_manager.acquire(context, node_uuid, shared\u003dFalse,"},{"line_number":333,"context_line":"                                      purpose\u003d\u0027start console\u0027) as task:"},{"line_number":334,"context_line":"                try:"},{"line_number":335,"context_line":"                    task.driver.console.start_console(task)"},{"line_number":336,"context_line":"                except Exception as err:"},{"line_number":337,"context_line":"                    msg \u003d (_(\u0027Failed to start console of node %(node)s \u0027"},{"line_number":338,"context_line":"                             \u0027while starting the conductor, error: %(err)s.\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa69d971_0cedfa24","line":335,"in_reply_to":"fa69d971_d1b9bd7a","updated":"2016-01-04 09:09:48.000000000","message":"starting console is actually a restarting process, so if you already had one, it will stop it first and then start it again.","commit_id":"4d50e7fee9eebcfc7a53fe931409e1668e195e67"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"5145005629a31af9dc64732c320c5416ef57b96e","unresolved":false,"context_lines":[{"line_number":331,"context_line":""},{"line_number":332,"context_line":"        for node_uuid, driver in node_iter:"},{"line_number":333,"context_line":"            with task_manager.acquire(context, node_uuid, shared\u003dFalse,"},{"line_number":334,"context_line":"                                      purpose\u003d\u0027start console\u0027) as task:"},{"line_number":335,"context_line":"                try:"},{"line_number":336,"context_line":"                    task.driver.console.start_console(task)"},{"line_number":337,"context_line":"                except Exception as err:"}],"source_content_type":"text/x-python","patch_set":9,"id":"7a5de9d1_3b8c0b7f","line":334,"updated":"2016-02-02 10:59:41.000000000","message":"We should handle the exceptions raised by acquire() here and continue with the loop. The errors I can think of (but please double check for more):\n\n* NodeLocked: If another conductor is managing this node at the moment you try to get the exclusive lock\n\n* NodeNotFound: If a node was deleted after the list of nodes have been returned and the loop iterating between the elements of that list.","commit_id":"e50751692e533a9f9b4667698f716998e16815eb"},{"author":{"_account_id":6610,"name":"Zhenguo Niu","email":"Niu.ZGlinux@gmail.com","username":"niu-zglinux"},"change_message_id":"a54c205c202accef2c651dbe862c133b1f1256ae","unresolved":false,"context_lines":[{"line_number":331,"context_line":""},{"line_number":332,"context_line":"        for node_uuid, driver in node_iter:"},{"line_number":333,"context_line":"            with task_manager.acquire(context, node_uuid, shared\u003dFalse,"},{"line_number":334,"context_line":"                                      purpose\u003d\u0027start console\u0027) as task:"},{"line_number":335,"context_line":"                try:"},{"line_number":336,"context_line":"                    task.driver.console.start_console(task)"},{"line_number":337,"context_line":"                except Exception as err:"}],"source_content_type":"text/x-python","patch_set":9,"id":"7a5de9d1_9bee4eb3","line":334,"in_reply_to":"7a5de9d1_3b8c0b7f","updated":"2016-02-02 15:40:46.000000000","message":"Thanks Lucas, will address in the coming patch set.","commit_id":"e50751692e533a9f9b4667698f716998e16815eb"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"a6525049829ea22465fc352f2340b3bfd9957e8c","unresolved":false,"context_lines":[{"line_number":151,"context_line":"                               last_error\u003dlast_error)"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"        # Start console if it set enabled."},{"line_number":154,"context_line":"        self._start_console(ironic_context.get_admin_context())"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"        # Spawn a dedicated greenthread for the keepalive"},{"line_number":157,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":10,"id":"5a5ae5dd_923ce694","line":154,"updated":"2016-02-03 14:33:15.000000000","message":"If many consoles on nodes should be started conductor\u0027s initialization can be delayed by unpredictable time, because interaction with hardware is needed. This task should be invoked in the separate thread at least.","commit_id":"f66c8d70a51226573677ba4ca939efa63dbc6569"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"94c50a76c4d4a432a44909894e6fc3830ab09a56","unresolved":false,"context_lines":[{"line_number":320,"context_line":"            if workers_count \u003e\u003d CONF.conductor.periodic_max_workers:"},{"line_number":321,"context_line":"                break"},{"line_number":322,"context_line":""},{"line_number":323,"context_line":"    def _start_console(self, context):"},{"line_number":324,"context_line":"        \"\"\"Start console if it set enabled."},{"line_number":325,"context_line":""},{"line_number":326,"context_line":"        :param: context: request context"}],"source_content_type":"text/x-python","patch_set":10,"id":"5a5ae5dd_183815d3","line":323,"updated":"2016-02-03 14:56:39.000000000","message":"nit: _start_console -\u003e _start_consoles","commit_id":"f66c8d70a51226573677ba4ca939efa63dbc6569"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"a6525049829ea22465fc352f2340b3bfd9957e8c","unresolved":false,"context_lines":[{"line_number":333,"context_line":"            try:"},{"line_number":334,"context_line":"                with task_manager.acquire(context, node_uuid, shared\u003dFalse,"},{"line_number":335,"context_line":"                                          purpose\u003d\u0027start console\u0027) as task:"},{"line_number":336,"context_line":"                    try:"},{"line_number":337,"context_line":"                        task.driver.console.start_console(task)"},{"line_number":338,"context_line":"                    except Exception as err:"},{"line_number":339,"context_line":"                        msg \u003d (_(\u0027Failed to start console of node %(node)s \u0027"}],"source_content_type":"text/x-python","patch_set":10,"id":"5a5ae5dd_f27c3a22","line":336,"updated":"2016-02-03 14:33:15.000000000","message":"Info logging about trying to start console on node will be good here.","commit_id":"f66c8d70a51226573677ba4ca939efa63dbc6569"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"a6525049829ea22465fc352f2340b3bfd9957e8c","unresolved":false,"context_lines":[{"line_number":334,"context_line":"                with task_manager.acquire(context, node_uuid, shared\u003dFalse,"},{"line_number":335,"context_line":"                                          purpose\u003d\u0027start console\u0027) as task:"},{"line_number":336,"context_line":"                    try:"},{"line_number":337,"context_line":"                        task.driver.console.start_console(task)"},{"line_number":338,"context_line":"                    except Exception as err:"},{"line_number":339,"context_line":"                        msg \u003d (_(\u0027Failed to start console of node %(node)s \u0027"},{"line_number":340,"context_line":"                                 \u0027while starting the conductor, error: \u0027"}],"source_content_type":"text/x-python","patch_set":10,"id":"5a5ae5dd_b2ad628a","line":337,"updated":"2016-02-03 14:33:15.000000000","message":"Debug logging that console is started here too.","commit_id":"f66c8d70a51226573677ba4ca939efa63dbc6569"},{"author":{"_account_id":13362,"name":"Tan Lin","email":"lin.tan@intel.com","username":"zero"},"change_message_id":"9d0200de30ed36459787aff31d80cc12dfde6be4","unresolved":false,"context_lines":[{"line_number":418,"context_line":"                        task.driver.console.start_console(task)"},{"line_number":419,"context_line":"                        LOG.debug(\u0027Successfully start console of node \u0027"},{"line_number":420,"context_line":"                                  \u0027%(node)s.\u0027 % {\u0027node\u0027: task.node.uuid})"},{"line_number":421,"context_line":"                    except Exception as err:"},{"line_number":422,"context_line":"                        msg \u003d (_(\u0027Failed to start console of node %(node)s \u0027"},{"line_number":423,"context_line":"                                 \u0027while starting the conductor, error: \u0027"},{"line_number":424,"context_line":"                                 \u0027%(err)s.\u0027)"}],"source_content_type":"text/x-python","patch_set":12,"id":"bae84128_a543c86b","line":421,"updated":"2016-02-25 08:00:23.000000000","message":"I didn\u0027t see there is a test to catch the exception","commit_id":"b9b89698bf952842a1a27de6c51c71b37b3d3b20"},{"author":{"_account_id":13362,"name":"Tan Lin","email":"lin.tan@intel.com","username":"zero"},"change_message_id":"9d0200de30ed36459787aff31d80cc12dfde6be4","unresolved":false,"context_lines":[{"line_number":429,"context_line":"                        task.node.last_error \u003d msg"},{"line_number":430,"context_line":"                        task.node.console_enabled \u003d False"},{"line_number":431,"context_line":"                        task.node.save()"},{"line_number":432,"context_line":"            except (exception.NodeLocked, exception.NodeNotFound):"},{"line_number":433,"context_line":"                continue"}],"source_content_type":"text/x-python","patch_set":12,"id":"bae84128_c5736ce6","line":432,"updated":"2016-02-25 08:00:23.000000000","message":"you should also add a test to test the case of mult-nodes and some of them are failed to enable.","commit_id":"b9b89698bf952842a1a27de6c51c71b37b3d3b20"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"change_message_id":"a96d74c2516e1f803f0679f72409c2d67101a771","unresolved":false,"context_lines":[{"line_number":430,"context_line":"                        task.node.console_enabled \u003d False"},{"line_number":431,"context_line":"                        task.node.save()"},{"line_number":432,"context_line":"            except (exception.NodeLocked, exception.NodeNotFound):"},{"line_number":433,"context_line":"                continue"}],"source_content_type":"text/x-python","patch_set":12,"id":"bae84128_f0e62c15","line":433,"range":{"start_line":433,"start_character":15,"end_line":433,"end_character":24},"updated":"2016-02-25 08:14:21.000000000","message":"Should we log some warning message to user why can not acquire the node and mis this node to start console this time?","commit_id":"b9b89698bf952842a1a27de6c51c71b37b3d3b20"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"change_message_id":"3d7d406d0d045d910818b7b1205c76dd1f728cb5","unresolved":false,"context_lines":[{"line_number":430,"context_line":"                        task.node.console_enabled \u003d False"},{"line_number":431,"context_line":"                        task.node.save()"},{"line_number":432,"context_line":"            except (exception.NodeLocked, exception.NodeNotFound):"},{"line_number":433,"context_line":"                continue"}],"source_content_type":"text/x-python","patch_set":12,"id":"bae84128_91808248","line":433,"range":{"start_line":433,"start_character":15,"end_line":433,"end_character":24},"in_reply_to":"bae84128_f0e62c15","updated":"2016-02-25 09:07:29.000000000","message":"And if node is locked at that time with other actions, if we have another round chance to sync the console?","commit_id":"b9b89698bf952842a1a27de6c51c71b37b3d3b20"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"a1f4c60bf4175c10edd21df0fda8d2e8db6fca60","unresolved":false,"context_lines":[{"line_number":40,"context_line":""},{"line_number":41,"context_line":"conductor_opts \u003d ["},{"line_number":42,"context_line":"    cfg.IntOpt(\u0027workers_pool_size\u0027,"},{"line_number":43,"context_line":"               default\u003d100, min\u003d3,"},{"line_number":44,"context_line":"               help\u003d_(\u0027The size of the workers greenthread pool. \u0027"},{"line_number":45,"context_line":"                      \u0027Note that 2 threads will be reserved by the conductor \u0027"},{"line_number":46,"context_line":"                      \u0027itself for handling heart beats and periodic tasks.\u0027)),"}],"source_content_type":"text/x-python","patch_set":13,"id":"5aef4532_721d1ebd","line":43,"updated":"2016-03-07 10:27:07.000000000","message":"min value should be increased because one new thread can be required, min\u003d4","commit_id":"2a454f5845f4628438a4a8ed68c5520ed0d35662"},{"author":{"_account_id":6610,"name":"Zhenguo Niu","email":"Niu.ZGlinux@gmail.com","username":"niu-zglinux"},"change_message_id":"d8967cbcf6f831072b6756e96a269ac040d8aca5","unresolved":false,"context_lines":[{"line_number":40,"context_line":""},{"line_number":41,"context_line":"conductor_opts \u003d ["},{"line_number":42,"context_line":"    cfg.IntOpt(\u0027workers_pool_size\u0027,"},{"line_number":43,"context_line":"               default\u003d100, min\u003d3,"},{"line_number":44,"context_line":"               help\u003d_(\u0027The size of the workers greenthread pool. \u0027"},{"line_number":45,"context_line":"                      \u0027Note that 2 threads will be reserved by the conductor \u0027"},{"line_number":46,"context_line":"                      \u0027itself for handling heart beats and periodic tasks.\u0027)),"}],"source_content_type":"text/x-python","patch_set":13,"id":"5aef4532_d40334b7","line":43,"in_reply_to":"5aef4532_721d1ebd","updated":"2016-03-07 13:53:45.000000000","message":"Done","commit_id":"2a454f5845f4628438a4a8ed68c5520ed0d35662"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"a1f4c60bf4175c10edd21df0fda8d2e8db6fca60","unresolved":false,"context_lines":[{"line_number":42,"context_line":"    cfg.IntOpt(\u0027workers_pool_size\u0027,"},{"line_number":43,"context_line":"               default\u003d100, min\u003d3,"},{"line_number":44,"context_line":"               help\u003d_(\u0027The size of the workers greenthread pool. \u0027"},{"line_number":45,"context_line":"                      \u0027Note that 2 threads will be reserved by the conductor \u0027"},{"line_number":46,"context_line":"                      \u0027itself for handling heart beats and periodic tasks.\u0027)),"},{"line_number":47,"context_line":"    cfg.IntOpt(\u0027heartbeat_interval\u0027,"},{"line_number":48,"context_line":"               default\u003d10,"}],"source_content_type":"text/x-python","patch_set":13,"id":"5aef4532_326a761b","line":45,"updated":"2016-03-07 10:27:07.000000000","message":"ditto +1 thread","commit_id":"2a454f5845f4628438a4a8ed68c5520ed0d35662"},{"author":{"_account_id":6610,"name":"Zhenguo Niu","email":"Niu.ZGlinux@gmail.com","username":"niu-zglinux"},"change_message_id":"d8967cbcf6f831072b6756e96a269ac040d8aca5","unresolved":false,"context_lines":[{"line_number":42,"context_line":"    cfg.IntOpt(\u0027workers_pool_size\u0027,"},{"line_number":43,"context_line":"               default\u003d100, min\u003d3,"},{"line_number":44,"context_line":"               help\u003d_(\u0027The size of the workers greenthread pool. \u0027"},{"line_number":45,"context_line":"                      \u0027Note that 2 threads will be reserved by the conductor \u0027"},{"line_number":46,"context_line":"                      \u0027itself for handling heart beats and periodic tasks.\u0027)),"},{"line_number":47,"context_line":"    cfg.IntOpt(\u0027heartbeat_interval\u0027,"},{"line_number":48,"context_line":"               default\u003d10,"}],"source_content_type":"text/x-python","patch_set":13,"id":"5aef4532_142c7c49","line":45,"in_reply_to":"5aef4532_326a761b","updated":"2016-03-07 13:53:45.000000000","message":"Done","commit_id":"2a454f5845f4628438a4a8ed68c5520ed0d35662"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"a1f4c60bf4175c10edd21df0fda8d2e8db6fca60","unresolved":false,"context_lines":[{"line_number":399,"context_line":"                    try:"},{"line_number":400,"context_line":"                        LOG.info(_LI(\u0027Trying to start conosle of node \u0027"},{"line_number":401,"context_line":"                                     \u0027%(node)s.\u0027) % {\u0027node\u0027: task.node.uuid})"},{"line_number":402,"context_line":"                        task.driver.console.start_console(task)"},{"line_number":403,"context_line":"                        LOG.debug(\u0027Successfully start console of node \u0027"},{"line_number":404,"context_line":"                                  \u0027%(node)s.\u0027 % {\u0027node\u0027: task.node.uuid})"},{"line_number":405,"context_line":"                    except Exception as err:"}],"source_content_type":"text/x-python","patch_set":13,"id":"5aef4532_295848fa","line":402,"updated":"2016-03-07 10:27:07.000000000","message":"This patch depends on start_shellinabox_console() behavior: https://github.com/openstack/ironic/blob/master/ironic/drivers/modules/console_utils.py#L182-L187 but it\u0027s not documented. start_console() method should not raise an exception if console already started, this behavior should be documented in base class docstring.","commit_id":"2a454f5845f4628438a4a8ed68c5520ed0d35662"},{"author":{"_account_id":6610,"name":"Zhenguo Niu","email":"Niu.ZGlinux@gmail.com","username":"niu-zglinux"},"change_message_id":"d8967cbcf6f831072b6756e96a269ac040d8aca5","unresolved":false,"context_lines":[{"line_number":399,"context_line":"                    try:"},{"line_number":400,"context_line":"                        LOG.info(_LI(\u0027Trying to start conosle of node \u0027"},{"line_number":401,"context_line":"                                     \u0027%(node)s.\u0027) % {\u0027node\u0027: task.node.uuid})"},{"line_number":402,"context_line":"                        task.driver.console.start_console(task)"},{"line_number":403,"context_line":"                        LOG.debug(\u0027Successfully start console of node \u0027"},{"line_number":404,"context_line":"                                  \u0027%(node)s.\u0027 % {\u0027node\u0027: task.node.uuid})"},{"line_number":405,"context_line":"                    except Exception as err:"}],"source_content_type":"text/x-python","patch_set":13,"id":"5aef4532_b47e68ac","line":402,"in_reply_to":"5aef4532_295848fa","updated":"2016-03-07 13:53:45.000000000","message":"Done","commit_id":"2a454f5845f4628438a4a8ed68c5520ed0d35662"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"a1f4c60bf4175c10edd21df0fda8d2e8db6fca60","unresolved":false,"context_lines":[{"line_number":413,"context_line":"                        task.node.last_error \u003d msg"},{"line_number":414,"context_line":"                        task.node.console_enabled \u003d False"},{"line_number":415,"context_line":"                        task.node.save()"},{"line_number":416,"context_line":"            except (exception.NodeLocked, exception.NodeNotFound):"},{"line_number":417,"context_line":"                LOG.warning(_LW(\u0027Node %(node)s is locked while trying to \u0027"},{"line_number":418,"context_line":"                                \u0027start console on conductor startup.\u0027)"},{"line_number":419,"context_line":"                            % {\u0027node\u0027: task.node.uuid})"}],"source_content_type":"text/x-python","patch_set":13,"id":"5aef4532_663a7fcf","line":416,"updated":"2016-03-07 10:27:07.000000000","message":"Log message misinforms if NodeNotFound, will be OK doing nothing (\"pass\") for not found.","commit_id":"2a454f5845f4628438a4a8ed68c5520ed0d35662"},{"author":{"_account_id":6610,"name":"Zhenguo Niu","email":"Niu.ZGlinux@gmail.com","username":"niu-zglinux"},"change_message_id":"d8967cbcf6f831072b6756e96a269ac040d8aca5","unresolved":false,"context_lines":[{"line_number":413,"context_line":"                        task.node.last_error \u003d msg"},{"line_number":414,"context_line":"                        task.node.console_enabled \u003d False"},{"line_number":415,"context_line":"                        task.node.save()"},{"line_number":416,"context_line":"            except (exception.NodeLocked, exception.NodeNotFound):"},{"line_number":417,"context_line":"                LOG.warning(_LW(\u0027Node %(node)s is locked while trying to \u0027"},{"line_number":418,"context_line":"                                \u0027start console on conductor startup.\u0027)"},{"line_number":419,"context_line":"                            % {\u0027node\u0027: task.node.uuid})"}],"source_content_type":"text/x-python","patch_set":13,"id":"5aef4532_1ff815e5","line":416,"in_reply_to":"5aef4532_663a7fcf","updated":"2016-03-07 13:53:45.000000000","message":"Done","commit_id":"2a454f5845f4628438a4a8ed68c5520ed0d35662"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"ea4060c30d489ffcd2f500d4a8419bb12a25d5a9","unresolved":false,"context_lines":[{"line_number":418,"context_line":"                            % {\u0027node\u0027: task.node.uuid})"},{"line_number":419,"context_line":"                continue"},{"line_number":420,"context_line":"            except exception.NodeNotFound:"},{"line_number":421,"context_line":"                continue"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa0719c6_bea3a54e","line":421,"updated":"2016-03-22 15:17:43.000000000","message":"We can not control start_console() implementation, but immediately after start conductor can be highly loaded and also many consoles should be started, so better to add a possibility to switch green thread here:\n\n finally:\n     eventlet.sleep(0)","commit_id":"99a0557717cf5c59c0abe8696149cb15dd90cee2"},{"author":{"_account_id":6610,"name":"Zhenguo Niu","email":"Niu.ZGlinux@gmail.com","username":"niu-zglinux"},"change_message_id":"9c1e6ec3b533ecb4afbb3d4ae388375fc83b9733","unresolved":false,"context_lines":[{"line_number":418,"context_line":"                            % {\u0027node\u0027: task.node.uuid})"},{"line_number":419,"context_line":"                continue"},{"line_number":420,"context_line":"            except exception.NodeNotFound:"},{"line_number":421,"context_line":"                continue"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa0719c6_c72a082c","line":421,"in_reply_to":"fa0719c6_bea3a54e","updated":"2016-03-22 15:56:38.000000000","message":"Good point! thanks Yuriy, will update soon.","commit_id":"99a0557717cf5c59c0abe8696149cb15dd90cee2"},{"author":{"_account_id":13362,"name":"Tan Lin","email":"lin.tan@intel.com","username":"zero"},"change_message_id":"61f4c44fc57d841780b91b4d32c6f973a05826ec","unresolved":false,"context_lines":[{"line_number":42,"context_line":""},{"line_number":43,"context_line":"conductor_opts \u003d ["},{"line_number":44,"context_line":"    cfg.IntOpt(\u0027workers_pool_size\u0027,"},{"line_number":45,"context_line":"               default\u003d100, min\u003d4,"},{"line_number":46,"context_line":"               help\u003d_(\u0027The size of the workers greenthread pool. \u0027"},{"line_number":47,"context_line":"                      \u0027Note that 3 threads will be reserved by the conductor \u0027"},{"line_number":48,"context_line":"                      \u0027itself for handling heart beats and periodic tasks.\u0027)),"}],"source_content_type":"text/x-python","patch_set":16,"id":"fa0719c6_53cdfeb5","line":45,"updated":"2016-03-23 08:27:00.000000000","message":"So since you change the min value, I think there need an explaining in commit message/help and an updates section in notes is necessary.","commit_id":"7795adbbbb02bfc8f8880a41bd2273baad80afb1"},{"author":{"_account_id":5805,"name":"Chris Krelle","email":"nobodycam@gmail.com","username":"nobodycam"},"change_message_id":"9887be6229dc05679afda1e0372e7d017e9a0ac9","unresolved":false,"context_lines":[{"line_number":397,"context_line":"                with task_manager.acquire(context, node_uuid, shared\u003dFalse,"},{"line_number":398,"context_line":"                                          purpose\u003d\u0027start console\u0027) as task:"},{"line_number":399,"context_line":"                    try:"},{"line_number":400,"context_line":"                        LOG.info(_LI(\u0027Trying to start conosle of node \u0027"},{"line_number":401,"context_line":"                                     \u0027%(node)s.\u0027) % {\u0027node\u0027: task.node.uuid})"},{"line_number":402,"context_line":"                        task.driver.console.start_console(task)"},{"line_number":403,"context_line":"                        LOG.debug(\u0027Successfully start console of node \u0027"}],"source_content_type":"text/x-python","patch_set":17,"id":"fa0719c6_d131d15b","line":400,"range":{"start_line":400,"start_character":54,"end_line":400,"end_character":61},"updated":"2016-03-23 22:14:51.000000000","message":"s/conosle/console/","commit_id":"e444b5e1af072b76a76847ce2678dfb800c5e979"},{"author":{"_account_id":6610,"name":"Zhenguo Niu","email":"Niu.ZGlinux@gmail.com","username":"niu-zglinux"},"change_message_id":"8ba485d3138909e763d72877053def8d36c71b2e","unresolved":false,"context_lines":[{"line_number":397,"context_line":"                with task_manager.acquire(context, node_uuid, shared\u003dFalse,"},{"line_number":398,"context_line":"                                          purpose\u003d\u0027start console\u0027) as task:"},{"line_number":399,"context_line":"                    try:"},{"line_number":400,"context_line":"                        LOG.info(_LI(\u0027Trying to start conosle of node \u0027"},{"line_number":401,"context_line":"                                     \u0027%(node)s.\u0027) % {\u0027node\u0027: task.node.uuid})"},{"line_number":402,"context_line":"                        task.driver.console.start_console(task)"},{"line_number":403,"context_line":"                        LOG.debug(\u0027Successfully start console of node \u0027"}],"source_content_type":"text/x-python","patch_set":17,"id":"fa0719c6_75bd4ad7","line":400,"range":{"start_line":400,"start_character":54,"end_line":400,"end_character":61},"in_reply_to":"fa0719c6_d131d15b","updated":"2016-03-24 02:10:44.000000000","message":"Done","commit_id":"e444b5e1af072b76a76847ce2678dfb800c5e979"},{"author":{"_account_id":5805,"name":"Chris Krelle","email":"nobodycam@gmail.com","username":"nobodycam"},"change_message_id":"9887be6229dc05679afda1e0372e7d017e9a0ac9","unresolved":false,"context_lines":[{"line_number":411,"context_line":"                        # If starting console failed, set node console_enabled"},{"line_number":412,"context_line":"                        # back to False and set node\u0027s last error."},{"line_number":413,"context_line":"                        task.node.last_error \u003d msg"},{"line_number":414,"context_line":"                        task.node.console_enabled \u003d False"},{"line_number":415,"context_line":"                        task.node.save()"},{"line_number":416,"context_line":"            except exception.NodeLocked:"},{"line_number":417,"context_line":"                LOG.warning(_LW(\u0027Node %(node)s is locked while trying to \u0027"},{"line_number":418,"context_line":"                                \u0027start console on conductor startup.\u0027)"}],"source_content_type":"text/x-python","patch_set":17,"id":"fa0719c6_9172b90f","line":415,"range":{"start_line":414,"start_character":24,"end_line":415,"end_character":40},"updated":"2016-03-23 22:14:51.000000000","message":"we should make s explicit log noting we are making this change.","commit_id":"e444b5e1af072b76a76847ce2678dfb800c5e979"},{"author":{"_account_id":6610,"name":"Zhenguo Niu","email":"Niu.ZGlinux@gmail.com","username":"niu-zglinux"},"change_message_id":"8ba485d3138909e763d72877053def8d36c71b2e","unresolved":false,"context_lines":[{"line_number":411,"context_line":"                        # If starting console failed, set node console_enabled"},{"line_number":412,"context_line":"                        # back to False and set node\u0027s last error."},{"line_number":413,"context_line":"                        task.node.last_error \u003d msg"},{"line_number":414,"context_line":"                        task.node.console_enabled \u003d False"},{"line_number":415,"context_line":"                        task.node.save()"},{"line_number":416,"context_line":"            except exception.NodeLocked:"},{"line_number":417,"context_line":"                LOG.warning(_LW(\u0027Node %(node)s is locked while trying to \u0027"},{"line_number":418,"context_line":"                                \u0027start console on conductor startup.\u0027)"}],"source_content_type":"text/x-python","patch_set":17,"id":"fa0719c6_959bbe65","line":415,"range":{"start_line":414,"start_character":24,"end_line":415,"end_character":40},"in_reply_to":"fa0719c6_9172b90f","updated":"2016-03-24 02:10:44.000000000","message":"Thanks Chris Krelle for the suggestion, I can add this to the error log above to state we change console eanbled to False.","commit_id":"e444b5e1af072b76a76847ce2678dfb800c5e979"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"f71de6107db753e34ef99109f642a33fd33bcea3","unresolved":false,"context_lines":[{"line_number":42,"context_line":""},{"line_number":43,"context_line":"conductor_opts \u003d ["},{"line_number":44,"context_line":"    cfg.IntOpt(\u0027workers_pool_size\u0027,"},{"line_number":45,"context_line":"               default\u003d100, min\u003d4,"},{"line_number":46,"context_line":"               help\u003d_(\u0027The size of the workers greenthread pool. \u0027"},{"line_number":47,"context_line":"                      \u0027Note that 3 threads will be reserved by the conductor \u0027"},{"line_number":48,"context_line":"                      \u0027itself for handling heart beats and periodic tasks.\u0027)),"}],"source_content_type":"text/x-python","patch_set":18,"id":"fa0719c6_a3cf9a54","line":45,"updated":"2016-03-24 10:48:01.000000000","message":"Not something I think we should do tho. Although _very_ unlikely, this could potentially break someone (or automated tests). If one has workers_pool_size set to 3 in their configuration file and update Ironic, the next time he/she restart the conductor service it will error out.\n\nIMHO, handling NoFreeConductorWorker when calling _start_consoles() should be enough (and logging a warning).","commit_id":"35e2dd0f91f3aa7068621380f6dca68b1de60e6f"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"04418b295d25f265ca06e69b028b661ba3c69571","unresolved":false,"context_lines":[{"line_number":42,"context_line":""},{"line_number":43,"context_line":"conductor_opts \u003d ["},{"line_number":44,"context_line":"    cfg.IntOpt(\u0027workers_pool_size\u0027,"},{"line_number":45,"context_line":"               default\u003d100, min\u003d4,"},{"line_number":46,"context_line":"               help\u003d_(\u0027The size of the workers greenthread pool. \u0027"},{"line_number":47,"context_line":"                      \u0027Note that 3 threads will be reserved by the conductor \u0027"},{"line_number":48,"context_line":"                      \u0027itself for handling heart beats and periodic tasks.\u0027)),"}],"source_content_type":"text/x-python","patch_set":18,"id":"7a1b2928_f96c730a","line":45,"updated":"2016-04-10 16:29:51.000000000","message":"We don\u0027t need to bump this value. The current min\u003d3 is because 2 threads are *always* occupied. In this case we only run something on start-up, so it\u0027s still possible to run with 3 threads.","commit_id":"35e2dd0f91f3aa7068621380f6dca68b1de60e6f"},{"author":{"_account_id":6610,"name":"Zhenguo Niu","email":"Niu.ZGlinux@gmail.com","username":"niu-zglinux"},"change_message_id":"c58b5074c274e4cc138fc3c17ddf830716e885e8","unresolved":false,"context_lines":[{"line_number":42,"context_line":""},{"line_number":43,"context_line":"conductor_opts \u003d ["},{"line_number":44,"context_line":"    cfg.IntOpt(\u0027workers_pool_size\u0027,"},{"line_number":45,"context_line":"               default\u003d100, min\u003d4,"},{"line_number":46,"context_line":"               help\u003d_(\u0027The size of the workers greenthread pool. \u0027"},{"line_number":47,"context_line":"                      \u0027Note that 3 threads will be reserved by the conductor \u0027"},{"line_number":48,"context_line":"                      \u0027itself for handling heart beats and periodic tasks.\u0027)),"}],"source_content_type":"text/x-python","patch_set":18,"id":"7a1b2928_90038cb8","line":45,"in_reply_to":"7a1b2928_f96c730a","updated":"2016-04-11 03:00:09.000000000","message":"thanks Dmitry for the review, yes, the thread is not always occupied, I agree it\u0027s still *possible* to run 3 threads, but I\u0027m afraid if we have huge number of nodes, it will take a long time to release the thread, then there could be something wrong occured.","commit_id":"35e2dd0f91f3aa7068621380f6dca68b1de60e6f"},{"author":{"_account_id":6610,"name":"Zhenguo Niu","email":"Niu.ZGlinux@gmail.com","username":"niu-zglinux"},"change_message_id":"6550ff8ca8bbaf12c1dafe97086727ce0cc43c0a","unresolved":false,"context_lines":[{"line_number":42,"context_line":""},{"line_number":43,"context_line":"conductor_opts \u003d ["},{"line_number":44,"context_line":"    cfg.IntOpt(\u0027workers_pool_size\u0027,"},{"line_number":45,"context_line":"               default\u003d100, min\u003d4,"},{"line_number":46,"context_line":"               help\u003d_(\u0027The size of the workers greenthread pool. \u0027"},{"line_number":47,"context_line":"                      \u0027Note that 3 threads will be reserved by the conductor \u0027"},{"line_number":48,"context_line":"                      \u0027itself for handling heart beats and periodic tasks.\u0027)),"}],"source_content_type":"text/x-python","patch_set":18,"id":"da0c15f0_213a2037","line":45,"in_reply_to":"da0c15f0_0d5e33e9","updated":"2016-03-25 03:07:23.000000000","message":"Thanks all for the suggestions, I\u0027m not sure how to handle this in general, personally, I agree with Yuriy to bump the min value now instead of having a deprecation period as it indicates the real requirements, no reason to make it not work now just because it could potentially break the old deployment, and silently bump the 3 to 4 looks like a hack.","commit_id":"35e2dd0f91f3aa7068621380f6dca68b1de60e6f"},{"author":{"_account_id":10342,"name":"Jay Faulkner","display_name":"JayF","email":"jay@jvf.cc","username":"JayF","status":"youtube.com/@oss-gr / podcast.gr-oss.io"},"change_message_id":"9752b5813e5e4a13eef87884b8ba31e5a1d76929","unresolved":false,"context_lines":[{"line_number":42,"context_line":""},{"line_number":43,"context_line":"conductor_opts \u003d ["},{"line_number":44,"context_line":"    cfg.IntOpt(\u0027workers_pool_size\u0027,"},{"line_number":45,"context_line":"               default\u003d100, min\u003d4,"},{"line_number":46,"context_line":"               help\u003d_(\u0027The size of the workers greenthread pool. \u0027"},{"line_number":47,"context_line":"                      \u0027Note that 3 threads will be reserved by the conductor \u0027"},{"line_number":48,"context_line":"                      \u0027itself for handling heart beats and periodic tasks.\u0027)),"}],"source_content_type":"text/x-python","patch_set":18,"id":"da0c15f0_0d5e33e9","line":45,"in_reply_to":"fa0719c6_064934d0","updated":"2016-03-24 23:55:24.000000000","message":"I agree, this seems like a change that should, at a minimum, have a deprecation period, or silently bump the 3 to a 4 if they are set to 3 currently.","commit_id":"35e2dd0f91f3aa7068621380f6dca68b1de60e6f"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"8e7105bc2990e49c5b1ded26c3d9135f50126ba9","unresolved":false,"context_lines":[{"line_number":42,"context_line":""},{"line_number":43,"context_line":"conductor_opts \u003d ["},{"line_number":44,"context_line":"    cfg.IntOpt(\u0027workers_pool_size\u0027,"},{"line_number":45,"context_line":"               default\u003d100, min\u003d4,"},{"line_number":46,"context_line":"               help\u003d_(\u0027The size of the workers greenthread pool. \u0027"},{"line_number":47,"context_line":"                      \u0027Note that 3 threads will be reserved by the conductor \u0027"},{"line_number":48,"context_line":"                      \u0027itself for handling heart beats and periodic tasks.\u0027)),"}],"source_content_type":"text/x-python","patch_set":18,"id":"fa0719c6_064934d0","line":45,"in_reply_to":"fa0719c6_a3cf9a54","updated":"2016-03-24 11:07:57.000000000","message":"You are right about existing edge cases testing, but this value should indicate real requirements. If someone will test Ironic in the HW test lab with pool size \u003d 3 some functionality (restart consoles) may be broken.","commit_id":"35e2dd0f91f3aa7068621380f6dca68b1de60e6f"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"04418b295d25f265ca06e69b028b661ba3c69571","unresolved":false,"context_lines":[{"line_number":184,"context_line":"        except exception.NoFreeConductorWorker:"},{"line_number":185,"context_line":"            # NOTE(zhenguo): If no free worker for restarting consoles, just"},{"line_number":186,"context_line":"            # logging a warning message here, the conductor should continue to"},{"line_number":187,"context_line":"            # start."},{"line_number":188,"context_line":"            LOG.warning(_LW(\u0027Failed to start worker for restarting consoles.\u0027))"},{"line_number":189,"context_line":""},{"line_number":190,"context_line":"        # Spawn a dedicated greenthread for the keepalive"}],"source_content_type":"text/x-python","patch_set":18,"id":"7a1b2928_d971b7e2","line":187,"updated":"2016-04-10 16:29:51.000000000","message":"Why do we expect this to ever happen? We have mininum 3 workers, and all 3 are free at this moment.","commit_id":"35e2dd0f91f3aa7068621380f6dca68b1de60e6f"},{"author":{"_account_id":6610,"name":"Zhenguo Niu","email":"Niu.ZGlinux@gmail.com","username":"niu-zglinux"},"change_message_id":"3a32e5a198728f92383453105d6b57e72cf9c432","unresolved":false,"context_lines":[{"line_number":184,"context_line":"        except exception.NoFreeConductorWorker:"},{"line_number":185,"context_line":"            # NOTE(zhenguo): If no free worker for restarting consoles, just"},{"line_number":186,"context_line":"            # logging a warning message here, the conductor should continue to"},{"line_number":187,"context_line":"            # start."},{"line_number":188,"context_line":"            LOG.warning(_LW(\u0027Failed to start worker for restarting consoles.\u0027))"},{"line_number":189,"context_line":""},{"line_number":190,"context_line":"        # Spawn a dedicated greenthread for the keepalive"}],"source_content_type":"text/x-python","patch_set":18,"id":"7a1b2928_842219b8","line":187,"in_reply_to":"7a1b2928_d971b7e2","updated":"2016-04-11 12:44:40.000000000","message":"In fact, this is just copied from conductor_service_record_keepalive, it\u0027s also the first thread before we add this, not sure the reason it\u0027s needed, but it\u0027s not harmful :P","commit_id":"35e2dd0f91f3aa7068621380f6dca68b1de60e6f"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"9482677fc65d687cc7bc6399682a581a3aa2e21f","unresolved":false,"context_lines":[{"line_number":185,"context_line":"            # NOTE(zhenguo): If no free worker for restarting consoles, just"},{"line_number":186,"context_line":"            # logging a warning message here, the conductor should continue to"},{"line_number":187,"context_line":"            # start."},{"line_number":188,"context_line":"            LOG.warning(_LW(\u0027Failed to start worker for restarting consoles.\u0027))"},{"line_number":189,"context_line":""},{"line_number":190,"context_line":"        # Spawn a dedicated greenthread for the keepalive"},{"line_number":191,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":18,"id":"9a061dce_2f1fb45c","line":188,"updated":"2016-04-08 11:01:46.000000000","message":"Why not just leave the min value 3? And maybe add current number of workers here in the log message.","commit_id":"35e2dd0f91f3aa7068621380f6dca68b1de60e6f"},{"author":{"_account_id":6610,"name":"Zhenguo Niu","email":"Niu.ZGlinux@gmail.com","username":"niu-zglinux"},"change_message_id":"5bddba17f8309359ce5758f50e7beae3c66ce20b","unresolved":false,"context_lines":[{"line_number":185,"context_line":"            # NOTE(zhenguo): If no free worker for restarting consoles, just"},{"line_number":186,"context_line":"            # logging a warning message here, the conductor should continue to"},{"line_number":187,"context_line":"            # start."},{"line_number":188,"context_line":"            LOG.warning(_LW(\u0027Failed to start worker for restarting consoles.\u0027))"},{"line_number":189,"context_line":""},{"line_number":190,"context_line":"        # Spawn a dedicated greenthread for the keepalive"},{"line_number":191,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":18,"id":"9a061dce_4eaac01a","line":188,"in_reply_to":"9a061dce_2f1fb45c","updated":"2016-04-09 13:52:15.000000000","message":"hi vdrok, this is the first thread of conductor, so I think NoFreeConductorWorker here will not be raised unless you set workers_pool_size to 0, this is the reason why I think bumping min version is a hard requirement :(","commit_id":"35e2dd0f91f3aa7068621380f6dca68b1de60e6f"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"04418b295d25f265ca06e69b028b661ba3c69571","unresolved":false,"context_lines":[{"line_number":397,"context_line":"                with task_manager.acquire(context, node_uuid, shared\u003dFalse,"},{"line_number":398,"context_line":"                                          purpose\u003d\u0027start console\u0027) as task:"},{"line_number":399,"context_line":"                    try:"},{"line_number":400,"context_line":"                        LOG.info(_LI(\u0027Trying to start console of node \u0027"},{"line_number":401,"context_line":"                                     \u0027%(node)s.\u0027) % {\u0027node\u0027: task.node.uuid})"},{"line_number":402,"context_line":"                        task.driver.console.start_console(task)"},{"line_number":403,"context_line":"                        LOG.debug(\u0027Successfully start console of node \u0027"}],"source_content_type":"text/x-python","patch_set":18,"id":"7a1b2928_39770bd6","line":400,"updated":"2016-04-10 16:29:51.000000000","message":"this should be debug","commit_id":"35e2dd0f91f3aa7068621380f6dca68b1de60e6f"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"04418b295d25f265ca06e69b028b661ba3c69571","unresolved":false,"context_lines":[{"line_number":398,"context_line":"                                          purpose\u003d\u0027start console\u0027) as task:"},{"line_number":399,"context_line":"                    try:"},{"line_number":400,"context_line":"                        LOG.info(_LI(\u0027Trying to start console of node \u0027"},{"line_number":401,"context_line":"                                     \u0027%(node)s.\u0027) % {\u0027node\u0027: task.node.uuid})"},{"line_number":402,"context_line":"                        task.driver.console.start_console(task)"},{"line_number":403,"context_line":"                        LOG.debug(\u0027Successfully start console of node \u0027"},{"line_number":404,"context_line":"                                  \u0027%(node)s.\u0027 % {\u0027node\u0027: task.node.uuid})"}],"source_content_type":"text/x-python","patch_set":18,"id":"7a1b2928_1974cfcd","line":401,"updated":"2016-04-10 16:29:51.000000000","message":"we don\u0027t usually put dots in the end","commit_id":"35e2dd0f91f3aa7068621380f6dca68b1de60e6f"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"04418b295d25f265ca06e69b028b661ba3c69571","unresolved":false,"context_lines":[{"line_number":401,"context_line":"                                     \u0027%(node)s.\u0027) % {\u0027node\u0027: task.node.uuid})"},{"line_number":402,"context_line":"                        task.driver.console.start_console(task)"},{"line_number":403,"context_line":"                        LOG.debug(\u0027Successfully start console of node \u0027"},{"line_number":404,"context_line":"                                  \u0027%(node)s.\u0027 % {\u0027node\u0027: task.node.uuid})"},{"line_number":405,"context_line":"                    except Exception as err:"},{"line_number":406,"context_line":"                        msg \u003d (_(\u0027Failed to start console of node %(node)s \u0027"},{"line_number":407,"context_line":"                                 \u0027while starting the conductor, so changing \u0027"}],"source_content_type":"text/x-python","patch_set":18,"id":"7a1b2928_7981838f","line":404,"updated":"2016-04-10 16:29:51.000000000","message":".. and this should be info.\n\nalso s/start/started/","commit_id":"35e2dd0f91f3aa7068621380f6dca68b1de60e6f"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"04418b295d25f265ca06e69b028b661ba3c69571","unresolved":false,"context_lines":[{"line_number":406,"context_line":"                        msg \u003d (_(\u0027Failed to start console of node %(node)s \u0027"},{"line_number":407,"context_line":"                                 \u0027while starting the conductor, so changing \u0027"},{"line_number":408,"context_line":"                                 \u0027the console_enabled status to False, error: \u0027"},{"line_number":409,"context_line":"                                 \u0027%(err)s.\u0027)"},{"line_number":410,"context_line":"                               % {\u0027node\u0027: task.node.uuid, \u0027err\u0027: err})"},{"line_number":411,"context_line":"                        LOG.error(msg)"},{"line_number":412,"context_line":"                        # If starting console failed, set node console_enabled"}],"source_content_type":"text/x-python","patch_set":18,"id":"7a1b2928_597e47af","line":409,"updated":"2016-04-10 16:29:51.000000000","message":"ditto about dots in the end","commit_id":"35e2dd0f91f3aa7068621380f6dca68b1de60e6f"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"04418b295d25f265ca06e69b028b661ba3c69571","unresolved":false,"context_lines":[{"line_number":417,"context_line":"            except exception.NodeLocked:"},{"line_number":418,"context_line":"                LOG.warning(_LW(\u0027Node %(node)s is locked while trying to \u0027"},{"line_number":419,"context_line":"                                \u0027start console on conductor startup.\u0027)"},{"line_number":420,"context_line":"                            % {\u0027node\u0027: task.node.uuid})"},{"line_number":421,"context_line":"                continue"},{"line_number":422,"context_line":"            except exception.NodeNotFound:"},{"line_number":423,"context_line":"                continue"}],"source_content_type":"text/x-python","patch_set":18,"id":"7a1b2928_b9495b91","line":420,"updated":"2016-04-10 16:29:51.000000000","message":"% -\u003e ,\n\nalso no dot in the end","commit_id":"35e2dd0f91f3aa7068621380f6dca68b1de60e6f"},{"author":{"_account_id":13362,"name":"Tan Lin","email":"lin.tan@intel.com","username":"zero"},"change_message_id":"4b235f4086a82b17912aa0c3f405f5df354242fe","unresolved":false,"context_lines":[{"line_number":414,"context_line":"                        task.node.last_error \u003d msg"},{"line_number":415,"context_line":"                        task.node.console_enabled \u003d False"},{"line_number":416,"context_line":"                        task.node.save()"},{"line_number":417,"context_line":"            except exception.NodeLocked:"},{"line_number":418,"context_line":"                LOG.warning(_LW(\u0027Node %(node)s is locked while trying to \u0027"},{"line_number":419,"context_line":"                                \u0027start console on conductor startup\u0027),"},{"line_number":420,"context_line":"                            {\u0027node\u0027: task.node.uuid})"},{"line_number":421,"context_line":"                continue"},{"line_number":422,"context_line":"            except exception.NodeNotFound:"},{"line_number":423,"context_line":"                continue"},{"line_number":424,"context_line":"            finally:"},{"line_number":425,"context_line":"                # Yield on every iteration"},{"line_number":426,"context_line":"                eventlet.sleep(0)"}],"source_content_type":"text/x-python","patch_set":20,"id":"5a18252c_0389ba26","line":423,"range":{"start_line":417,"start_character":0,"end_line":423,"end_character":24},"updated":"2016-04-13 02:34:51.000000000","message":"looks like you missing tests for these two exception and wonder why don\u0027t you also add a warning for NodeNotFound exception","commit_id":"9f8f16616922202cb95b1188d14b51bf21ce3346"},{"author":{"_account_id":7933,"name":"Philippe Godin","email":"godp1301@gmail.com","username":"godp1301"},"change_message_id":"7c7f27e671fd981c45538751916523b450f2ac2e","unresolved":false,"context_lines":[{"line_number":182,"context_line":"            self._spawn_worker(self._start_consoles,"},{"line_number":183,"context_line":"                               ironic_context.get_admin_context())"},{"line_number":184,"context_line":"        except exception.NoFreeConductorWorker:"},{"line_number":185,"context_line":"            # NOTE(zhenguo): If no free worker for restarting consoles, just"},{"line_number":186,"context_line":"            # logging a warning message here, the conductor should continue to"},{"line_number":187,"context_line":"            # start."},{"line_number":188,"context_line":"            LOG.warning(_LW(\u0027Failed to start worker for restarting consoles.\u0027))"},{"line_number":189,"context_line":""},{"line_number":190,"context_line":"        # Spawn a dedicated greenthread for the keepalive"}],"source_content_type":"text/x-python","patch_set":21,"id":"1a122d0e_0188c9e6","line":187,"range":{"start_line":185,"start_character":12,"end_line":187,"end_character":20},"updated":"2016-04-15 14:39:01.000000000","message":"nit: is this comment really needed?","commit_id":"5896480eff010855bd97b608a87859b679af399c"}],"ironic/tests/unit/conductor/test_base_manager.py":[{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"a1f4c60bf4175c10edd21df0fda8d2e8db6fca60","unresolved":false,"context_lines":[{"line_number":239,"context_line":"            self.service._start_consoles(self.context)"},{"line_number":240,"context_line":"            self.assertEqual(2, mock_start_console.call_count)"},{"line_number":241,"context_line":""},{"line_number":242,"context_line":"    def test__start_consoles_no_console_enabled(self):"},{"line_number":243,"context_line":"        self._start_service()"},{"line_number":244,"context_line":"        with mock.patch.object(self.driver.console,"},{"line_number":245,"context_line":"                               \u0027start_console\u0027) as mock_start_console:"}],"source_content_type":"text/x-python","patch_set":13,"id":"5aef4532_e68e8f26","line":242,"updated":"2016-03-07 10:27:07.000000000","message":"Please create test none with console_enabled\u003dFalse here.","commit_id":"2a454f5845f4628438a4a8ed68c5520ed0d35662"},{"author":{"_account_id":6610,"name":"Zhenguo Niu","email":"Niu.ZGlinux@gmail.com","username":"niu-zglinux"},"change_message_id":"d8967cbcf6f831072b6756e96a269ac040d8aca5","unresolved":false,"context_lines":[{"line_number":239,"context_line":"            self.service._start_consoles(self.context)"},{"line_number":240,"context_line":"            self.assertEqual(2, mock_start_console.call_count)"},{"line_number":241,"context_line":""},{"line_number":242,"context_line":"    def test__start_consoles_no_console_enabled(self):"},{"line_number":243,"context_line":"        self._start_service()"},{"line_number":244,"context_line":"        with mock.patch.object(self.driver.console,"},{"line_number":245,"context_line":"                               \u0027start_console\u0027) as mock_start_console:"}],"source_content_type":"text/x-python","patch_set":13,"id":"5aef4532_3fab518b","line":242,"in_reply_to":"5aef4532_e68e8f26","updated":"2016-03-07 13:53:45.000000000","message":"Done","commit_id":"2a454f5845f4628438a4a8ed68c5520ed0d35662"},{"author":{"_account_id":5805,"name":"Chris Krelle","email":"nobodycam@gmail.com","username":"nobodycam"},"change_message_id":"5000c7e0f8b126a295e1beb0dd2f9badf0397931","unresolved":false,"context_lines":[{"line_number":260,"context_line":"            self.service._start_consoles(self.context)"},{"line_number":261,"context_line":"            mock_start_console.assert_called_once_with(mock.ANY)"},{"line_number":262,"context_line":"            test_node.refresh()"},{"line_number":263,"context_line":"            self.assertFalse(test_node.console_enabled)"}],"source_content_type":"text/x-python","patch_set":19,"id":"5a18252c_5b311bec","line":263,"updated":"2016-04-11 22:08:08.000000000","message":"we should test that last_error isNotNone too.","commit_id":"fc36ac9e3eb61514edb384267b32ee8eb25b4b9b"},{"author":{"_account_id":6610,"name":"Zhenguo Niu","email":"Niu.ZGlinux@gmail.com","username":"niu-zglinux"},"change_message_id":"686b0ca5f633261f68c781c997f806744655a55a","unresolved":false,"context_lines":[{"line_number":260,"context_line":"            self.service._start_consoles(self.context)"},{"line_number":261,"context_line":"            mock_start_console.assert_called_once_with(mock.ANY)"},{"line_number":262,"context_line":"            test_node.refresh()"},{"line_number":263,"context_line":"            self.assertFalse(test_node.console_enabled)"}],"source_content_type":"text/x-python","patch_set":19,"id":"5a18252c_cf03a175","line":263,"in_reply_to":"5a18252c_5b311bec","updated":"2016-04-12 01:35:21.000000000","message":"Done","commit_id":"fc36ac9e3eb61514edb384267b32ee8eb25b4b9b"},{"author":{"_account_id":13362,"name":"Tan Lin","email":"lin.tan@intel.com","username":"zero"},"change_message_id":"4b235f4086a82b17912aa0c3f405f5df354242fe","unresolved":false,"context_lines":[{"line_number":232,"context_line":"            uuid\u003duuidutils.generate_uuid(),"},{"line_number":233,"context_line":"            driver\u003d\u0027fake\u0027,"},{"line_number":234,"context_line":"            console_enabled\u003dTrue"},{"line_number":235,"context_line":"        )"},{"line_number":236,"context_line":"        self._start_service()"},{"line_number":237,"context_line":"        with mock.patch.object(self.driver.console,"},{"line_number":238,"context_line":"                               \u0027start_console\u0027) as mock_start_console:"}],"source_content_type":"text/x-python","patch_set":20,"id":"5a18252c_c3f222d2","line":235,"updated":"2016-04-13 02:34:51.000000000","message":"what about create a test_node which not enable console too.","commit_id":"9f8f16616922202cb95b1188d14b51bf21ce3346"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"9e5e45b51d9628697c5729fd47c383ec1433bf9d","unresolved":false,"context_lines":[{"line_number":273,"context_line":"        test_node \u003d obj_utils.create_test_node(self.context,"},{"line_number":274,"context_line":"                                               driver\u003d\u0027fake\u0027,"},{"line_number":275,"context_line":"                                               console_enabled\u003dTrue,"},{"line_number":276,"context_line":"                                               reservation\u003dTrue)"},{"line_number":277,"context_line":"        self._start_service()"},{"line_number":278,"context_line":"        with mock.patch.object(self.driver.console,"},{"line_number":279,"context_line":"                               \u0027start_console\u0027) as mock_start_console:"}],"source_content_type":"text/x-python","patch_set":21,"id":"1a122d0e_7cd8481e","line":276,"updated":"2016-04-15 12:38:09.000000000","message":"Reservation is string field, not bool.","commit_id":"5896480eff010855bd97b608a87859b679af399c"},{"author":{"_account_id":13362,"name":"Tan Lin","email":"lin.tan@intel.com","username":"zero"},"change_message_id":"b1f30028c21b810ed32d74a5480ba4e4b515d424","unresolved":false,"context_lines":[{"line_number":269,"context_line":"            self.assertFalse(test_node.console_enabled)"},{"line_number":270,"context_line":"            self.assertIsNotNone(test_node.last_error)"},{"line_number":271,"context_line":""},{"line_number":272,"context_line":"    def test__start_consoles_node_locked(self):"},{"line_number":273,"context_line":"        test_node \u003d obj_utils.create_test_node(self.context,"},{"line_number":274,"context_line":"                                               driver\u003d\u0027fake\u0027,"},{"line_number":275,"context_line":"                                               console_enabled\u003dTrue,"}],"source_content_type":"text/x-python","patch_set":22,"id":"1a122d0e_abaa66d2","line":272,"updated":"2016-04-18 06:34:02.000000000","message":"another explicitly way to test is mock log.warning and verity it was called","commit_id":"2bf55c7d960f42a19c287f0505664625a105f99b"},{"author":{"_account_id":6610,"name":"Zhenguo Niu","email":"Niu.ZGlinux@gmail.com","username":"niu-zglinux"},"change_message_id":"b6f37a0d61bfa6d3c04141c0b71095b07f43dca4","unresolved":false,"context_lines":[{"line_number":269,"context_line":"            self.assertFalse(test_node.console_enabled)"},{"line_number":270,"context_line":"            self.assertIsNotNone(test_node.last_error)"},{"line_number":271,"context_line":""},{"line_number":272,"context_line":"    def test__start_consoles_node_locked(self):"},{"line_number":273,"context_line":"        test_node \u003d obj_utils.create_test_node(self.context,"},{"line_number":274,"context_line":"                                               driver\u003d\u0027fake\u0027,"},{"line_number":275,"context_line":"                                               console_enabled\u003dTrue,"}],"source_content_type":"text/x-python","patch_set":22,"id":"1a122d0e_84dcb4e5","line":272,"in_reply_to":"1a122d0e_abaa66d2","updated":"2016-04-18 09:48:33.000000000","message":"Done","commit_id":"2bf55c7d960f42a19c287f0505664625a105f99b"}],"ironic/tests/unit/drivers/modules/test_console_utils.py":[{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"change_message_id":"4a2a9090b8596c2e6995f776cd9fa4f8914de6b8","unresolved":false,"context_lines":[{"line_number":420,"context_line":""},{"line_number":421,"context_line":"        mock_get_pid.assert_called_once_with(self.info[\u0027uuid\u0027])"},{"line_number":422,"context_line":"        mock_pid_exists.assert_called_once_with(12345)"},{"line_number":423,"context_line":"        self.assertEqual(True, ret)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a7b0d38_a7de3e0f","line":423,"range":{"start_line":423,"start_character":34,"end_line":423,"end_character":35},"updated":"2015-12-25 00:36:12.000000000","message":"It is better that we add the negative test case, such as for any exception case or non-existing process id cases to cover the \u0027return false\u0027 code branch, thanks.","commit_id":"0cbb143ca6e546012dc0fe51c3c6292523d2ef2c"},{"author":{"_account_id":6610,"name":"Zhenguo Niu","email":"Niu.ZGlinux@gmail.com","username":"niu-zglinux"},"change_message_id":"226eadac25de5d321d9dc4c389ce269732b45ae2","unresolved":false,"context_lines":[{"line_number":420,"context_line":""},{"line_number":421,"context_line":"        mock_get_pid.assert_called_once_with(self.info[\u0027uuid\u0027])"},{"line_number":422,"context_line":"        mock_pid_exists.assert_called_once_with(12345)"},{"line_number":423,"context_line":"        self.assertEqual(True, ret)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a7b0d38_2ae9b3e6","line":423,"range":{"start_line":423,"start_character":34,"end_line":423,"end_character":35},"in_reply_to":"1a7b0d38_a7de3e0f","updated":"2015-12-25 02:44:12.000000000","message":"thanks Haomeng, will add the negative test soon.","commit_id":"0cbb143ca6e546012dc0fe51c3c6292523d2ef2c"}],"releasenotes/notes/restart-console-on-conductor-startup-5cff6128c325b18e.yaml":[{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"a1f4c60bf4175c10edd21df0fda8d2e8db6fca60","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"fixes:"},{"line_number":3,"context_line":"  - Some nodes\u0027 console may be enabled but the corresponding shellinabox"},{"line_number":4,"context_line":"    services stopped while starting conductors, this tries to start"},{"line_number":5,"context_line":"    consoles on conductor startup to make the status consistent."}],"source_content_type":"text/x-yaml","patch_set":13,"id":"5aef4532_29268868","line":3,"updated":"2016-03-07 10:27:07.000000000","message":"This feature is not only shellinabox related.","commit_id":"2a454f5845f4628438a4a8ed68c5520ed0d35662"},{"author":{"_account_id":6610,"name":"Zhenguo Niu","email":"Niu.ZGlinux@gmail.com","username":"niu-zglinux"},"change_message_id":"d8967cbcf6f831072b6756e96a269ac040d8aca5","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"fixes:"},{"line_number":3,"context_line":"  - Some nodes\u0027 console may be enabled but the corresponding shellinabox"},{"line_number":4,"context_line":"    services stopped while starting conductors, this tries to start"},{"line_number":5,"context_line":"    consoles on conductor startup to make the status consistent."}],"source_content_type":"text/x-yaml","patch_set":13,"id":"5aef4532_3ffeb16b","line":3,"in_reply_to":"5aef4532_29268868","updated":"2016-03-07 13:53:45.000000000","message":"Done","commit_id":"2a454f5845f4628438a4a8ed68c5520ed0d35662"}]}
