)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"c85ccc7febc2bf96dec82c7db9234150ccbc85d5","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Avoid race with nova on power sync and rescue"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Nova powre sync can see an instance off during the rescue test,"},{"line_number":10,"context_line":"and as a result decide that the power must remain off. As such,"},{"line_number":11,"context_line":"we kind of need to fake it for a moment until we actually turn"},{"line_number":12,"context_line":"power back on."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"3f79a3b5_f31cbc7c","line":9,"range":{"start_line":9,"start_character":5,"end_line":9,"end_character":10},"updated":"2018-10-08 13:53:16.000000000","message":"nit: s/ powre / power /","commit_id":"a900a47e82f1e1accd141da5ac7c7d998d63e7a3"}],"ironic/drivers/modules/agent.py":[{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"692abfec96e8e61be7ce4a93d78c9869926fa13f","unresolved":false,"context_lines":[{"line_number":814,"context_line":"        :returns: Returns states.RESCUEWAIT"},{"line_number":815,"context_line":"        \"\"\""},{"line_number":816,"context_line":"        manager_utils.node_power_action(task, states.POWER_OFF)"},{"line_number":817,"context_line":"        # NOTE(TheJulia): Revealing that the power is off at any time can"},{"line_number":818,"context_line":"        # cause external power sync to decide that the node must be off."},{"line_number":819,"context_line":"        # This may result in a post-rescued insance being turned off"},{"line_number":820,"context_line":"        # unexpectedly after rescue has started."}],"source_content_type":"text/x-python","patch_set":2,"id":"3f79a3b5_27150b4d","line":817,"updated":"2018-10-08 13:01:13.000000000","message":"Can we add a TODO here and below to remove this when we add the callback to nova for power changes?","commit_id":"a900a47e82f1e1accd141da5ac7c7d998d63e7a3"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"c85ccc7febc2bf96dec82c7db9234150ccbc85d5","unresolved":false,"context_lines":[{"line_number":816,"context_line":"        manager_utils.node_power_action(task, states.POWER_OFF)"},{"line_number":817,"context_line":"        # NOTE(TheJulia): Revealing that the power is off at any time can"},{"line_number":818,"context_line":"        # cause external power sync to decide that the node must be off."},{"line_number":819,"context_line":"        # This may result in a post-rescued insance being turned off"},{"line_number":820,"context_line":"        # unexpectedly after rescue has started."},{"line_number":821,"context_line":"        task.node.power_state \u003d states.POWER_ON"},{"line_number":822,"context_line":"        task.node.save()"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f79a3b5_b32644cb","line":819,"range":{"start_line":819,"start_character":44,"end_line":819,"end_character":51},"updated":"2018-10-08 13:53:16.000000000","message":"nit : s/ insance / instance /","commit_id":"a900a47e82f1e1accd141da5ac7c7d998d63e7a3"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"c85ccc7febc2bf96dec82c7db9234150ccbc85d5","unresolved":false,"context_lines":[{"line_number":818,"context_line":"        # cause external power sync to decide that the node must be off."},{"line_number":819,"context_line":"        # This may result in a post-rescued insance being turned off"},{"line_number":820,"context_line":"        # unexpectedly after rescue has started."},{"line_number":821,"context_line":"        task.node.power_state \u003d states.POWER_ON"},{"line_number":822,"context_line":"        task.node.save()"},{"line_number":823,"context_line":""},{"line_number":824,"context_line":"        task.driver.boot.clean_up_instance(task)"},{"line_number":825,"context_line":"        task.driver.network.unconfigure_tenant_networks(task)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f79a3b5_b3f5e453","line":822,"range":{"start_line":821,"start_character":8,"end_line":822,"end_character":24},"updated":"2018-10-08 13:53:16.000000000","message":"Will this scenario apply during node tear down if node is configured for \u0027automated clean\u0027. We perform power_off in node tear_down [1],[2] before initiating node clean which would power-on the node with cleaning ramdisk [3].\n\nThis fix looks good for all the drivers except iLO  drivers [4] that perform power off in prepare_ramdisk() to perform attach/detach of vmedia. May be we should not perform power off if its rescue operation. \n\n[1] https://github.com/openstack/ironic/blob/master/ironic/conductor/manager.py#L978-L980\n[2] https://github.com/openstack/ironic/blob/master/ironic/drivers/modules/agent.py#L472-L485\n[3] https://github.com/openstack/ironic/blob/master/ironic/drivers/modules/deploy_utils.py#L891-L901\n[4] https://github.com/openstack/ironic/blob/master/ironic/drivers/modules/ilo/boot.py#L350-L362","commit_id":"a900a47e82f1e1accd141da5ac7c7d998d63e7a3"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"711869547dfa2761ef6c5098272c3edd28297588","unresolved":false,"context_lines":[{"line_number":818,"context_line":"        # cause external power sync to decide that the node must be off."},{"line_number":819,"context_line":"        # This may result in a post-rescued insance being turned off"},{"line_number":820,"context_line":"        # unexpectedly after rescue has started."},{"line_number":821,"context_line":"        task.node.power_state \u003d states.POWER_ON"},{"line_number":822,"context_line":"        task.node.save()"},{"line_number":823,"context_line":""},{"line_number":824,"context_line":"        task.driver.boot.clean_up_instance(task)"},{"line_number":825,"context_line":"        task.driver.network.unconfigure_tenant_networks(task)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f79a3b5_1c25b2bf","line":822,"range":{"start_line":821,"start_character":8,"end_line":822,"end_character":24},"in_reply_to":"3f79a3b5_20e41142","updated":"2018-10-09 05:02:34.000000000","message":"@jroll, I mean since agent.rescue() powers off the node before invoking boot.prepare_ramdisk(), ilo driver need not attempt power off again. Though it will not perform the actual operation as server is already in powered off state, but manager_utils.node_power_action() would undo the power state in task.node set by this fix.","commit_id":"a900a47e82f1e1accd141da5ac7c7d998d63e7a3"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"20263a48781ad3c36ecb835b97cc791c45d1bfab","unresolved":false,"context_lines":[{"line_number":818,"context_line":"        # cause external power sync to decide that the node must be off."},{"line_number":819,"context_line":"        # This may result in a post-rescued insance being turned off"},{"line_number":820,"context_line":"        # unexpectedly after rescue has started."},{"line_number":821,"context_line":"        task.node.power_state \u003d states.POWER_ON"},{"line_number":822,"context_line":"        task.node.save()"},{"line_number":823,"context_line":""},{"line_number":824,"context_line":"        task.driver.boot.clean_up_instance(task)"},{"line_number":825,"context_line":"        task.driver.network.unconfigure_tenant_networks(task)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f79a3b5_c580cf9f","line":822,"range":{"start_line":821,"start_character":8,"end_line":822,"end_character":24},"in_reply_to":"3f79a3b5_b3f5e453","updated":"2018-10-08 14:35:27.000000000","message":"With regards to automated_clean, I don\u0027t think this matters since nova has already signaled to tear down the node. Attaching vmedia should be transparent, so maybe just a reboot?\n\nI\u0027m not going to attempt to try and fix the power state for the ilo drivers. Someone familiar with it should give it a try.","commit_id":"a900a47e82f1e1accd141da5ac7c7d998d63e7a3"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"cc026c9079d6f2d4b5d6635c4524e168cb5d7392","unresolved":false,"context_lines":[{"line_number":818,"context_line":"        # cause external power sync to decide that the node must be off."},{"line_number":819,"context_line":"        # This may result in a post-rescued insance being turned off"},{"line_number":820,"context_line":"        # unexpectedly after rescue has started."},{"line_number":821,"context_line":"        task.node.power_state \u003d states.POWER_ON"},{"line_number":822,"context_line":"        task.node.save()"},{"line_number":823,"context_line":""},{"line_number":824,"context_line":"        task.driver.boot.clean_up_instance(task)"},{"line_number":825,"context_line":"        task.driver.network.unconfigure_tenant_networks(task)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f79a3b5_20e41142","line":822,"range":{"start_line":821,"start_character":8,"end_line":822,"end_character":24},"in_reply_to":"3f79a3b5_c580cf9f","updated":"2018-10-08 14:44:36.000000000","message":"@stendulker, we need to power off while we reconfigure networking, or else there\u0027s a security issue.","commit_id":"a900a47e82f1e1accd141da5ac7c7d998d63e7a3"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"711869547dfa2761ef6c5098272c3edd28297588","unresolved":false,"context_lines":[{"line_number":818,"context_line":"        # cause external power sync to decide that the node must be off."},{"line_number":819,"context_line":"        # This may result in a post-rescued insance being turned off"},{"line_number":820,"context_line":"        # unexpectedly after rescue has started."},{"line_number":821,"context_line":"        task.node.power_state \u003d states.POWER_ON"},{"line_number":822,"context_line":"        task.node.save()"},{"line_number":823,"context_line":""},{"line_number":824,"context_line":"        task.driver.boot.clean_up_instance(task)"},{"line_number":825,"context_line":"        task.driver.network.unconfigure_tenant_networks(task)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f79a3b5_bc47de7a","line":822,"range":{"start_line":821,"start_character":8,"end_line":822,"end_character":24},"in_reply_to":"3f79a3b5_c580cf9f","updated":"2018-10-09 05:02:34.000000000","message":"Thanks. I\u0027ll fix power state for ilo drivers based on this fix.","commit_id":"a900a47e82f1e1accd141da5ac7c7d998d63e7a3"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"61ee1970d6caa9b5297ea80dea95c60731a3bc71","unresolved":false,"context_lines":[{"line_number":850,"context_line":"        \"\"\""},{"line_number":851,"context_line":"        manager_utils.node_power_action(task, states.POWER_OFF)"},{"line_number":852,"context_line":""},{"line_number":853,"context_line":"        # NOTE(TheJulia): Revealing that the power is off at any time can"},{"line_number":854,"context_line":"        # cause external power sync to decide that the node must be off."},{"line_number":855,"context_line":"        # This may result in a post-rescued insance being turned off"},{"line_number":856,"context_line":"        # unexpectedly after unrescue."}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_a0d7c150","line":853,"updated":"2018-10-08 14:45:19.000000000","message":"Could we please add the TODO here also? I really don\u0027t want to miss cleaning this up.","commit_id":"5f34f0980074a91dd1b1c879591c0d566193f625"}]}
