)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"732363f58d301c69d666ee7b2b71ba6593eb6611","unresolved":false,"context_lines":[{"line_number":12,"context_line":"   per previous discussions. Current logic is to send the event"},{"line_number":13,"context_line":"   from \"node_power_action\" method which seems to be the centrally"},{"line_number":14,"context_line":"   used function for changing power state from everywhere. Will"},{"line_number":15,"context_line":"   this be an overkill? Apart from that there are some special"},{"line_number":16,"context_line":"   cases to clarify:"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"a) What if the state change is coming from nova itself i.e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9fb8cfa7_78d332d6","line":15,"updated":"2019-06-12 12:48:43.000000000","message":"This seems fine to me","commit_id":"dd5fb9eec1a855be43bc68749ae6b9316c6966e8"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"732363f58d301c69d666ee7b2b71ba6593eb6611","unresolved":false,"context_lines":[{"line_number":18,"context_line":"a) What if the state change is coming from nova itself i.e"},{"line_number":19,"context_line":"   a nova start/stop action: this patch currently still sends"},{"line_number":20,"context_line":"   the event and on the nova side it will be a no-op with a"},{"line_number":21,"context_line":"   debug log saying the node is already powering on/off."},{"line_number":22,"context_line":"b) power state changes to nodes in maintenance will also be"},{"line_number":23,"context_line":"   sent without discretion to maintain consistency."},{"line_number":24,"context_line":"c) power state changes during ironic power sync will be sent to"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9fb8cfa7_38d93af2","line":21,"updated":"2019-06-12 12:48:43.000000000","message":"This seems fine; we can optimize later if it\u0027s a large performance hit.","commit_id":"dd5fb9eec1a855be43bc68749ae6b9316c6966e8"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"2b08edacc9175b1b40aa31c000f63b8316867f3f","unresolved":false,"context_lines":[{"line_number":18,"context_line":"a) What if the state change is coming from nova itself i.e"},{"line_number":19,"context_line":"   a nova start/stop action: this patch currently still sends"},{"line_number":20,"context_line":"   the event and on the nova side it will be a no-op with a"},{"line_number":21,"context_line":"   debug log saying the node is already powering on/off."},{"line_number":22,"context_line":"b) power state changes to nodes in maintenance will also be"},{"line_number":23,"context_line":"   sent without discretion to maintain consistency."},{"line_number":24,"context_line":"c) power state changes during ironic power sync will be sent to"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9fb8cfa7_538171fa","line":21,"in_reply_to":"9fb8cfa7_38d93af2","updated":"2019-06-12 13:16:41.000000000","message":"cool, the same thing exists for the nova boot request, when in ironic after the physical instance gets associated to the node, it reboots etc.. So I\u0027ll make it more strict on the nova side to consider only the \"active\" and \"shutdown\" vm_states and task_state to be None so that other task_sates like during spawning or building power state changes don\u0027t take effect.","commit_id":"dd5fb9eec1a855be43bc68749ae6b9316c6966e8"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"732363f58d301c69d666ee7b2b71ba6593eb6611","unresolved":false,"context_lines":[{"line_number":20,"context_line":"   the event and on the nova side it will be a no-op with a"},{"line_number":21,"context_line":"   debug log saying the node is already powering on/off."},{"line_number":22,"context_line":"b) power state changes to nodes in maintenance will also be"},{"line_number":23,"context_line":"   sent without discretion to maintain consistency."},{"line_number":24,"context_line":"c) power state changes during ironic power sync will be sent to"},{"line_number":25,"context_line":"   nova irrespective of the \"force_power_state_during_sync\""},{"line_number":26,"context_line":"   config option."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9fb8cfa7_38029a3e","line":23,"updated":"2019-06-12 12:48:43.000000000","message":"++","commit_id":"dd5fb9eec1a855be43bc68749ae6b9316c6966e8"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"732363f58d301c69d666ee7b2b71ba6593eb6611","unresolved":false,"context_lines":[{"line_number":23,"context_line":"   sent without discretion to maintain consistency."},{"line_number":24,"context_line":"c) power state changes during ironic power sync will be sent to"},{"line_number":25,"context_line":"   nova irrespective of the \"force_power_state_during_sync\""},{"line_number":26,"context_line":"   config option."},{"line_number":27,"context_line":"d) power state changes via ironic CLI (baremetal node on/off)"},{"line_number":28,"context_line":"   will also be sent to nova so that an instance shutdown by"},{"line_number":29,"context_line":"   nova can be brought up through ironic."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9fb8cfa7_f8f72258","line":26,"updated":"2019-06-12 12:48:43.000000000","message":"++","commit_id":"dd5fb9eec1a855be43bc68749ae6b9316c6966e8"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"732363f58d301c69d666ee7b2b71ba6593eb6611","unresolved":false,"context_lines":[{"line_number":26,"context_line":"   config option."},{"line_number":27,"context_line":"d) power state changes via ironic CLI (baremetal node on/off)"},{"line_number":28,"context_line":"   will also be sent to nova so that an instance shutdown by"},{"line_number":29,"context_line":"   nova can be brought up through ironic."},{"line_number":30,"context_line":"e) Are we missing something?"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"NOTE: There can be a race scenario if the nova-ironic power sync"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9fb8cfa7_3887fab7","line":29,"updated":"2019-06-12 12:48:43.000000000","message":"++","commit_id":"dd5fb9eec1a855be43bc68749ae6b9316c6966e8"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"732363f58d301c69d666ee7b2b71ba6593eb6611","unresolved":false,"context_lines":[{"line_number":27,"context_line":"d) power state changes via ironic CLI (baremetal node on/off)"},{"line_number":28,"context_line":"   will also be sent to nova so that an instance shutdown by"},{"line_number":29,"context_line":"   nova can be brought up through ironic."},{"line_number":30,"context_line":"e) Are we missing something?"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"NOTE: There can be a race scenario if the nova-ironic power sync"},{"line_number":33,"context_line":"happens to happen a nano-second before the power state change"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9fb8cfa7_98bf0660","line":30,"updated":"2019-06-12 12:48:43.000000000","message":"I don\u0027t think so, but maybe I don\u0027t have enough coffee yet? :)","commit_id":"dd5fb9eec1a855be43bc68749ae6b9316c6966e8"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"40d26133b18f03b88bf110df778ad566e5fba248","unresolved":false,"context_lines":[{"line_number":34,"context_line":"event is received from ironic in which case the nova state will"},{"line_number":35,"context_line":"be forced on the node."},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"TODO: Release python-novaclient 14.2.0 after the nova side change"},{"line_number":38,"context_line":"is merged."},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"Depends-On: https://review.opendev.org/#/c/666792/"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"9fb8cfa7_7fca7c6e","line":37,"updated":"2019-06-24 12:13:31.000000000","message":"note to reviewers, the CI failures due to the unreleased version of novaclient can be ignored.","commit_id":"102becf7b73dd5438096d53db2599ca654f34479"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"aef8e6a680cd838fa64615572c8b2ad26c340c98","unresolved":false,"context_lines":[{"line_number":34,"context_line":"event is received from ironic in which case the nova state will"},{"line_number":35,"context_line":"be forced on the node."},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"TODO: Release python-novaclient 14.2.0 after the nova side change"},{"line_number":38,"context_line":"is merged."},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"Depends-On: https://review.opendev.org/#/c/666792/"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"9fb8cfa7_70cb8b49","line":37,"in_reply_to":"9fb8cfa7_7fca7c6e","updated":"2019-06-24 15:00:43.000000000","message":"looks a bit too bloody: http://logs.openstack.org/42/664842/2/check/openstack-tox-cover/6fc1523/job-output.txt.gz#_2019-06-24_12_05_43_239666 , so I\u0027ll postpone the bumping until after novaclient is released.","commit_id":"102becf7b73dd5438096d53db2599ca654f34479"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"11ef0f3d4b159e4a73e4b83cfa2423e4840fa118","unresolved":false,"context_lines":[{"line_number":28,"context_line":"no-op with a debug log saying the node is already powering on/off."},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"NOTE: Although an exclusive lock (task_manager.upgrade_lock()"},{"line_number":31,"context_line":"method) is used when sending calling the nova API to send events,"},{"line_number":32,"context_line":"there can still be a race condition if the nova-ironic power sync"},{"line_number":33,"context_line":"happens to happen a nano-second before the power state change"},{"line_number":34,"context_line":"event is received from ironic in which case the nova state will"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"7faddb67_47676c4e","line":31,"range":{"start_line":31,"start_character":21,"end_line":31,"end_character":28},"updated":"2019-08-02 15:14:43.000000000","message":"x","commit_id":"c7439afb82445bd31ae2555f8f1cf97f8d13f278"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"21cb3af296912eed454250ab5098dbb9abaddebf","unresolved":false,"context_lines":[{"line_number":28,"context_line":"no-op with a debug log saying the node is already powering on/off."},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"NOTE: Although an exclusive lock (task_manager.upgrade_lock()"},{"line_number":31,"context_line":"method) is used when sending calling the nova API to send events,"},{"line_number":32,"context_line":"there can still be a race condition if the nova-ironic power sync"},{"line_number":33,"context_line":"happens to happen a nano-second before the power state change"},{"line_number":34,"context_line":"event is received from ironic in which case the nova state will"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"7faddb67_86f554cd","line":31,"range":{"start_line":31,"start_character":21,"end_line":31,"end_character":28},"in_reply_to":"7faddb67_47676c4e","updated":"2019-08-05 16:04:44.000000000","message":"Done","commit_id":"c7439afb82445bd31ae2555f8f1cf97f8d13f278"}],"devstack/lib/ironic":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"c6267fcbe6b8e2f0216edd64bf98e36a04a92418","unresolved":false,"context_lines":[{"line_number":1398,"context_line":""},{"line_number":1399,"context_line":"    # NOTE(pas-ha) service_catalog section is used to discover"},{"line_number":1400,"context_line":"    # ironic API endpoint from keystone catalog"},{"line_number":1401,"context_line":"    local client_sections\u003d\"neutron swift glance inspector cinder service_catalog json_rpc\""},{"line_number":1402,"context_line":"    for conf_section in $client_sections; do"},{"line_number":1403,"context_line":"        configure_client_for $conf_section"},{"line_number":1404,"context_line":"    done"}],"source_content_type":"application/x-shellscript","patch_set":11,"id":"7faddb67_c956bf2b","line":1401,"updated":"2019-08-08 08:13:57.000000000","message":"add nova here to populate the configuration. otherwise it doesn\u0027t work in the CI: https://logs.opendev.org/42/664842/11/check/ironic-tempest-ipa-partition-redfish-tinyipa/485ee32/controller/logs/screen-ir-cond.txt.gz?level\u003dWARNING#_Aug_05_17_18_04_372181","commit_id":"121145f251b82940a5b47233dc51317d612f0d7f"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"57225e5c222da8f5f93c96f3f31097055917f6b3","unresolved":false,"context_lines":[{"line_number":1398,"context_line":""},{"line_number":1399,"context_line":"    # NOTE(pas-ha) service_catalog section is used to discover"},{"line_number":1400,"context_line":"    # ironic API endpoint from keystone catalog"},{"line_number":1401,"context_line":"    local client_sections\u003d\"neutron swift glance inspector cinder service_catalog json_rpc\""},{"line_number":1402,"context_line":"    for conf_section in $client_sections; do"},{"line_number":1403,"context_line":"        configure_client_for $conf_section"},{"line_number":1404,"context_line":"    done"}],"source_content_type":"application/x-shellscript","patch_set":11,"id":"7faddb67_bbcf0ab2","line":1401,"in_reply_to":"7faddb67_c956bf2b","updated":"2019-08-08 12:38:42.000000000","message":"\u003e add nova here to populate the configuration. otherwise it doesn\u0027t\n \u003e work in the CI: https://logs.opendev.org/42/664842/11/check/ironic-tempest-ipa-partition-redfish-tinyipa/485ee32/controller/logs/screen-ir-cond.txt.gz?level\u003dWARNING#_Aug_05_17_18_04_372181\n\noh yea! makes sense. thanks for pointing this out.","commit_id":"121145f251b82940a5b47233dc51317d612f0d7f"}],"doc/source/admin/index.rst":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"c6267fcbe6b8e2f0216edd64bf98e36a04a92418","unresolved":false,"context_lines":[{"line_number":31,"context_line":"   Security \u003csecurity\u003e"},{"line_number":32,"context_line":"   Windows Images \u003cbuilding-windows-images\u003e"},{"line_number":33,"context_line":"   Troubleshooting FAQ \u003ctroubleshooting\u003e"},{"line_number":34,"context_line":"   Power Sync \u003cpower-sync\u003e"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":".. toctree::"},{"line_number":37,"context_line":"  :hidden:"}],"source_content_type":"text/x-rst","patch_set":11,"id":"7faddb67_09aff72b","line":34,"updated":"2019-08-08 08:13:57.000000000","message":"nit: Power Sync with the Compute Service","commit_id":"121145f251b82940a5b47233dc51317d612f0d7f"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"57225e5c222da8f5f93c96f3f31097055917f6b3","unresolved":false,"context_lines":[{"line_number":31,"context_line":"   Security \u003csecurity\u003e"},{"line_number":32,"context_line":"   Windows Images \u003cbuilding-windows-images\u003e"},{"line_number":33,"context_line":"   Troubleshooting FAQ \u003ctroubleshooting\u003e"},{"line_number":34,"context_line":"   Power Sync \u003cpower-sync\u003e"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":".. toctree::"},{"line_number":37,"context_line":"  :hidden:"}],"source_content_type":"text/x-rst","patch_set":11,"id":"7faddb67_de64344c","line":34,"in_reply_to":"7faddb67_09aff72b","updated":"2019-08-08 12:38:42.000000000","message":"\u003e nit: Power Sync with the Compute Service\n\nThe documentation also talks about the internal ironic power sync which is why I gave a generic title. But if you feel I should mention Compute Service I\u0027ll add it.","commit_id":"121145f251b82940a5b47233dc51317d612f0d7f"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"7ca20f171b23acf930030d0c5baec37ec000e53d","unresolved":false,"context_lines":[{"line_number":31,"context_line":"   Security \u003csecurity\u003e"},{"line_number":32,"context_line":"   Windows Images \u003cbuilding-windows-images\u003e"},{"line_number":33,"context_line":"   Troubleshooting FAQ \u003ctroubleshooting\u003e"},{"line_number":34,"context_line":"   Power Sync with the Compute Service \u003cpower-sync\u003e"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":".. toctree::"},{"line_number":37,"context_line":"  :hidden:"}],"source_content_type":"text/x-rst","patch_set":12,"id":"7faddb67_2a573b29","line":34,"updated":"2019-08-08 16:23:20.000000000","message":"Is it even necessary to blow out the title like this? Won\u0027t sphinx inject it automatically if you just say\n\n power-sync\n\n? (similar for all the above entries)","commit_id":"b1d297ed6e870a9496c1050589ff1172ff85d72f"}],"doc/source/admin/power-sync.rst":[{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"36c0aa4df6d851d9f6b23b1bc73e1eae24b6a360","unresolved":false,"context_lines":[{"line_number":53,"context_line":""},{"line_number":54,"context_line":".. note::"},{"line_number":55,"context_line":"    Ironic only sends requests to nova if the target power state is"},{"line_number":56,"context_line":"    \"power on\" and current state is \"power off\" or  if the target power state"},{"line_number":57,"context_line":"    is \"power off\" and current state is \"power on\". Other error and None states"},{"line_number":58,"context_line":"    will be ignored. In situations where the power state change is originally"},{"line_number":59,"context_line":"    coming from nova, the event will still be created and sent to nova and on"},{"line_number":60,"context_line":"    the nova side it will be a no-op with a debug log saying the node is"}],"source_content_type":"text/x-rst","patch_set":5,"id":"7faddb67_9cf0cfcb","line":57,"range":{"start_line":56,"start_character":4,"end_line":57,"end_character":50},"updated":"2019-07-09 16:10:32.000000000","message":"This is not true, because ironic sends events if the target_power_state is \"power on\" or \"power off\" irrespective of the current state while its on the nova end of things that we compare it with the current state and decide what to do. To be updated in the next iteration.","commit_id":"1e95c8f1889515b14d6959014ebe82474a0d7526"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"57225e5c222da8f5f93c96f3f31097055917f6b3","unresolved":false,"context_lines":[{"line_number":53,"context_line":""},{"line_number":54,"context_line":".. note::"},{"line_number":55,"context_line":"    Ironic only sends requests to nova if the target power state is"},{"line_number":56,"context_line":"    \"power on\" and current state is \"power off\" or  if the target power state"},{"line_number":57,"context_line":"    is \"power off\" and current state is \"power on\". Other error and None states"},{"line_number":58,"context_line":"    will be ignored. In situations where the power state change is originally"},{"line_number":59,"context_line":"    coming from nova, the event will still be created and sent to nova and on"},{"line_number":60,"context_line":"    the nova side it will be a no-op with a debug log saying the node is"}],"source_content_type":"text/x-rst","patch_set":5,"id":"7faddb67_148dcbd2","line":57,"range":{"start_line":56,"start_character":4,"end_line":57,"end_character":50},"in_reply_to":"7faddb67_9cf0cfcb","updated":"2019-08-08 12:38:42.000000000","message":"Done","commit_id":"1e95c8f1889515b14d6959014ebe82474a0d7526"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"11ef0f3d4b159e4a73e4b83cfa2423e4840fa118","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Ironic Power Sync"},{"line_number":8,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":9,"context_line":"Ironic conductor runs a periodic task called ``_sync_power_states`` which as"},{"line_number":10,"context_line":"the name suggests sync\u0027s the power state values between the ironic database"},{"line_number":11,"context_line":"and the actual hardware. If the value of"},{"line_number":12,"context_line":":oslo.config:option:`conductor.force_power_state_during_sync` option is set to"},{"line_number":13,"context_line":"true the power state in the database will be forced on the hardware and if its"}],"source_content_type":"text/x-rst","patch_set":10,"id":"7faddb67_874804b3","line":10,"range":{"start_line":10,"start_character":18,"end_line":10,"end_character":24},"updated":"2019-08-02 15:14:43.000000000","message":"syncs","commit_id":"c7439afb82445bd31ae2555f8f1cf97f8d13f278"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"21cb3af296912eed454250ab5098dbb9abaddebf","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Ironic Power Sync"},{"line_number":8,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":9,"context_line":"Ironic conductor runs a periodic task called ``_sync_power_states`` which as"},{"line_number":10,"context_line":"the name suggests sync\u0027s the power state values between the ironic database"},{"line_number":11,"context_line":"and the actual hardware. If the value of"},{"line_number":12,"context_line":":oslo.config:option:`conductor.force_power_state_during_sync` option is set to"},{"line_number":13,"context_line":"true the power state in the database will be forced on the hardware and if its"}],"source_content_type":"text/x-rst","patch_set":10,"id":"7faddb67_0633a4ac","line":10,"range":{"start_line":10,"start_character":18,"end_line":10,"end_character":24},"in_reply_to":"7faddb67_874804b3","updated":"2019-08-05 16:04:44.000000000","message":"Done","commit_id":"c7439afb82445bd31ae2555f8f1cf97f8d13f278"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"11ef0f3d4b159e4a73e4b83cfa2423e4840fa118","unresolved":false,"context_lines":[{"line_number":8,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":9,"context_line":"Ironic conductor runs a periodic task called ``_sync_power_states`` which as"},{"line_number":10,"context_line":"the name suggests sync\u0027s the power state values between the ironic database"},{"line_number":11,"context_line":"and the actual hardware. If the value of"},{"line_number":12,"context_line":":oslo.config:option:`conductor.force_power_state_during_sync` option is set to"},{"line_number":13,"context_line":"true the power state in the database will be forced on the hardware and if its"},{"line_number":14,"context_line":"set to false the hardware state will be forced on the database. If this"}],"source_content_type":"text/x-rst","patch_set":10,"id":"7faddb67_e7ce982b","line":11,"range":{"start_line":11,"start_character":38,"end_line":11,"end_character":40},"updated":"2019-08-02 15:14:43.000000000","message":"of the...","commit_id":"c7439afb82445bd31ae2555f8f1cf97f8d13f278"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"21cb3af296912eed454250ab5098dbb9abaddebf","unresolved":false,"context_lines":[{"line_number":8,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":9,"context_line":"Ironic conductor runs a periodic task called ``_sync_power_states`` which as"},{"line_number":10,"context_line":"the name suggests sync\u0027s the power state values between the ironic database"},{"line_number":11,"context_line":"and the actual hardware. If the value of"},{"line_number":12,"context_line":":oslo.config:option:`conductor.force_power_state_during_sync` option is set to"},{"line_number":13,"context_line":"true the power state in the database will be forced on the hardware and if its"},{"line_number":14,"context_line":"set to false the hardware state will be forced on the database. If this"}],"source_content_type":"text/x-rst","patch_set":10,"id":"7faddb67_66237857","line":11,"range":{"start_line":11,"start_character":38,"end_line":11,"end_character":40},"in_reply_to":"7faddb67_e7ce982b","updated":"2019-08-05 16:04:44.000000000","message":"Done","commit_id":"c7439afb82445bd31ae2555f8f1cf97f8d13f278"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"11ef0f3d4b159e4a73e4b83cfa2423e4840fa118","unresolved":false,"context_lines":[{"line_number":9,"context_line":"Ironic conductor runs a periodic task called ``_sync_power_states`` which as"},{"line_number":10,"context_line":"the name suggests sync\u0027s the power state values between the ironic database"},{"line_number":11,"context_line":"and the actual hardware. If the value of"},{"line_number":12,"context_line":":oslo.config:option:`conductor.force_power_state_during_sync` option is set to"},{"line_number":13,"context_line":"true the power state in the database will be forced on the hardware and if its"},{"line_number":14,"context_line":"set to false the hardware state will be forced on the database. If this"},{"line_number":15,"context_line":"periodic task is enabled, it runs at an interval defined by the"}],"source_content_type":"text/x-rst","patch_set":10,"id":"7faddb67_07d2d4d1","line":12,"range":{"start_line":12,"start_character":62,"end_line":12,"end_character":68},"updated":"2019-08-02 15:14:43.000000000","message":"...or strike \"option\"","commit_id":"c7439afb82445bd31ae2555f8f1cf97f8d13f278"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"11ef0f3d4b159e4a73e4b83cfa2423e4840fa118","unresolved":false,"context_lines":[{"line_number":10,"context_line":"the name suggests sync\u0027s the power state values between the ironic database"},{"line_number":11,"context_line":"and the actual hardware. If the value of"},{"line_number":12,"context_line":":oslo.config:option:`conductor.force_power_state_during_sync` option is set to"},{"line_number":13,"context_line":"true the power state in the database will be forced on the hardware and if its"},{"line_number":14,"context_line":"set to false the hardware state will be forced on the database. If this"},{"line_number":15,"context_line":"periodic task is enabled, it runs at an interval defined by the"},{"line_number":16,"context_line":":oslo.config:option:`conductor.sync_power_state_interval` config option for"}],"source_content_type":"text/x-rst","patch_set":10,"id":"7faddb67_c7d7dcbe","line":13,"range":{"start_line":13,"start_character":0,"end_line":13,"end_character":4},"updated":"2019-08-02 15:14:43.000000000","message":"could ``literal`` this","commit_id":"c7439afb82445bd31ae2555f8f1cf97f8d13f278"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"11ef0f3d4b159e4a73e4b83cfa2423e4840fa118","unresolved":false,"context_lines":[{"line_number":10,"context_line":"the name suggests sync\u0027s the power state values between the ironic database"},{"line_number":11,"context_line":"and the actual hardware. If the value of"},{"line_number":12,"context_line":":oslo.config:option:`conductor.force_power_state_during_sync` option is set to"},{"line_number":13,"context_line":"true the power state in the database will be forced on the hardware and if its"},{"line_number":14,"context_line":"set to false the hardware state will be forced on the database. If this"},{"line_number":15,"context_line":"periodic task is enabled, it runs at an interval defined by the"},{"line_number":16,"context_line":":oslo.config:option:`conductor.sync_power_state_interval` config option for"}],"source_content_type":"text/x-rst","patch_set":10,"id":"7faddb67_27f27071","line":13,"range":{"start_line":13,"start_character":75,"end_line":13,"end_character":78},"updated":"2019-08-02 15:14:43.000000000","message":"it is","commit_id":"c7439afb82445bd31ae2555f8f1cf97f8d13f278"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"21cb3af296912eed454250ab5098dbb9abaddebf","unresolved":false,"context_lines":[{"line_number":10,"context_line":"the name suggests sync\u0027s the power state values between the ironic database"},{"line_number":11,"context_line":"and the actual hardware. If the value of"},{"line_number":12,"context_line":":oslo.config:option:`conductor.force_power_state_during_sync` option is set to"},{"line_number":13,"context_line":"true the power state in the database will be forced on the hardware and if its"},{"line_number":14,"context_line":"set to false the hardware state will be forced on the database. If this"},{"line_number":15,"context_line":"periodic task is enabled, it runs at an interval defined by the"},{"line_number":16,"context_line":":oslo.config:option:`conductor.sync_power_state_interval` config option for"}],"source_content_type":"text/x-rst","patch_set":10,"id":"7faddb67_06d88450","line":13,"range":{"start_line":13,"start_character":75,"end_line":13,"end_character":78},"in_reply_to":"7faddb67_27f27071","updated":"2019-08-05 16:04:44.000000000","message":"Done","commit_id":"c7439afb82445bd31ae2555f8f1cf97f8d13f278"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"21cb3af296912eed454250ab5098dbb9abaddebf","unresolved":false,"context_lines":[{"line_number":10,"context_line":"the name suggests sync\u0027s the power state values between the ironic database"},{"line_number":11,"context_line":"and the actual hardware. If the value of"},{"line_number":12,"context_line":":oslo.config:option:`conductor.force_power_state_during_sync` option is set to"},{"line_number":13,"context_line":"true the power state in the database will be forced on the hardware and if its"},{"line_number":14,"context_line":"set to false the hardware state will be forced on the database. If this"},{"line_number":15,"context_line":"periodic task is enabled, it runs at an interval defined by the"},{"line_number":16,"context_line":":oslo.config:option:`conductor.sync_power_state_interval` config option for"}],"source_content_type":"text/x-rst","patch_set":10,"id":"7faddb67_a6dad047","line":13,"range":{"start_line":13,"start_character":0,"end_line":13,"end_character":4},"in_reply_to":"7faddb67_c7d7dcbe","updated":"2019-08-05 16:04:44.000000000","message":"Done","commit_id":"c7439afb82445bd31ae2555f8f1cf97f8d13f278"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"11ef0f3d4b159e4a73e4b83cfa2423e4840fa118","unresolved":false,"context_lines":[{"line_number":11,"context_line":"and the actual hardware. If the value of"},{"line_number":12,"context_line":":oslo.config:option:`conductor.force_power_state_during_sync` option is set to"},{"line_number":13,"context_line":"true the power state in the database will be forced on the hardware and if its"},{"line_number":14,"context_line":"set to false the hardware state will be forced on the database. If this"},{"line_number":15,"context_line":"periodic task is enabled, it runs at an interval defined by the"},{"line_number":16,"context_line":":oslo.config:option:`conductor.sync_power_state_interval` config option for"},{"line_number":17,"context_line":"those nodes which are not in maintenance."}],"source_content_type":"text/x-rst","patch_set":10,"id":"7faddb67_07ebb477","line":14,"range":{"start_line":14,"start_character":7,"end_line":14,"end_character":12},"updated":"2019-08-02 15:14:43.000000000","message":"``false``","commit_id":"c7439afb82445bd31ae2555f8f1cf97f8d13f278"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"21cb3af296912eed454250ab5098dbb9abaddebf","unresolved":false,"context_lines":[{"line_number":11,"context_line":"and the actual hardware. If the value of"},{"line_number":12,"context_line":":oslo.config:option:`conductor.force_power_state_during_sync` option is set to"},{"line_number":13,"context_line":"true the power state in the database will be forced on the hardware and if its"},{"line_number":14,"context_line":"set to false the hardware state will be forced on the database. If this"},{"line_number":15,"context_line":"periodic task is enabled, it runs at an interval defined by the"},{"line_number":16,"context_line":":oslo.config:option:`conductor.sync_power_state_interval` config option for"},{"line_number":17,"context_line":"those nodes which are not in maintenance."}],"source_content_type":"text/x-rst","patch_set":10,"id":"7faddb67_86e31405","line":14,"range":{"start_line":14,"start_character":7,"end_line":14,"end_character":12},"in_reply_to":"7faddb67_07ebb477","updated":"2019-08-05 16:04:44.000000000","message":"Done","commit_id":"c7439afb82445bd31ae2555f8f1cf97f8d13f278"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"11ef0f3d4b159e4a73e4b83cfa2423e4840fa118","unresolved":false,"context_lines":[{"line_number":13,"context_line":"true the power state in the database will be forced on the hardware and if its"},{"line_number":14,"context_line":"set to false the hardware state will be forced on the database. If this"},{"line_number":15,"context_line":"periodic task is enabled, it runs at an interval defined by the"},{"line_number":16,"context_line":":oslo.config:option:`conductor.sync_power_state_interval` config option for"},{"line_number":17,"context_line":"those nodes which are not in maintenance."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Nova-Ironic Power Sync"}],"source_content_type":"text/x-rst","patch_set":10,"id":"7faddb67_a78ae0bb","line":16,"range":{"start_line":16,"start_character":31,"end_line":16,"end_character":56},"updated":"2019-08-02 15:14:43.000000000","message":"tbc, this is an ironic option that happens to have the same name as the nova one [1], right?\n\n[Later] Okay, I found it, it existed before this patch ✔\n\n[1] https://docs.openstack.org/nova/latest/configuration/config.html#DEFAULT.sync_power_state_interval","commit_id":"c7439afb82445bd31ae2555f8f1cf97f8d13f278"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"21cb3af296912eed454250ab5098dbb9abaddebf","unresolved":false,"context_lines":[{"line_number":13,"context_line":"true the power state in the database will be forced on the hardware and if its"},{"line_number":14,"context_line":"set to false the hardware state will be forced on the database. If this"},{"line_number":15,"context_line":"periodic task is enabled, it runs at an interval defined by the"},{"line_number":16,"context_line":":oslo.config:option:`conductor.sync_power_state_interval` config option for"},{"line_number":17,"context_line":"those nodes which are not in maintenance."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Nova-Ironic Power Sync"}],"source_content_type":"text/x-rst","patch_set":10,"id":"7faddb67_26eee0ec","line":16,"range":{"start_line":16,"start_character":31,"end_line":16,"end_character":56},"in_reply_to":"7faddb67_a78ae0bb","updated":"2019-08-05 16:04:44.000000000","message":"Done","commit_id":"c7439afb82445bd31ae2555f8f1cf97f8d13f278"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"11ef0f3d4b159e4a73e4b83cfa2423e4840fa118","unresolved":false,"context_lines":[{"line_number":19,"context_line":"Nova-Ironic Power Sync"},{"line_number":20,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":21,"context_line":"There is a periodic task called ``_sync_power_states`` which runs on the"},{"line_number":22,"context_line":"``nova-compute`` service which also sync\u0027s the power state between the nova"},{"line_number":23,"context_line":"database and the compute driver. If enabled, it runs at an interval defined by"},{"line_number":24,"context_line":"the `sync_power_state_interval` config option on the nova end. In case of the"},{"line_number":25,"context_line":"compute driver being the ironic driver, this sync will happen between the nova"}],"source_content_type":"text/x-rst","patch_set":10,"id":"7faddb67_8779e4c5","line":22,"range":{"start_line":22,"start_character":36,"end_line":22,"end_character":42},"updated":"2019-08-02 15:14:43.000000000","message":"syncs","commit_id":"c7439afb82445bd31ae2555f8f1cf97f8d13f278"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"21cb3af296912eed454250ab5098dbb9abaddebf","unresolved":false,"context_lines":[{"line_number":19,"context_line":"Nova-Ironic Power Sync"},{"line_number":20,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":21,"context_line":"There is a periodic task called ``_sync_power_states`` which runs on the"},{"line_number":22,"context_line":"``nova-compute`` service which also sync\u0027s the power state between the nova"},{"line_number":23,"context_line":"database and the compute driver. If enabled, it runs at an interval defined by"},{"line_number":24,"context_line":"the `sync_power_state_interval` config option on the nova end. In case of the"},{"line_number":25,"context_line":"compute driver being the ironic driver, this sync will happen between the nova"}],"source_content_type":"text/x-rst","patch_set":10,"id":"7faddb67_e6bd28d8","line":22,"range":{"start_line":22,"start_character":36,"end_line":22,"end_character":42},"in_reply_to":"7faddb67_8779e4c5","updated":"2019-08-05 16:04:44.000000000","message":"Done","commit_id":"c7439afb82445bd31ae2555f8f1cf97f8d13f278"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"11ef0f3d4b159e4a73e4b83cfa2423e4840fa118","unresolved":false,"context_lines":[{"line_number":43,"context_line":"truth thus preventing nova from forcing wrong power states on the instance"},{"line_number":44,"context_line":"during the nova-ironic periodic sync. It also adds the possibility of bringing"},{"line_number":45,"context_line":"up/down a physical instance through the ironic API even if it was put down/up"},{"line_number":46,"context_line":"through the nova API. This change introduces a dependency on"},{"line_number":47,"context_line":"``keystoneauth1`` version 3.15.0 or greater to send the power state change"},{"line_number":48,"context_line":"callbacks to nova and perform the required power updates. This also requires"},{"line_number":49,"context_line":"the ``[nova]`` section and the necessary authentication options to be defined"},{"line_number":50,"context_line":"in the ironic configuration. If it is not configured ironic will not be able to"}],"source_content_type":"text/x-rst","patch_set":10,"id":"7faddb67_672ce8ab","line":47,"range":{"start_line":46,"start_character":22,"end_line":47,"end_character":43},"updated":"2019-08-02 15:14:43.000000000","message":"Not sure it\u0027s really necessary to mention this in an admin doc, is it?","commit_id":"c7439afb82445bd31ae2555f8f1cf97f8d13f278"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"21cb3af296912eed454250ab5098dbb9abaddebf","unresolved":false,"context_lines":[{"line_number":43,"context_line":"truth thus preventing nova from forcing wrong power states on the instance"},{"line_number":44,"context_line":"during the nova-ironic periodic sync. It also adds the possibility of bringing"},{"line_number":45,"context_line":"up/down a physical instance through the ironic API even if it was put down/up"},{"line_number":46,"context_line":"through the nova API. This change introduces a dependency on"},{"line_number":47,"context_line":"``keystoneauth1`` version 3.15.0 or greater to send the power state change"},{"line_number":48,"context_line":"callbacks to nova and perform the required power updates. This also requires"},{"line_number":49,"context_line":"the ``[nova]`` section and the necessary authentication options to be defined"},{"line_number":50,"context_line":"in the ironic configuration. If it is not configured ironic will not be able to"}],"source_content_type":"text/x-rst","patch_set":10,"id":"7faddb67_c6b6ecf9","line":47,"range":{"start_line":46,"start_character":22,"end_line":47,"end_character":43},"in_reply_to":"7faddb67_672ce8ab","updated":"2019-08-05 16:04:44.000000000","message":"Done","commit_id":"c7439afb82445bd31ae2555f8f1cf97f8d13f278"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"11ef0f3d4b159e4a73e4b83cfa2423e4840fa118","unresolved":false,"context_lines":[{"line_number":45,"context_line":"up/down a physical instance through the ironic API even if it was put down/up"},{"line_number":46,"context_line":"through the nova API. This change introduces a dependency on"},{"line_number":47,"context_line":"``keystoneauth1`` version 3.15.0 or greater to send the power state change"},{"line_number":48,"context_line":"callbacks to nova and perform the required power updates. This also requires"},{"line_number":49,"context_line":"the ``[nova]`` section and the necessary authentication options to be defined"},{"line_number":50,"context_line":"in the ironic configuration. If it is not configured ironic will not be able to"},{"line_number":51,"context_line":"send events to nova and it will fallback to the behaviour of nova forcing power"},{"line_number":52,"context_line":"states on ironic during the power sync."},{"line_number":53,"context_line":""}],"source_content_type":"text/x-rst","patch_set":10,"id":"7faddb67_471f6c6b","line":50,"range":{"start_line":48,"start_character":68,"end_line":50,"end_character":27},"updated":"2019-08-02 15:14:43.000000000","message":"This is good though.","commit_id":"c7439afb82445bd31ae2555f8f1cf97f8d13f278"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"21cb3af296912eed454250ab5098dbb9abaddebf","unresolved":false,"context_lines":[{"line_number":45,"context_line":"up/down a physical instance through the ironic API even if it was put down/up"},{"line_number":46,"context_line":"through the nova API. This change introduces a dependency on"},{"line_number":47,"context_line":"``keystoneauth1`` version 3.15.0 or greater to send the power state change"},{"line_number":48,"context_line":"callbacks to nova and perform the required power updates. This also requires"},{"line_number":49,"context_line":"the ``[nova]`` section and the necessary authentication options to be defined"},{"line_number":50,"context_line":"in the ironic configuration. If it is not configured ironic will not be able to"},{"line_number":51,"context_line":"send events to nova and it will fallback to the behaviour of nova forcing power"},{"line_number":52,"context_line":"states on ironic during the power sync."},{"line_number":53,"context_line":""}],"source_content_type":"text/x-rst","patch_set":10,"id":"7faddb67_06a644c2","line":50,"range":{"start_line":48,"start_character":68,"end_line":50,"end_character":27},"in_reply_to":"7faddb67_471f6c6b","updated":"2019-08-05 16:04:44.000000000","message":"Done","commit_id":"c7439afb82445bd31ae2555f8f1cf97f8d13f278"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"11ef0f3d4b159e4a73e4b83cfa2423e4840fa118","unresolved":false,"context_lines":[{"line_number":48,"context_line":"callbacks to nova and perform the required power updates. This also requires"},{"line_number":49,"context_line":"the ``[nova]`` section and the necessary authentication options to be defined"},{"line_number":50,"context_line":"in the ironic configuration. If it is not configured ironic will not be able to"},{"line_number":51,"context_line":"send events to nova and it will fallback to the behaviour of nova forcing power"},{"line_number":52,"context_line":"states on ironic during the power sync."},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"In case of ironic stand alone deployments where there is no nova running, the"}],"source_content_type":"text/x-rst","patch_set":10,"id":"7faddb67_87524434","line":51,"range":{"start_line":51,"start_character":32,"end_line":51,"end_character":40},"updated":"2019-08-02 15:14:43.000000000","message":"fall back","commit_id":"c7439afb82445bd31ae2555f8f1cf97f8d13f278"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"21cb3af296912eed454250ab5098dbb9abaddebf","unresolved":false,"context_lines":[{"line_number":48,"context_line":"callbacks to nova and perform the required power updates. This also requires"},{"line_number":49,"context_line":"the ``[nova]`` section and the necessary authentication options to be defined"},{"line_number":50,"context_line":"in the ironic configuration. If it is not configured ironic will not be able to"},{"line_number":51,"context_line":"send events to nova and it will fallback to the behaviour of nova forcing power"},{"line_number":52,"context_line":"states on ironic during the power sync."},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"In case of ironic stand alone deployments where there is no nova running, the"}],"source_content_type":"text/x-rst","patch_set":10,"id":"7faddb67_a6a8908b","line":51,"range":{"start_line":51,"start_character":32,"end_line":51,"end_character":40},"in_reply_to":"7faddb67_87524434","updated":"2019-08-05 16:04:44.000000000","message":"Done","commit_id":"c7439afb82445bd31ae2555f8f1cf97f8d13f278"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"11ef0f3d4b159e4a73e4b83cfa2423e4840fa118","unresolved":false,"context_lines":[{"line_number":52,"context_line":"states on ironic during the power sync."},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"In case of ironic stand alone deployments where there is no nova running, the"},{"line_number":55,"context_line":"`nova.send_power_notifications` config option should be set to False to disable"},{"line_number":56,"context_line":"power state change callbacks to nova."},{"line_number":57,"context_line":""},{"line_number":58,"context_line":".. note::"}],"source_content_type":"text/x-rst","patch_set":10,"id":"7faddb67_32be30d5","line":55,"range":{"start_line":55,"start_character":0,"end_line":55,"end_character":31},"updated":"2019-08-02 15:14:43.000000000","message":":oslo.config:option:`...`","commit_id":"c7439afb82445bd31ae2555f8f1cf97f8d13f278"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"11ef0f3d4b159e4a73e4b83cfa2423e4840fa118","unresolved":false,"context_lines":[{"line_number":52,"context_line":"states on ironic during the power sync."},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"In case of ironic stand alone deployments where there is no nova running, the"},{"line_number":55,"context_line":"`nova.send_power_notifications` config option should be set to False to disable"},{"line_number":56,"context_line":"power state change callbacks to nova."},{"line_number":57,"context_line":""},{"line_number":58,"context_line":".. note::"}],"source_content_type":"text/x-rst","patch_set":10,"id":"7faddb67_f2b3b808","line":55,"range":{"start_line":55,"start_character":63,"end_line":55,"end_character":68},"updated":"2019-08-02 15:14:43.000000000","message":"``False``","commit_id":"c7439afb82445bd31ae2555f8f1cf97f8d13f278"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"21cb3af296912eed454250ab5098dbb9abaddebf","unresolved":false,"context_lines":[{"line_number":52,"context_line":"states on ironic during the power sync."},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"In case of ironic stand alone deployments where there is no nova running, the"},{"line_number":55,"context_line":"`nova.send_power_notifications` config option should be set to False to disable"},{"line_number":56,"context_line":"power state change callbacks to nova."},{"line_number":57,"context_line":""},{"line_number":58,"context_line":".. note::"}],"source_content_type":"text/x-rst","patch_set":10,"id":"7faddb67_46d3dc01","line":55,"range":{"start_line":55,"start_character":0,"end_line":55,"end_character":31},"in_reply_to":"7faddb67_32be30d5","updated":"2019-08-05 16:04:44.000000000","message":"Done","commit_id":"c7439afb82445bd31ae2555f8f1cf97f8d13f278"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"21cb3af296912eed454250ab5098dbb9abaddebf","unresolved":false,"context_lines":[{"line_number":52,"context_line":"states on ironic during the power sync."},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"In case of ironic stand alone deployments where there is no nova running, the"},{"line_number":55,"context_line":"`nova.send_power_notifications` config option should be set to False to disable"},{"line_number":56,"context_line":"power state change callbacks to nova."},{"line_number":57,"context_line":""},{"line_number":58,"context_line":".. note::"}],"source_content_type":"text/x-rst","patch_set":10,"id":"7faddb67_060ba48d","line":55,"range":{"start_line":55,"start_character":63,"end_line":55,"end_character":68},"in_reply_to":"7faddb67_f2b3b808","updated":"2019-08-05 16:04:44.000000000","message":"Done","commit_id":"c7439afb82445bd31ae2555f8f1cf97f8d13f278"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"11ef0f3d4b159e4a73e4b83cfa2423e4840fa118","unresolved":false,"context_lines":[{"line_number":57,"context_line":""},{"line_number":58,"context_line":".. note::"},{"line_number":59,"context_line":"    Ironic only sends requests to nova if the target power state is"},{"line_number":60,"context_line":"    \"power on\" and current state is \"power off\" or  if the target power state"},{"line_number":61,"context_line":"    is \"power off\" and current state is \"power on\". Other error and None states"},{"line_number":62,"context_line":"    will be ignored. In situations where the power state change is originally"},{"line_number":63,"context_line":"    coming from nova, the event will still be created and sent to nova and on"}],"source_content_type":"text/x-rst","patch_set":10,"id":"7faddb67_c70a7c24","line":60,"range":{"start_line":60,"start_character":50,"end_line":60,"end_character":52},"updated":"2019-08-02 15:14:43.000000000","message":"double space","commit_id":"c7439afb82445bd31ae2555f8f1cf97f8d13f278"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"21cb3af296912eed454250ab5098dbb9abaddebf","unresolved":false,"context_lines":[{"line_number":57,"context_line":""},{"line_number":58,"context_line":".. note::"},{"line_number":59,"context_line":"    Ironic only sends requests to nova if the target power state is"},{"line_number":60,"context_line":"    \"power on\" and current state is \"power off\" or  if the target power state"},{"line_number":61,"context_line":"    is \"power off\" and current state is \"power on\". Other error and None states"},{"line_number":62,"context_line":"    will be ignored. In situations where the power state change is originally"},{"line_number":63,"context_line":"    coming from nova, the event will still be created and sent to nova and on"}],"source_content_type":"text/x-rst","patch_set":10,"id":"7faddb67_a6fdf06e","line":60,"range":{"start_line":60,"start_character":50,"end_line":60,"end_character":52},"in_reply_to":"7faddb67_c70a7c24","updated":"2019-08-05 16:04:44.000000000","message":"Done","commit_id":"c7439afb82445bd31ae2555f8f1cf97f8d13f278"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"11ef0f3d4b159e4a73e4b83cfa2423e4840fa118","unresolved":false,"context_lines":[{"line_number":58,"context_line":".. note::"},{"line_number":59,"context_line":"    Ironic only sends requests to nova if the target power state is"},{"line_number":60,"context_line":"    \"power on\" and current state is \"power off\" or  if the target power state"},{"line_number":61,"context_line":"    is \"power off\" and current state is \"power on\". Other error and None states"},{"line_number":62,"context_line":"    will be ignored. In situations where the power state change is originally"},{"line_number":63,"context_line":"    coming from nova, the event will still be created and sent to nova and on"},{"line_number":64,"context_line":"    the nova side it will be a no-op with a debug log saying the node is"}],"source_content_type":"text/x-rst","patch_set":10,"id":"7faddb67_6705c813","line":61,"range":{"start_line":61,"start_character":68,"end_line":61,"end_character":72},"updated":"2019-08-02 15:14:43.000000000","message":"``None``","commit_id":"c7439afb82445bd31ae2555f8f1cf97f8d13f278"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"21cb3af296912eed454250ab5098dbb9abaddebf","unresolved":false,"context_lines":[{"line_number":58,"context_line":".. note::"},{"line_number":59,"context_line":"    Ironic only sends requests to nova if the target power state is"},{"line_number":60,"context_line":"    \"power on\" and current state is \"power off\" or  if the target power state"},{"line_number":61,"context_line":"    is \"power off\" and current state is \"power on\". Other error and None states"},{"line_number":62,"context_line":"    will be ignored. In situations where the power state change is originally"},{"line_number":63,"context_line":"    coming from nova, the event will still be created and sent to nova and on"},{"line_number":64,"context_line":"    the nova side it will be a no-op with a debug log saying the node is"}],"source_content_type":"text/x-rst","patch_set":10,"id":"7faddb67_c6002c69","line":61,"range":{"start_line":61,"start_character":68,"end_line":61,"end_character":72},"in_reply_to":"7faddb67_6705c813","updated":"2019-08-05 16:04:44.000000000","message":"Done","commit_id":"c7439afb82445bd31ae2555f8f1cf97f8d13f278"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"11ef0f3d4b159e4a73e4b83cfa2423e4840fa118","unresolved":false,"context_lines":[{"line_number":66,"context_line":""},{"line_number":67,"context_line":".. note::"},{"line_number":68,"context_line":"    Although an exclusive lock (task_manager.upgrade_lock() method) is used"},{"line_number":69,"context_line":"    when sending events to nova,there can still be a race condition if the"},{"line_number":70,"context_line":"    ``nova-ironic`` power sync happens to happen a nano-second before the"},{"line_number":71,"context_line":"    power state change event is received from ironic in which case the nova"},{"line_number":72,"context_line":"    state will be forced on the node."}],"source_content_type":"text/x-rst","patch_set":10,"id":"7faddb67_32015006","line":69,"range":{"start_line":69,"start_character":31,"end_line":69,"end_character":32},"updated":"2019-08-02 15:14:43.000000000","message":"put that extra space here","commit_id":"c7439afb82445bd31ae2555f8f1cf97f8d13f278"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"21cb3af296912eed454250ab5098dbb9abaddebf","unresolved":false,"context_lines":[{"line_number":66,"context_line":""},{"line_number":67,"context_line":".. note::"},{"line_number":68,"context_line":"    Although an exclusive lock (task_manager.upgrade_lock() method) is used"},{"line_number":69,"context_line":"    when sending events to nova,there can still be a race condition if the"},{"line_number":70,"context_line":"    ``nova-ironic`` power sync happens to happen a nano-second before the"},{"line_number":71,"context_line":"    power state change event is received from ironic in which case the nova"},{"line_number":72,"context_line":"    state will be forced on the node."}],"source_content_type":"text/x-rst","patch_set":10,"id":"7faddb67_66fb7878","line":69,"range":{"start_line":69,"start_character":31,"end_line":69,"end_character":32},"in_reply_to":"7faddb67_32015006","updated":"2019-08-05 16:04:44.000000000","message":"yes sir!","commit_id":"c7439afb82445bd31ae2555f8f1cf97f8d13f278"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"c6267fcbe6b8e2f0216edd64bf98e36a04a92418","unresolved":false,"context_lines":[{"line_number":1,"context_line":".. _power-sync:"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":4,"context_line":"Power Sync"}],"source_content_type":"text/x-rst","patch_set":11,"id":"7faddb67_29ac3334","line":1,"updated":"2019-08-08 08:13:57.000000000","message":"this is not needed, any document can be referred to as :doc:`/admin/power-sync`","commit_id":"121145f251b82940a5b47233dc51317d612f0d7f"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"57225e5c222da8f5f93c96f3f31097055917f6b3","unresolved":false,"context_lines":[{"line_number":1,"context_line":".. _power-sync:"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":4,"context_line":"Power Sync"}],"source_content_type":"text/x-rst","patch_set":11,"id":"7faddb67_1e4accab","line":1,"in_reply_to":"7faddb67_29ac3334","updated":"2019-08-08 12:38:42.000000000","message":"ack, makes sense since it also not used anywhere for reference yet.","commit_id":"121145f251b82940a5b47233dc51317d612f0d7f"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"c6267fcbe6b8e2f0216edd64bf98e36a04a92418","unresolved":false,"context_lines":[{"line_number":1,"context_line":".. _power-sync:"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":4,"context_line":"Power Sync"},{"line_number":5,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Ironic Power Sync"}],"source_content_type":"text/x-rst","patch_set":11,"id":"7faddb67_c9a8ff21","line":4,"updated":"2019-08-08 08:13:57.000000000","message":"\"Power Sync with the Compute Service\"","commit_id":"121145f251b82940a5b47233dc51317d612f0d7f"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"57225e5c222da8f5f93c96f3f31097055917f6b3","unresolved":false,"context_lines":[{"line_number":1,"context_line":".. _power-sync:"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":4,"context_line":"Power Sync"},{"line_number":5,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Ironic Power Sync"}],"source_content_type":"text/x-rst","patch_set":11,"id":"7faddb67_3ed8e8ee","line":4,"in_reply_to":"7faddb67_c9a8ff21","updated":"2019-08-08 12:38:42.000000000","message":"Done","commit_id":"121145f251b82940a5b47233dc51317d612f0d7f"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"c6267fcbe6b8e2f0216edd64bf98e36a04a92418","unresolved":false,"context_lines":[{"line_number":5,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Ironic Power Sync"},{"line_number":8,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":9,"context_line":"Ironic conductor runs a periodic task called ``_sync_power_states`` which as"},{"line_number":10,"context_line":"the name suggests syncs the power state values between the ironic database"},{"line_number":11,"context_line":"and the actual hardware. If the value of the"}],"source_content_type":"text/x-rst","patch_set":11,"id":"7faddb67_e9a5bb48","line":8,"updated":"2019-08-08 08:13:57.000000000","message":"too many \u003d","commit_id":"121145f251b82940a5b47233dc51317d612f0d7f"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"57225e5c222da8f5f93c96f3f31097055917f6b3","unresolved":false,"context_lines":[{"line_number":5,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Ironic Power Sync"},{"line_number":8,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":9,"context_line":"Ironic conductor runs a periodic task called ``_sync_power_states`` which as"},{"line_number":10,"context_line":"the name suggests syncs the power state values between the ironic database"},{"line_number":11,"context_line":"and the actual hardware. If the value of the"}],"source_content_type":"text/x-rst","patch_set":11,"id":"7faddb67_9ed31cd6","line":8,"in_reply_to":"7faddb67_e9a5bb48","updated":"2019-08-08 12:38:42.000000000","message":"my bad","commit_id":"121145f251b82940a5b47233dc51317d612f0d7f"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"c6267fcbe6b8e2f0216edd64bf98e36a04a92418","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Ironic Power Sync"},{"line_number":8,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":9,"context_line":"Ironic conductor runs a periodic task called ``_sync_power_states`` which as"},{"line_number":10,"context_line":"the name suggests syncs the power state values between the ironic database"},{"line_number":11,"context_line":"and the actual hardware. If the value of the"},{"line_number":12,"context_line":":oslo.config:option:`conductor.force_power_state_during_sync` option is set to"}],"source_content_type":"text/x-rst","patch_set":11,"id":"7faddb67_8960c70f","line":9,"updated":"2019-08-08 08:13:57.000000000","message":"nit: it would be idea to rewrite this to avoid mentioning specific functions, since this is an operator facing documentation. Something like \"Each Bare Metal conductor process runs a periodic task, synchronizing the power state between its database and the actual hardware.\"","commit_id":"121145f251b82940a5b47233dc51317d612f0d7f"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"57225e5c222da8f5f93c96f3f31097055917f6b3","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Ironic Power Sync"},{"line_number":8,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":9,"context_line":"Ironic conductor runs a periodic task called ``_sync_power_states`` which as"},{"line_number":10,"context_line":"the name suggests syncs the power state values between the ironic database"},{"line_number":11,"context_line":"and the actual hardware. If the value of the"},{"line_number":12,"context_line":":oslo.config:option:`conductor.force_power_state_during_sync` option is set to"}],"source_content_type":"text/x-rst","patch_set":11,"id":"7faddb67_be9298fb","line":9,"in_reply_to":"7faddb67_8960c70f","updated":"2019-08-08 12:38:42.000000000","message":"Done","commit_id":"121145f251b82940a5b47233dc51317d612f0d7f"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"c6267fcbe6b8e2f0216edd64bf98e36a04a92418","unresolved":false,"context_lines":[{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Nova-Ironic Power Sync"},{"line_number":20,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":21,"context_line":"There is a periodic task called ``_sync_power_states`` which runs on the"},{"line_number":22,"context_line":"``nova-compute`` service which also syncs the power state between the nova"},{"line_number":23,"context_line":"database and the compute driver. If enabled, it runs at an interval defined by"},{"line_number":24,"context_line":"the `sync_power_state_interval` config option on the nova end. In case of the"}],"source_content_type":"text/x-rst","patch_set":11,"id":"7faddb67_a965831f","line":21,"updated":"2019-08-08 08:13:57.000000000","message":"similarly here. we can mention configuration options, but let\u0027s avoid task names. also we prefer to use \"Bare Metal service\" instead of \"ironic\", since \"ironic\" is just a code name.","commit_id":"121145f251b82940a5b47233dc51317d612f0d7f"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"57225e5c222da8f5f93c96f3f31097055917f6b3","unresolved":false,"context_lines":[{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Nova-Ironic Power Sync"},{"line_number":20,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":21,"context_line":"There is a periodic task called ``_sync_power_states`` which runs on the"},{"line_number":22,"context_line":"``nova-compute`` service which also syncs the power state between the nova"},{"line_number":23,"context_line":"database and the compute driver. If enabled, it runs at an interval defined by"},{"line_number":24,"context_line":"the `sync_power_state_interval` config option on the nova end. In case of the"}],"source_content_type":"text/x-rst","patch_set":11,"id":"7faddb67_546ee396","line":21,"in_reply_to":"7faddb67_a965831f","updated":"2019-08-08 12:38:42.000000000","message":"Done","commit_id":"121145f251b82940a5b47233dc51317d612f0d7f"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"c6267fcbe6b8e2f0216edd64bf98e36a04a92418","unresolved":false,"context_lines":[{"line_number":31,"context_line":"the nova-ironic power sync, ironic does power state change callbacks to nova"},{"line_number":32,"context_line":"using external events."},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"Power State Change Callbacks to Nova"},{"line_number":35,"context_line":"------------------------------------"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"Whenever there is a change in the power state of a physical instance (example a"}],"source_content_type":"text/x-rst","patch_set":11,"id":"7faddb67_496acfed","line":34,"updated":"2019-08-08 08:13:57.000000000","message":"s/Nova/the Compute Service/ (we prefer to avoid code names in the documentation)\n\nsame everywhere in the text","commit_id":"121145f251b82940a5b47233dc51317d612f0d7f"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"57225e5c222da8f5f93c96f3f31097055917f6b3","unresolved":false,"context_lines":[{"line_number":31,"context_line":"the nova-ironic power sync, ironic does power state change callbacks to nova"},{"line_number":32,"context_line":"using external events."},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"Power State Change Callbacks to Nova"},{"line_number":35,"context_line":"------------------------------------"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"Whenever there is a change in the power state of a physical instance (example a"}],"source_content_type":"text/x-rst","patch_set":11,"id":"7faddb67_d40733c9","line":34,"in_reply_to":"7faddb67_496acfed","updated":"2019-08-08 12:38:42.000000000","message":"Done","commit_id":"121145f251b82940a5b47233dc51317d612f0d7f"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"c6267fcbe6b8e2f0216edd64bf98e36a04a92418","unresolved":false,"context_lines":[{"line_number":37,"context_line":"Whenever there is a change in the power state of a physical instance (example a"},{"line_number":38,"context_line":"\"power on\" or \"power off\" API command is issued or the periodic"},{"line_number":39,"context_line":"``_sync_power_states`` task in the ironic conductor detects a change in power"},{"line_number":40,"context_line":"state) ironic will create and send a ``power-update`` external event to nova"},{"line_number":41,"context_line":"using which nova will update the power state of the instance in its database."},{"line_number":42,"context_line":"By conveying all the power state changes to nova, ironic becomes the source of"},{"line_number":43,"context_line":"truth thus preventing nova from forcing wrong power states on the instance"}],"source_content_type":"text/x-rst","patch_set":11,"id":"7faddb67_696f8bfc","line":40,"updated":"2019-08-08 08:13:57.000000000","message":"ditto, too many technical details, let\u0027s make it high level. \"Whenever the Bare Metal service changes the power state of a node, it can issue a notification to the Compute service\"","commit_id":"121145f251b82940a5b47233dc51317d612f0d7f"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"57225e5c222da8f5f93c96f3f31097055917f6b3","unresolved":false,"context_lines":[{"line_number":37,"context_line":"Whenever there is a change in the power state of a physical instance (example a"},{"line_number":38,"context_line":"\"power on\" or \"power off\" API command is issued or the periodic"},{"line_number":39,"context_line":"``_sync_power_states`` task in the ironic conductor detects a change in power"},{"line_number":40,"context_line":"state) ironic will create and send a ``power-update`` external event to nova"},{"line_number":41,"context_line":"using which nova will update the power state of the instance in its database."},{"line_number":42,"context_line":"By conveying all the power state changes to nova, ironic becomes the source of"},{"line_number":43,"context_line":"truth thus preventing nova from forcing wrong power states on the instance"}],"source_content_type":"text/x-rst","patch_set":11,"id":"7faddb67_2f01903a","line":40,"in_reply_to":"7faddb67_696f8bfc","updated":"2019-08-08 12:38:42.000000000","message":"Done","commit_id":"121145f251b82940a5b47233dc51317d612f0d7f"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"c6267fcbe6b8e2f0216edd64bf98e36a04a92418","unresolved":false,"context_lines":[{"line_number":44,"context_line":"during the nova-ironic periodic sync. It also adds the possibility of bringing"},{"line_number":45,"context_line":"up/down a physical instance through the ironic API even if it was put down/up"},{"line_number":46,"context_line":"through the nova API. This change requires the ``[nova]`` section and the"},{"line_number":47,"context_line":"necessary authentication options to be defined in the ironic configuration."},{"line_number":48,"context_line":"If it is not configured ironic will not be able to send events to nova and it"},{"line_number":49,"context_line":"will fall back to the behaviour of nova forcing power states on ironic during"},{"line_number":50,"context_line":"the power sync."}],"source_content_type":"text/x-rst","patch_set":11,"id":"7faddb67_0974d7cf","line":47,"updated":"2019-08-08 08:13:57.000000000","message":"nit: an example would be handy","commit_id":"121145f251b82940a5b47233dc51317d612f0d7f"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"57225e5c222da8f5f93c96f3f31097055917f6b3","unresolved":false,"context_lines":[{"line_number":44,"context_line":"during the nova-ironic periodic sync. It also adds the possibility of bringing"},{"line_number":45,"context_line":"up/down a physical instance through the ironic API even if it was put down/up"},{"line_number":46,"context_line":"through the nova API. This change requires the ``[nova]`` section and the"},{"line_number":47,"context_line":"necessary authentication options to be defined in the ironic configuration."},{"line_number":48,"context_line":"If it is not configured ironic will not be able to send events to nova and it"},{"line_number":49,"context_line":"will fall back to the behaviour of nova forcing power states on ironic during"},{"line_number":50,"context_line":"the power sync."}],"source_content_type":"text/x-rst","patch_set":11,"id":"7faddb67_b4871713","line":47,"in_reply_to":"7faddb67_0974d7cf","updated":"2019-08-08 12:38:42.000000000","message":"Done","commit_id":"121145f251b82940a5b47233dc51317d612f0d7f"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"c6267fcbe6b8e2f0216edd64bf98e36a04a92418","unresolved":false,"context_lines":[{"line_number":63,"context_line":"    node is already powering on/off."},{"line_number":64,"context_line":""},{"line_number":65,"context_line":".. note::"},{"line_number":66,"context_line":"    Although an exclusive lock (task_manager.upgrade_lock() method) is used"},{"line_number":67,"context_line":"    when sending events to nova, there can still be a race condition if the"},{"line_number":68,"context_line":"    ``nova-ironic`` power sync happens to happen a nano-second before the"},{"line_number":69,"context_line":"    power state change event is received from ironic in which case the nova"}],"source_content_type":"text/x-rst","patch_set":11,"id":"7faddb67_297193df","line":66,"updated":"2019-08-08 08:13:57.000000000","message":"let\u0027s not mention function names","commit_id":"121145f251b82940a5b47233dc51317d612f0d7f"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"57225e5c222da8f5f93c96f3f31097055917f6b3","unresolved":false,"context_lines":[{"line_number":63,"context_line":"    node is already powering on/off."},{"line_number":64,"context_line":""},{"line_number":65,"context_line":".. note::"},{"line_number":66,"context_line":"    Although an exclusive lock (task_manager.upgrade_lock() method) is used"},{"line_number":67,"context_line":"    when sending events to nova, there can still be a race condition if the"},{"line_number":68,"context_line":"    ``nova-ironic`` power sync happens to happen a nano-second before the"},{"line_number":69,"context_line":"    power state change event is received from ironic in which case the nova"}],"source_content_type":"text/x-rst","patch_set":11,"id":"7faddb67_b4bb9773","line":66,"in_reply_to":"7faddb67_297193df","updated":"2019-08-08 12:38:42.000000000","message":"Done","commit_id":"121145f251b82940a5b47233dc51317d612f0d7f"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"7ca20f171b23acf930030d0c5baec37ec000e53d","unresolved":false,"context_lines":[{"line_number":26,"context_line":"node which was put down using the compute service API cannot be brought up"},{"line_number":27,"context_line":"through the baremetal service API since the power sync task will regard the"},{"line_number":28,"context_line":"compute service\u0027s knowledge of the power state as the source of truth. In order"},{"line_number":29,"context_line":"to get around this disadvantage of the ``compute-baremetal`` power sync,"},{"line_number":30,"context_line":"baremetal service does power state change callbacks to the compute service"},{"line_number":31,"context_line":"using external events."},{"line_number":32,"context_line":""}],"source_content_type":"text/x-rst","patch_set":13,"id":"7faddb67_50990877","line":29,"range":{"start_line":29,"start_character":39,"end_line":29,"end_character":60},"updated":"2019-08-08 16:23:20.000000000","message":"Should this actually be a ``literal``? What does it refer to?","commit_id":"f146426aed41b4fbcfe273d364b62087616f1fbb"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"6311db6214b03aa6ddd6e471d0861d1f2d7d3901","unresolved":false,"context_lines":[{"line_number":26,"context_line":"node which was put down using the compute service API cannot be brought up"},{"line_number":27,"context_line":"through the baremetal service API since the power sync task will regard the"},{"line_number":28,"context_line":"compute service\u0027s knowledge of the power state as the source of truth. In order"},{"line_number":29,"context_line":"to get around this disadvantage of the ``compute-baremetal`` power sync,"},{"line_number":30,"context_line":"baremetal service does power state change callbacks to the compute service"},{"line_number":31,"context_line":"using external events."},{"line_number":32,"context_line":""}],"source_content_type":"text/x-rst","patch_set":13,"id":"7faddb67_5866032c","line":29,"range":{"start_line":29,"start_character":39,"end_line":29,"end_character":60},"in_reply_to":"7faddb67_50990877","updated":"2019-08-09 14:04:55.000000000","message":"Need not be, nova-ironic sounded better in my head than compute-baremetal so ended up with a literal. But no biggie, I\u0027ll remove it.","commit_id":"f146426aed41b4fbcfe273d364b62087616f1fbb"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"7ca20f171b23acf930030d0c5baec37ec000e53d","unresolved":false,"context_lines":[{"line_number":39,"context_line":"By conveying all the power state changes to the compute service, the baremetal"},{"line_number":40,"context_line":"service becomes the source of truth thus preventing the compute service from"},{"line_number":41,"context_line":"forcing wrong power states on the physical instance during the"},{"line_number":42,"context_line":"``compute-baremetal`` power sync. It also adds the possibility of bringing"},{"line_number":43,"context_line":"up/down a physical instance through the baremetal service API even if it was"},{"line_number":44,"context_line":"put down/up through the compute service API."},{"line_number":45,"context_line":""}],"source_content_type":"text/x-rst","patch_set":13,"id":"7faddb67_b0815cfe","line":42,"range":{"start_line":42,"start_character":0,"end_line":42,"end_character":21},"updated":"2019-08-08 16:23:20.000000000","message":"ditto","commit_id":"f146426aed41b4fbcfe273d364b62087616f1fbb"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"6311db6214b03aa6ddd6e471d0861d1f2d7d3901","unresolved":false,"context_lines":[{"line_number":39,"context_line":"By conveying all the power state changes to the compute service, the baremetal"},{"line_number":40,"context_line":"service becomes the source of truth thus preventing the compute service from"},{"line_number":41,"context_line":"forcing wrong power states on the physical instance during the"},{"line_number":42,"context_line":"``compute-baremetal`` power sync. It also adds the possibility of bringing"},{"line_number":43,"context_line":"up/down a physical instance through the baremetal service API even if it was"},{"line_number":44,"context_line":"put down/up through the compute service API."},{"line_number":45,"context_line":""}],"source_content_type":"text/x-rst","patch_set":13,"id":"7faddb67_b874d7d1","line":42,"range":{"start_line":42,"start_character":0,"end_line":42,"end_character":21},"in_reply_to":"7faddb67_b0815cfe","updated":"2019-08-09 14:04:55.000000000","message":"Done","commit_id":"f146426aed41b4fbcfe273d364b62087616f1fbb"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"7ca20f171b23acf930030d0c5baec37ec000e53d","unresolved":false,"context_lines":[{"line_number":43,"context_line":"up/down a physical instance through the baremetal service API even if it was"},{"line_number":44,"context_line":"put down/up through the compute service API."},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"This change requires the ``[nova]`` section and the necessary authentication"},{"line_number":47,"context_line":"options like the ``auth_url`` to be defined in the configuration file of the"},{"line_number":48,"context_line":"baremetal service. If it is not configured the baremetal service will not be"},{"line_number":49,"context_line":"able to send notifications to the compute service and it will fall back to the"}],"source_content_type":"text/x-rst","patch_set":13,"id":"7faddb67_30756c33","line":46,"range":{"start_line":46,"start_character":25,"end_line":46,"end_character":35},"updated":"2019-08-08 16:23:20.000000000","message":":oslo.config:group:`nova`","commit_id":"f146426aed41b4fbcfe273d364b62087616f1fbb"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"6311db6214b03aa6ddd6e471d0861d1f2d7d3901","unresolved":false,"context_lines":[{"line_number":43,"context_line":"up/down a physical instance through the baremetal service API even if it was"},{"line_number":44,"context_line":"put down/up through the compute service API."},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"This change requires the ``[nova]`` section and the necessary authentication"},{"line_number":47,"context_line":"options like the ``auth_url`` to be defined in the configuration file of the"},{"line_number":48,"context_line":"baremetal service. If it is not configured the baremetal service will not be"},{"line_number":49,"context_line":"able to send notifications to the compute service and it will fall back to the"}],"source_content_type":"text/x-rst","patch_set":13,"id":"7faddb67_f8432f6b","line":46,"range":{"start_line":46,"start_character":25,"end_line":46,"end_character":35},"in_reply_to":"7faddb67_30756c33","updated":"2019-08-09 14:04:55.000000000","message":"Done","commit_id":"f146426aed41b4fbcfe273d364b62087616f1fbb"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"7ca20f171b23acf930030d0c5baec37ec000e53d","unresolved":false,"context_lines":[{"line_number":44,"context_line":"put down/up through the compute service API."},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"This change requires the ``[nova]`` section and the necessary authentication"},{"line_number":47,"context_line":"options like the ``auth_url`` to be defined in the configuration file of the"},{"line_number":48,"context_line":"baremetal service. If it is not configured the baremetal service will not be"},{"line_number":49,"context_line":"able to send notifications to the compute service and it will fall back to the"},{"line_number":50,"context_line":"behaviour of the compute service forcing power states on the baremetal service"}],"source_content_type":"text/x-rst","patch_set":13,"id":"7faddb67_f08cb42f","line":47,"range":{"start_line":47,"start_character":17,"end_line":47,"end_character":29},"updated":"2019-08-08 16:23:20.000000000","message":":oslo.config:option:`nova.auth_url`","commit_id":"f146426aed41b4fbcfe273d364b62087616f1fbb"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"6311db6214b03aa6ddd6e471d0861d1f2d7d3901","unresolved":false,"context_lines":[{"line_number":44,"context_line":"put down/up through the compute service API."},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"This change requires the ``[nova]`` section and the necessary authentication"},{"line_number":47,"context_line":"options like the ``auth_url`` to be defined in the configuration file of the"},{"line_number":48,"context_line":"baremetal service. If it is not configured the baremetal service will not be"},{"line_number":49,"context_line":"able to send notifications to the compute service and it will fall back to the"},{"line_number":50,"context_line":"behaviour of the compute service forcing power states on the baremetal service"}],"source_content_type":"text/x-rst","patch_set":13,"id":"7faddb67_18496b8a","line":47,"range":{"start_line":47,"start_character":17,"end_line":47,"end_character":29},"in_reply_to":"7faddb67_f08cb42f","updated":"2019-08-09 14:04:55.000000000","message":"Done","commit_id":"f146426aed41b4fbcfe273d364b62087616f1fbb"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"7ca20f171b23acf930030d0c5baec37ec000e53d","unresolved":false,"context_lines":[{"line_number":58,"context_line":""},{"line_number":59,"context_line":".. note::"},{"line_number":60,"context_line":"    The baremetal service sends notifications to the compute service only if"},{"line_number":61,"context_line":"    the target power state    is ``power on`` or ``power off``. Other error"},{"line_number":62,"context_line":"    and ``None`` states will be ignored. In situations where the power state"},{"line_number":63,"context_line":"    change is originally coming from the compute service, the notification"},{"line_number":64,"context_line":"    will still be sent by the baremetal service and it will be a no-op on the"}],"source_content_type":"text/x-rst","patch_set":13,"id":"7faddb67_70a0c492","line":61,"range":{"start_line":61,"start_character":26,"end_line":61,"end_character":30},"updated":"2019-08-08 16:23:20.000000000","message":"extra spaces","commit_id":"f146426aed41b4fbcfe273d364b62087616f1fbb"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"6311db6214b03aa6ddd6e471d0861d1f2d7d3901","unresolved":false,"context_lines":[{"line_number":58,"context_line":""},{"line_number":59,"context_line":".. note::"},{"line_number":60,"context_line":"    The baremetal service sends notifications to the compute service only if"},{"line_number":61,"context_line":"    the target power state    is ``power on`` or ``power off``. Other error"},{"line_number":62,"context_line":"    and ``None`` states will be ignored. In situations where the power state"},{"line_number":63,"context_line":"    change is originally coming from the compute service, the notification"},{"line_number":64,"context_line":"    will still be sent by the baremetal service and it will be a no-op on the"}],"source_content_type":"text/x-rst","patch_set":13,"id":"7faddb67_98547b23","line":61,"range":{"start_line":61,"start_character":26,"end_line":61,"end_character":30},"in_reply_to":"7faddb67_70a0c492","updated":"2019-08-09 14:04:55.000000000","message":"sorry, clearly was distracted when changing this.","commit_id":"f146426aed41b4fbcfe273d364b62087616f1fbb"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"7ca20f171b23acf930030d0c5baec37ec000e53d","unresolved":false,"context_lines":[{"line_number":68,"context_line":".. note::"},{"line_number":69,"context_line":"    Although an exclusive lock is used when sending notifications to the"},{"line_number":70,"context_line":"    compute service, there can still be a race condition if the"},{"line_number":71,"context_line":"    ``compute-baremetal`` power sync happens to happen a nano-second before the"},{"line_number":72,"context_line":"    power state change event is received from the baremetal service in which"},{"line_number":73,"context_line":"    case the power state from compute service\u0027s database will be forced on the"},{"line_number":74,"context_line":"    node."}],"source_content_type":"text/x-rst","patch_set":13,"id":"7faddb67_50a7c8a8","line":71,"range":{"start_line":71,"start_character":4,"end_line":71,"end_character":25},"updated":"2019-08-08 16:23:20.000000000","message":".","commit_id":"f146426aed41b4fbcfe273d364b62087616f1fbb"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"6311db6214b03aa6ddd6e471d0861d1f2d7d3901","unresolved":false,"context_lines":[{"line_number":68,"context_line":".. note::"},{"line_number":69,"context_line":"    Although an exclusive lock is used when sending notifications to the"},{"line_number":70,"context_line":"    compute service, there can still be a race condition if the"},{"line_number":71,"context_line":"    ``compute-baremetal`` power sync happens to happen a nano-second before the"},{"line_number":72,"context_line":"    power state change event is received from the baremetal service in which"},{"line_number":73,"context_line":"    case the power state from compute service\u0027s database will be forced on the"},{"line_number":74,"context_line":"    node."}],"source_content_type":"text/x-rst","patch_set":13,"id":"7faddb67_382f87a8","line":71,"range":{"start_line":71,"start_character":4,"end_line":71,"end_character":25},"in_reply_to":"7faddb67_50a7c8a8","updated":"2019-08-09 14:04:55.000000000","message":"Done","commit_id":"f146426aed41b4fbcfe273d364b62087616f1fbb"}],"ironic/common/nova.py":[{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"204c3543315b4d1dcdef67822b478692ee1dc418","unresolved":false,"context_lines":[{"line_number":38,"context_line":"    return _NOVA_SESSION"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"def _get_nova_client(context, timeout\u003dNone, api_version\u003dNone):"},{"line_number":42,"context_line":"    \"\"\"Returns a Nova client"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    :param context:"}],"source_content_type":"text/x-python","patch_set":4,"id":"9fb8cfa7_cd8fabcb","line":41,"updated":"2019-07-03 13:46:04.000000000","message":"note: It would be better to do this with openstacsdk and raw requests it at all possible, that way python-novaclient shouldn\u0027t need to be loaded.","commit_id":"116e6f2cb22bc5d606563b9c7bf4f66edfc37647"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"2f80bd06429eb4ca154ad016caf7396ca900946c","unresolved":false,"context_lines":[{"line_number":38,"context_line":"    return _NOVA_SESSION"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"def _get_nova_client(context, timeout\u003dNone, api_version\u003dNone):"},{"line_number":42,"context_line":"    \"\"\"Returns a Nova client"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    :param context:"}],"source_content_type":"text/x-python","patch_set":4,"id":"7faddb67_a14c9ec7","line":41,"in_reply_to":"9fb8cfa7_885d21ee","updated":"2019-07-08 09:22:13.000000000","message":"hmm the base raw request for server external events API seems to be unimplemented in sdk atm (https://github.com/openstack/openstacksdk/tree/master/openstack/compute/v2). Since I can only vouch for the novaclient being up to date wrt to microversion and maintenance I will proceed with novaclient.","commit_id":"116e6f2cb22bc5d606563b9c7bf4f66edfc37647"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"bab59c9a010374e03d37abf3878824a23df27ccc","unresolved":false,"context_lines":[{"line_number":38,"context_line":"    return _NOVA_SESSION"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"def _get_nova_client(context, timeout\u003dNone, api_version\u003dNone):"},{"line_number":42,"context_line":"    \"\"\"Returns a Nova client"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    :param context:"}],"source_content_type":"text/x-python","patch_set":4,"id":"9fb8cfa7_885d21ee","line":41,"in_reply_to":"9fb8cfa7_cd8fabcb","updated":"2019-07-03 13:55:55.000000000","message":"good point, I guess I never really thought of sdk (mostly was following the suite of the other client connections from ironic)","commit_id":"116e6f2cb22bc5d606563b9c7bf4f66edfc37647"},{"author":{"_account_id":23851,"name":"Riccardo Pittau","email":"elfosardo@gmail.com","username":"elfosardo"},"change_message_id":"3ae8274293f3ab71bbb8ea61510eef43c29e6d8a","unresolved":false,"context_lines":[{"line_number":44,"context_line":"    :param context:"},{"line_number":45,"context_line":"        request context,"},{"line_number":46,"context_line":"        instance of ironic.common.context.RequestContext"},{"line_number":47,"context_line":"    @param timeout:"},{"line_number":48,"context_line":"        Number of seconds to wait for an answer before raising a"},{"line_number":49,"context_line":"        Timeout exception (None to disable)"},{"line_number":50,"context_line":"    @param api_version:"}],"source_content_type":"text/x-python","patch_set":4,"id":"7faddb67_c6e0f799","line":47,"updated":"2019-07-04 08:01:31.000000000","message":"let\u0027s not use epytext for docstrings :)","commit_id":"116e6f2cb22bc5d606563b9c7bf4f66edfc37647"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"4c675d2277e9668d6ef84521251cdf02ad76a0a8","unresolved":false,"context_lines":[{"line_number":44,"context_line":"    :param context:"},{"line_number":45,"context_line":"        request context,"},{"line_number":46,"context_line":"        instance of ironic.common.context.RequestContext"},{"line_number":47,"context_line":"    @param timeout:"},{"line_number":48,"context_line":"        Number of seconds to wait for an answer before raising a"},{"line_number":49,"context_line":"        Timeout exception (None to disable)"},{"line_number":50,"context_line":"    @param api_version:"}],"source_content_type":"text/x-python","patch_set":4,"id":"7faddb67_29315eed","line":47,"in_reply_to":"7faddb67_c6e0f799","updated":"2019-07-09 15:54:41.000000000","message":"Done","commit_id":"116e6f2cb22bc5d606563b9c7bf4f66edfc37647"},{"author":{"_account_id":10206,"name":"Madhuri Kumari","email":"madhuri.kumari@intel.com","username":"Madhuri"},"change_message_id":"d0002ad484f3b23f656d8e940bbbf49b32f87e54","unresolved":false,"context_lines":[{"line_number":55,"context_line":"    service_auth \u003d keystone.get_auth(\u0027nova\u0027)"},{"line_number":56,"context_line":"    session \u003d _get_nova_session()"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    c \u003d nova_client.Client("},{"line_number":59,"context_line":"        api_versions.APIVersion(api_version or NOVA_API_VERSION),"},{"line_number":60,"context_line":"        auth\u003dservice_auth,"},{"line_number":61,"context_line":"        session\u003dsession,"}],"source_content_type":"text/x-python","patch_set":4,"id":"7faddb67_7b02d9b6","line":58,"range":{"start_line":58,"start_character":4,"end_line":58,"end_character":5},"updated":"2019-07-08 06:19:57.000000000","message":"Let\u0027s use a more meaningful name here.\ns/c/client/","commit_id":"116e6f2cb22bc5d606563b9c7bf4f66edfc37647"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"4c675d2277e9668d6ef84521251cdf02ad76a0a8","unresolved":false,"context_lines":[{"line_number":55,"context_line":"    service_auth \u003d keystone.get_auth(\u0027nova\u0027)"},{"line_number":56,"context_line":"    session \u003d _get_nova_session()"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    c \u003d nova_client.Client("},{"line_number":59,"context_line":"        api_versions.APIVersion(api_version or NOVA_API_VERSION),"},{"line_number":60,"context_line":"        auth\u003dservice_auth,"},{"line_number":61,"context_line":"        session\u003dsession,"}],"source_content_type":"text/x-python","patch_set":4,"id":"7faddb67_6920b6b1","line":58,"range":{"start_line":58,"start_character":4,"end_line":58,"end_character":5},"in_reply_to":"7faddb67_7b02d9b6","updated":"2019-07-09 15:54:41.000000000","message":"\u003e Let\u0027s use a more meaningful name here.\n \u003e s/c/client/\n\nsorry for not making it clear enough that c was client ;)","commit_id":"116e6f2cb22bc5d606563b9c7bf4f66edfc37647"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"4ae8aee9531eeb9e37658277946cff12d1e43166","unresolved":false,"context_lines":[{"line_number":75,"context_line":"            \u0027tag\u0027: target_power_state}"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"def _send_events(context, events, api_version\u003dNone):"},{"line_number":79,"context_line":"    nova \u003d _get_nova_client(context, api_version\u003dapi_version)"},{"line_number":80,"context_line":"    try:"},{"line_number":81,"context_line":"        response \u003d nova.server_external_events.create(events)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9fb8cfa7_0895b188","line":78,"updated":"2019-07-03 13:47:46.000000000","message":"You ought to put a doc string in for this. While it _IS_ a private method, power_update directly calls it and returns it\u0027s return values.","commit_id":"116e6f2cb22bc5d606563b9c7bf4f66edfc37647"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"bab59c9a010374e03d37abf3878824a23df27ccc","unresolved":false,"context_lines":[{"line_number":75,"context_line":"            \u0027tag\u0027: target_power_state}"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"def _send_events(context, events, api_version\u003dNone):"},{"line_number":79,"context_line":"    nova \u003d _get_nova_client(context, api_version\u003dapi_version)"},{"line_number":80,"context_line":"    try:"},{"line_number":81,"context_line":"        response \u003d nova.server_external_events.create(events)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9fb8cfa7_08c3718c","line":78,"in_reply_to":"9fb8cfa7_0895b188","updated":"2019-07-03 13:55:55.000000000","message":"good point. I\u0027ll add a doc string to all the functions.","commit_id":"116e6f2cb22bc5d606563b9c7bf4f66edfc37647"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"4c675d2277e9668d6ef84521251cdf02ad76a0a8","unresolved":false,"context_lines":[{"line_number":75,"context_line":"            \u0027tag\u0027: target_power_state}"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"def _send_events(context, events, api_version\u003dNone):"},{"line_number":79,"context_line":"    nova \u003d _get_nova_client(context, api_version\u003dapi_version)"},{"line_number":80,"context_line":"    try:"},{"line_number":81,"context_line":"        response \u003d nova.server_external_events.create(events)"}],"source_content_type":"text/x-python","patch_set":4,"id":"7faddb67_a9030e73","line":78,"in_reply_to":"9fb8cfa7_08c3718c","updated":"2019-07-09 15:54:41.000000000","message":"Done","commit_id":"116e6f2cb22bc5d606563b9c7bf4f66edfc37647"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"204c3543315b4d1dcdef67822b478692ee1dc418","unresolved":false,"context_lines":[{"line_number":82,"context_line":"    except nova_exceptions.NotFound:"},{"line_number":83,"context_line":"        LOG.warning(\u0027Nova returned NotFound for events: %s.\u0027, events)"},{"line_number":84,"context_line":"        return False"},{"line_number":85,"context_line":"    except Exception:"},{"line_number":86,"context_line":"        LOG.exception(\u0027Failed to notify nova on events: %s.\u0027, events)"},{"line_number":87,"context_line":"        return False"},{"line_number":88,"context_line":"    else:"},{"line_number":89,"context_line":"        if not isinstance(response, list):"},{"line_number":90,"context_line":"            LOG.error(\u0027Error response returned from nova: %s.\u0027, response)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9fb8cfa7_eda5cf48","line":87,"range":{"start_line":85,"start_character":0,"end_line":87,"end_character":20},"updated":"2019-07-03 13:46:04.000000000","message":"I guess this protets for the case where there is no nova. I kind of wonder if we need a configuration knob for this actually.....","commit_id":"116e6f2cb22bc5d606563b9c7bf4f66edfc37647"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"bab59c9a010374e03d37abf3878824a23df27ccc","unresolved":false,"context_lines":[{"line_number":82,"context_line":"    except nova_exceptions.NotFound:"},{"line_number":83,"context_line":"        LOG.warning(\u0027Nova returned NotFound for events: %s.\u0027, events)"},{"line_number":84,"context_line":"        return False"},{"line_number":85,"context_line":"    except Exception:"},{"line_number":86,"context_line":"        LOG.exception(\u0027Failed to notify nova on events: %s.\u0027, events)"},{"line_number":87,"context_line":"        return False"},{"line_number":88,"context_line":"    else:"},{"line_number":89,"context_line":"        if not isinstance(response, list):"},{"line_number":90,"context_line":"            LOG.error(\u0027Error response returned from nova: %s.\u0027, response)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9fb8cfa7_483e498c","line":87,"range":{"start_line":85,"start_character":0,"end_line":87,"end_character":20},"in_reply_to":"9fb8cfa7_eda5cf48","updated":"2019-07-03 13:55:55.000000000","message":"\u003e I guess this protets for the case where there is no nova. I kind of\n \u003e wonder if we need a configuration knob for this actually.....\n\nhmm, you mean under the ironic group of the conf to check if \"do I have nova on\" ?","commit_id":"116e6f2cb22bc5d606563b9c7bf4f66edfc37647"},{"author":{"_account_id":10206,"name":"Madhuri Kumari","email":"madhuri.kumari@intel.com","username":"Madhuri"},"change_message_id":"d0002ad484f3b23f656d8e940bbbf49b32f87e54","unresolved":false,"context_lines":[{"line_number":87,"context_line":"        return False"},{"line_number":88,"context_line":"    else:"},{"line_number":89,"context_line":"        if not isinstance(response, list):"},{"line_number":90,"context_line":"            LOG.error(\u0027Error response returned from nova: %s.\u0027, response)"},{"line_number":91,"context_line":"            return False"},{"line_number":92,"context_line":"        response_error \u003d False"},{"line_number":93,"context_line":"        for event in response:"}],"source_content_type":"text/x-python","patch_set":4,"id":"7faddb67_fb27a963","line":90,"range":{"start_line":90,"start_character":12,"end_line":90,"end_character":73},"updated":"2019-07-08 06:19:57.000000000","message":"The error message should include the details about the error such as including \"expected a list\" or similar.\nWith this error, the issue will not be clear to the users.","commit_id":"116e6f2cb22bc5d606563b9c7bf4f66edfc37647"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"4c675d2277e9668d6ef84521251cdf02ad76a0a8","unresolved":false,"context_lines":[{"line_number":87,"context_line":"        return False"},{"line_number":88,"context_line":"    else:"},{"line_number":89,"context_line":"        if not isinstance(response, list):"},{"line_number":90,"context_line":"            LOG.error(\u0027Error response returned from nova: %s.\u0027, response)"},{"line_number":91,"context_line":"            return False"},{"line_number":92,"context_line":"        response_error \u003d False"},{"line_number":93,"context_line":"        for event in response:"}],"source_content_type":"text/x-python","patch_set":4,"id":"7faddb67_09226201","line":90,"range":{"start_line":90,"start_character":12,"end_line":90,"end_character":73},"in_reply_to":"7faddb67_fb27a963","updated":"2019-07-09 15:54:41.000000000","message":"\u003e The error message should include the details about the error such\n \u003e as including \"expected a list\" or similar.\n \u003e With this error, the issue will not be clear to the users.\n\nsince the response is printed in the LOG error, it is easy to identify what went wrong when it came back from nova.","commit_id":"116e6f2cb22bc5d606563b9c7bf4f66edfc37647"},{"author":{"_account_id":10206,"name":"Madhuri Kumari","email":"madhuri.kumari@intel.com","username":"Madhuri"},"change_message_id":"d0002ad484f3b23f656d8e940bbbf49b32f87e54","unresolved":false,"context_lines":[{"line_number":97,"context_line":"                continue"},{"line_number":98,"context_line":"            if code !\u003d 200:"},{"line_number":99,"context_line":"                LOG.warning("},{"line_number":100,"context_line":"                    \u0027Nova event: %s returned with failed status.\u0027, event)"},{"line_number":101,"context_line":"            else:"},{"line_number":102,"context_line":"                LOG.info(\u0027Nova event response: %s.\u0027, event)"},{"line_number":103,"context_line":"        if response_error:"}],"source_content_type":"text/x-python","patch_set":4,"id":"7faddb67_1b2de542","line":100,"range":{"start_line":100,"start_character":20,"end_line":100,"end_character":73},"updated":"2019-07-08 06:19:57.000000000","message":"Let\u0027s log the return status code or error message.","commit_id":"116e6f2cb22bc5d606563b9c7bf4f66edfc37647"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"4c675d2277e9668d6ef84521251cdf02ad76a0a8","unresolved":false,"context_lines":[{"line_number":97,"context_line":"                continue"},{"line_number":98,"context_line":"            if code !\u003d 200:"},{"line_number":99,"context_line":"                LOG.warning("},{"line_number":100,"context_line":"                    \u0027Nova event: %s returned with failed status.\u0027, event)"},{"line_number":101,"context_line":"            else:"},{"line_number":102,"context_line":"                LOG.info(\u0027Nova event response: %s.\u0027, event)"},{"line_number":103,"context_line":"        if response_error:"}],"source_content_type":"text/x-python","patch_set":4,"id":"7faddb67_e43a8b96","line":100,"range":{"start_line":100,"start_character":20,"end_line":100,"end_character":73},"in_reply_to":"7faddb67_1b2de542","updated":"2019-07-09 15:54:41.000000000","message":"\u003e Let\u0027s log the return status code or error message.\n\nevent here is actually the response, as in response contains the details like code and error message.","commit_id":"116e6f2cb22bc5d606563b9c7bf4f66edfc37647"},{"author":{"_account_id":10206,"name":"Madhuri Kumari","email":"madhuri.kumari@intel.com","username":"Madhuri"},"change_message_id":"d0002ad484f3b23f656d8e940bbbf49b32f87e54","unresolved":false,"context_lines":[{"line_number":99,"context_line":"                LOG.warning("},{"line_number":100,"context_line":"                    \u0027Nova event: %s returned with failed status.\u0027, event)"},{"line_number":101,"context_line":"            else:"},{"line_number":102,"context_line":"                LOG.info(\u0027Nova event response: %s.\u0027, event)"},{"line_number":103,"context_line":"        if response_error:"},{"line_number":104,"context_line":"            LOG.error(\u0027Error response returned from nova: %s.\u0027, response)"},{"line_number":105,"context_line":"            return False"}],"source_content_type":"text/x-python","patch_set":4,"id":"7faddb67_bb213150","line":102,"range":{"start_line":102,"start_character":25,"end_line":102,"end_character":58},"updated":"2019-07-08 06:19:57.000000000","message":"Do you mean to log the response here for the event?\n\nIt\u0027s better to include both the event and the response,","commit_id":"116e6f2cb22bc5d606563b9c7bf4f66edfc37647"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"4c675d2277e9668d6ef84521251cdf02ad76a0a8","unresolved":false,"context_lines":[{"line_number":99,"context_line":"                LOG.warning("},{"line_number":100,"context_line":"                    \u0027Nova event: %s returned with failed status.\u0027, event)"},{"line_number":101,"context_line":"            else:"},{"line_number":102,"context_line":"                LOG.info(\u0027Nova event response: %s.\u0027, event)"},{"line_number":103,"context_line":"        if response_error:"},{"line_number":104,"context_line":"            LOG.error(\u0027Error response returned from nova: %s.\u0027, response)"},{"line_number":105,"context_line":"            return False"}],"source_content_type":"text/x-python","patch_set":4,"id":"7faddb67_046ec794","line":102,"range":{"start_line":102,"start_character":25,"end_line":102,"end_character":58},"in_reply_to":"7faddb67_bb213150","updated":"2019-07-09 15:54:41.000000000","message":"\u003e Do you mean to log the response here for the event?\n \u003e \n \u003e It\u0027s better to include both the event and the response,\n\nresponse already has the event details :), so its the same. If I print both it will be duplication.","commit_id":"116e6f2cb22bc5d606563b9c7bf4f66edfc37647"},{"author":{"_account_id":10206,"name":"Madhuri Kumari","email":"madhuri.kumari@intel.com","username":"Madhuri"},"change_message_id":"d0002ad484f3b23f656d8e940bbbf49b32f87e54","unresolved":false,"context_lines":[{"line_number":101,"context_line":"            else:"},{"line_number":102,"context_line":"                LOG.info(\u0027Nova event response: %s.\u0027, event)"},{"line_number":103,"context_line":"        if response_error:"},{"line_number":104,"context_line":"            LOG.error(\u0027Error response returned from nova: %s.\u0027, response)"},{"line_number":105,"context_line":"            return False"},{"line_number":106,"context_line":"    return True"},{"line_number":107,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"7faddb67_7b1bb91a","line":104,"range":{"start_line":104,"start_character":23,"end_line":104,"end_character":73},"updated":"2019-07-08 06:19:57.000000000","message":"ditto. Include event name as well.","commit_id":"116e6f2cb22bc5d606563b9c7bf4f66edfc37647"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"4c675d2277e9668d6ef84521251cdf02ad76a0a8","unresolved":false,"context_lines":[{"line_number":101,"context_line":"            else:"},{"line_number":102,"context_line":"                LOG.info(\u0027Nova event response: %s.\u0027, event)"},{"line_number":103,"context_line":"        if response_error:"},{"line_number":104,"context_line":"            LOG.error(\u0027Error response returned from nova: %s.\u0027, response)"},{"line_number":105,"context_line":"            return False"},{"line_number":106,"context_line":"    return True"},{"line_number":107,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"7faddb67_c4050fc4","line":104,"range":{"start_line":104,"start_character":23,"end_line":104,"end_character":73},"in_reply_to":"7faddb67_7b1bb91a","updated":"2019-07-09 15:54:41.000000000","message":"ditto.","commit_id":"116e6f2cb22bc5d606563b9c7bf4f66edfc37647"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"4ae8aee9531eeb9e37658277946cff12d1e43166","unresolved":false,"context_lines":[{"line_number":107,"context_line":""},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"def power_update(context, server_uuid, target_power_state):"},{"line_number":110,"context_line":"    \u0027\u0027\u0027Creates and sends power state change for the provided server_uuid.\u0027\u0027\u0027"},{"line_number":111,"context_line":"    api_version \u003d \u00272.74\u0027"},{"line_number":112,"context_line":"    if target_power_state \u003d\u003d states.POWER_ON:"},{"line_number":113,"context_line":"        target_power_state \u003d \"POWER_ON\""}],"source_content_type":"text/x-python","patch_set":4,"id":"9fb8cfa7_c88eb978","line":110,"updated":"2019-07-03 13:47:46.000000000","message":"Please add a multi-line doc string. I get the returned value from the private method below is largely returned just for testing, but it would be good to state in case someone needs to update the code at some point.","commit_id":"116e6f2cb22bc5d606563b9c7bf4f66edfc37647"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"bab59c9a010374e03d37abf3878824a23df27ccc","unresolved":false,"context_lines":[{"line_number":107,"context_line":""},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"def power_update(context, server_uuid, target_power_state):"},{"line_number":110,"context_line":"    \u0027\u0027\u0027Creates and sends power state change for the provided server_uuid.\u0027\u0027\u0027"},{"line_number":111,"context_line":"    api_version \u003d \u00272.74\u0027"},{"line_number":112,"context_line":"    if target_power_state \u003d\u003d states.POWER_ON:"},{"line_number":113,"context_line":"        target_power_state \u003d \"POWER_ON\""}],"source_content_type":"text/x-python","patch_set":4,"id":"9fb8cfa7_883441ae","line":110,"in_reply_to":"9fb8cfa7_c88eb978","updated":"2019-07-03 13:55:55.000000000","message":"Done","commit_id":"116e6f2cb22bc5d606563b9c7bf4f66edfc37647"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ebc20cad3a8c67059905b09681808cbe192b28b5","unresolved":false,"context_lines":[{"line_number":10,"context_line":"# License for the specific language governing permissions and limitations"},{"line_number":11,"context_line":"# under the License."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"from novaclient import api_versions"},{"line_number":14,"context_line":"from novaclient import client as nova_client"},{"line_number":15,"context_line":"from novaclient import exceptions as nova_exceptions"},{"line_number":16,"context_line":"from oslo_log import log"}],"source_content_type":"text/x-python","patch_set":7,"id":"7faddb67_a4935aa3","line":13,"updated":"2019-07-23 20:16:01.000000000","message":"Rather than use novaclient directly (like cinder - which maybe you\u0027ve based this on?), why not use something like keystoneauth1 adapters directly or the openstacksdk? I\u0027m sure efried could talk you into that, or maybe even write it for you. But then you could do some discovery of the service types authority to see if compute even exists in the service catalog in the ironic standalone case, because we can see from these CI results that we\u0027re getting errors in the standalone job:\n\nhttp://logstash.openstack.org/#dashboard/file/logstash.json?query\u003dmessage%3A%5C%22Failed%20to%20notify%20nova%20on%20events%5C%22\u0026from\u003d7d","commit_id":"a8a8c70a529f59cef57fd2d05dac2ca5497a5799"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"85c8632410d606898de545b30bba0ec54bcad8f2","unresolved":false,"context_lines":[{"line_number":10,"context_line":"# License for the specific language governing permissions and limitations"},{"line_number":11,"context_line":"# under the License."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"from novaclient import api_versions"},{"line_number":14,"context_line":"from novaclient import client as nova_client"},{"line_number":15,"context_line":"from novaclient import exceptions as nova_exceptions"},{"line_number":16,"context_line":"from oslo_log import log"}],"source_content_type":"text/x-python","patch_set":7,"id":"7faddb67_9e3e6627","line":13,"in_reply_to":"7faddb67_84541e56","updated":"2019-07-29 11:42:12.000000000","message":"\u003e +1000\n \u003e \n \u003e AFAICT this is the first time you\u0027re calling into nova from ironic.\n \u003e You don\u0027t have any legacy novaclient baggage to maintain, so don\u0027t\n \u003e create any.\n \u003e \n \u003e [Later] I made a start on using ksa Adapter directly [1]. Feel free\n \u003e to squash it in here.\n \u003e \n \u003e [1] https://review.opendev.org/#/c/672369/\n\nthanks a lot Eric!","commit_id":"a8a8c70a529f59cef57fd2d05dac2ca5497a5799"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"f4c93b4cda014142c1a7307faf6075c714a49962","unresolved":false,"context_lines":[{"line_number":10,"context_line":"# License for the specific language governing permissions and limitations"},{"line_number":11,"context_line":"# under the License."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"from novaclient import api_versions"},{"line_number":14,"context_line":"from novaclient import client as nova_client"},{"line_number":15,"context_line":"from novaclient import exceptions as nova_exceptions"},{"line_number":16,"context_line":"from oslo_log import log"}],"source_content_type":"text/x-python","patch_set":7,"id":"7faddb67_84541e56","line":13,"in_reply_to":"7faddb67_a4935aa3","updated":"2019-07-23 21:32:58.000000000","message":"+1000\n\nAFAICT this is the first time you\u0027re calling into nova from ironic. You don\u0027t have any legacy novaclient baggage to maintain, so don\u0027t create any.\n\n[Later] I made a start on using ksa Adapter directly [1]. Feel free to squash it in here.\n\n[1] https://review.opendev.org/#/c/672369/","commit_id":"a8a8c70a529f59cef57fd2d05dac2ca5497a5799"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"5abbdcb9fb09853eb78308325008dea588a06d20","unresolved":false,"context_lines":[{"line_number":89,"context_line":"        considered as a successful send."},{"line_number":90,"context_line":"    \"\"\""},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"    nova \u003d _get_nova_client(context, api_version\u003dapi_version)"},{"line_number":93,"context_line":"    try:"},{"line_number":94,"context_line":"        response \u003d nova.server_external_events.create(events)"},{"line_number":95,"context_line":"    except nova_exceptions.NotFound:"}],"source_content_type":"text/x-python","patch_set":7,"id":"7faddb67_4e92fc58","line":92,"updated":"2019-07-19 11:05:06.000000000","message":"what will happen if nova is not present? I guess we need to move this under the try..except block","commit_id":"a8a8c70a529f59cef57fd2d05dac2ca5497a5799"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"f6d80218784a43b8c186609d715a182a77090680","unresolved":false,"context_lines":[{"line_number":89,"context_line":"        considered as a successful send."},{"line_number":90,"context_line":"    \"\"\""},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"    nova \u003d _get_nova_client(context, api_version\u003dapi_version)"},{"line_number":93,"context_line":"    try:"},{"line_number":94,"context_line":"        response \u003d nova.server_external_events.create(events)"},{"line_number":95,"context_line":"    except nova_exceptions.NotFound:"}],"source_content_type":"text/x-python","patch_set":7,"id":"7faddb67_e0107e52","line":92,"in_reply_to":"7faddb67_4e92fc58","updated":"2019-07-22 08:50:15.000000000","message":"\u003e what will happen if nova is not present? I guess we need to move\n \u003e this under the try..except block\n\nI am going to first test this on stand-alone ironic devstack (if that\u0027s possible) to understand a bit more because I am new to the \"stand-alone\" concept.\n\nSo far what I did test was by commenting out all of the nova config in which case the exception on L95 will catch the keystone \"MissingAuthenticationPlugin\" error saying we failed to notify Nova.\n\nLet me dig a bit more deeper into the standalone scenario i.e without have a nova environment (also maybe I should look at how the other interactions of ironic with cinder/swift/glance etc.. work in the standalone case).","commit_id":"a8a8c70a529f59cef57fd2d05dac2ca5497a5799"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"e6b15c47420100cd810673debe036e9b724a6b2b","unresolved":false,"context_lines":[{"line_number":89,"context_line":"        considered as a successful send."},{"line_number":90,"context_line":"    \"\"\""},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"    nova \u003d _get_nova_client(context, api_version\u003dapi_version)"},{"line_number":93,"context_line":"    try:"},{"line_number":94,"context_line":"        response \u003d nova.server_external_events.create(events)"},{"line_number":95,"context_line":"    except nova_exceptions.NotFound:"}],"source_content_type":"text/x-python","patch_set":7,"id":"7faddb67_16df3a69","line":92,"in_reply_to":"7faddb67_4e92fc58","updated":"2019-07-19 13:40:48.000000000","message":"Oh yeah... that would raise an exception because the keystoneauth1 stuff tries to connect outbound upon initialization. :(","commit_id":"a8a8c70a529f59cef57fd2d05dac2ca5497a5799"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"85c8632410d606898de545b30bba0ec54bcad8f2","unresolved":false,"context_lines":[{"line_number":89,"context_line":"        considered as a successful send."},{"line_number":90,"context_line":"    \"\"\""},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"    nova \u003d _get_nova_client(context, api_version\u003dapi_version)"},{"line_number":93,"context_line":"    try:"},{"line_number":94,"context_line":"        response \u003d nova.server_external_events.create(events)"},{"line_number":95,"context_line":"    except nova_exceptions.NotFound:"}],"source_content_type":"text/x-python","patch_set":7,"id":"7faddb67_be39e23f","line":92,"in_reply_to":"7faddb67_e0107e52","updated":"2019-07-29 11:42:12.000000000","message":"As discussed with dmitry on IRC (http://eavesdrop.openstack.org/irclogs/%23openstack-ironic/%23openstack-ironic.2019-07-26.log.html#t2019-07-26T13:27:10), we will put in a new config that can be disabled for the standalone case. By default it will be enabled.","commit_id":"a8a8c70a529f59cef57fd2d05dac2ca5497a5799"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4f511745df526a1510ee7d2087afa848f53f40c2","unresolved":false,"context_lines":[{"line_number":135,"context_line":"        successfully (mainly for testing purposes)."},{"line_number":136,"context_line":"    \"\"\""},{"line_number":137,"context_line":""},{"line_number":138,"context_line":"    api_version \u003d \u00272.74\u0027"},{"line_number":139,"context_line":"    if target_power_state \u003d\u003d states.POWER_ON:"},{"line_number":140,"context_line":"        target_power_state \u003d \"POWER_ON\""},{"line_number":141,"context_line":"    elif target_power_state \u003d\u003d states.POWER_OFF:"}],"source_content_type":"text/x-python","patch_set":7,"id":"7faddb67_d0b978e9","line":138,"updated":"2019-07-23 16:36:55.000000000","message":"This should be 2.75 now. We should have some CI testing for this, which I think we can do with a DNM patch on top of this in the series which adds python-novaclient to the required-projects section of .zuul.yaml so we pull in the dependent novaclient change from source.","commit_id":"a8a8c70a529f59cef57fd2d05dac2ca5497a5799"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f59b48754d667754fd76846f4b1862a80cf67c1e","unresolved":false,"context_lines":[{"line_number":135,"context_line":"        successfully (mainly for testing purposes)."},{"line_number":136,"context_line":"    \"\"\""},{"line_number":137,"context_line":""},{"line_number":138,"context_line":"    api_version \u003d \u00272.74\u0027"},{"line_number":139,"context_line":"    if target_power_state \u003d\u003d states.POWER_ON:"},{"line_number":140,"context_line":"        target_power_state \u003d \"POWER_ON\""},{"line_number":141,"context_line":"    elif target_power_state \u003d\u003d states.POWER_OFF:"}],"source_content_type":"text/x-python","patch_set":7,"id":"7faddb67_f04a7481","line":138,"in_reply_to":"7faddb67_d0b978e9","updated":"2019-07-23 17:00:44.000000000","message":"\u003e This should be 2.75 now. We should have some CI testing for this,\n \u003e which I think we can do with a DNM patch on top of this in the\n \u003e series which adds python-novaclient to the required-projects\n \u003e section of .zuul.yaml so we pull in the dependent novaclient change\n \u003e from source.\n\nTrying to test the series here https://review.opendev.org/#/c/672327/","commit_id":"a8a8c70a529f59cef57fd2d05dac2ca5497a5799"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"11ef0f3d4b159e4a73e4b83cfa2423e4840fa118","unresolved":false,"context_lines":[{"line_number":52,"context_line":"    :param api_version:"},{"line_number":53,"context_line":"        api version of nova"},{"line_number":54,"context_line":"    :returns:"},{"line_number":55,"context_line":"        A boolean which indicates if the event was sent and received"},{"line_number":56,"context_line":"        successfully."},{"line_number":57,"context_line":"    \"\"\""},{"line_number":58,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"7faddb67_b23d40c5","line":55,"range":{"start_line":55,"start_character":41,"end_line":55,"end_character":50},"updated":"2019-08-02 15:14:43.000000000","message":"events were","commit_id":"c7439afb82445bd31ae2555f8f1cf97f8d13f278"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"21cb3af296912eed454250ab5098dbb9abaddebf","unresolved":false,"context_lines":[{"line_number":52,"context_line":"    :param api_version:"},{"line_number":53,"context_line":"        api version of nova"},{"line_number":54,"context_line":"    :returns:"},{"line_number":55,"context_line":"        A boolean which indicates if the event was sent and received"},{"line_number":56,"context_line":"        successfully."},{"line_number":57,"context_line":"    \"\"\""},{"line_number":58,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"7faddb67_26e260a1","line":55,"range":{"start_line":55,"start_character":41,"end_line":55,"end_character":50},"in_reply_to":"7faddb67_b23d40c5","updated":"2019-08-05 16:04:44.000000000","message":"Done","commit_id":"c7439afb82445bd31ae2555f8f1cf97f8d13f278"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"11ef0f3d4b159e4a73e4b83cfa2423e4840fa118","unresolved":false,"context_lines":[{"line_number":57,"context_line":"    \"\"\""},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    nova \u003d _get_nova_adapter()"},{"line_number":60,"context_line":"    response \u003d nova.post("},{"line_number":61,"context_line":"        \u0027/os-server-external-events\u0027, json\u003d{\u0027events\u0027: events},"},{"line_number":62,"context_line":"        microversion\u003dapi_version, global_request_id\u003dcontext.global_id,"},{"line_number":63,"context_line":"        raise_exc\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":10,"id":"7faddb67_d270fc74","line":60,"range":{"start_line":60,"start_character":20,"end_line":60,"end_character":24},"updated":"2019-08-02 15:14:43.000000000","message":"The situation where I\u0027ve got the CONF switch on but no [nova] section in the conf and/or no compute endpoint configured (standalone case) is one you\u0027ve mentioned in the docs, but I don\u0027t see it being handled in code.\n\nI *think* it will blow up here (and/or possibly in keystone.get_auth - I\u0027m not positive), with a ksa ClientException of one subclass or another.\n\nSince \"no [nova] section\" is a legit configuration in ironic (unlike for nova where, if you don\u0027t have e.g. [neutron], you basically can\u0027t do squat) I think you should have code that explicitly handles that situation and either warns about it or flat refuses to bring up the service.\n\nSo like, you could wrap L114 in a try/except\n\n except ksa_exc.ClientException as ex:\n     LOG.warning(\"CONF.nova.send_power_notifications is enabled, but couldn\u0027t talk to Nova: %s\", ex)","commit_id":"c7439afb82445bd31ae2555f8f1cf97f8d13f278"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"21cb3af296912eed454250ab5098dbb9abaddebf","unresolved":false,"context_lines":[{"line_number":57,"context_line":"    \"\"\""},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    nova \u003d _get_nova_adapter()"},{"line_number":60,"context_line":"    response \u003d nova.post("},{"line_number":61,"context_line":"        \u0027/os-server-external-events\u0027, json\u003d{\u0027events\u0027: events},"},{"line_number":62,"context_line":"        microversion\u003dapi_version, global_request_id\u003dcontext.global_id,"},{"line_number":63,"context_line":"        raise_exc\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":10,"id":"7faddb67_e6320810","line":60,"range":{"start_line":60,"start_character":20,"end_line":60,"end_character":24},"in_reply_to":"7faddb67_d270fc74","updated":"2019-08-05 16:04:44.000000000","message":"\u003e The situation where I\u0027ve got the CONF switch on but no [nova]\n \u003e section in the conf and/or no compute endpoint configured\n \u003e (standalone case) is one you\u0027ve mentioned in the docs, but I don\u0027t\n \u003e see it being handled in code.\n \u003e \n \u003e I *think* it will blow up here (and/or possibly in\n \u003e keystone.get_auth - I\u0027m not positive), with a ksa ClientException\n \u003e of one subclass or another.\n \u003e \n \u003e Since \"no [nova] section\" is a legit configuration in ironic\n\nIt is not a legit configuration, it will always be configured by default from the conf.nova.py file (https://logs.opendev.org/42/664842/10/check/openstack-tox-docs/e05ed51/html/configuration/sample-config.html). So the [nova] section will always be there, whether the auth_url is configured or not is upto the user.\n\n \u003e (unlike for nova where, if you don\u0027t have e.g. [neutron], you\n \u003e basically can\u0027t do squat) I think you should have code that\n \u003e explicitly handles that situation and either warns about it or flat\n \u003e refuses to bring up the service.\n \u003e \n \u003e So like, you could wrap L114 in a try/except\n \u003e \n \u003e except ksa_exc.ClientException as ex:\n \u003e LOG.warning(\"CONF.nova.send_power_notifications is enabled, but\n \u003e couldn\u0027t talk to Nova: %s\", ex)\n\nAFAIK this should be handled by the status_code being non-404 case on L67. Let me check this.\n\n(later)\n\nI am not sure why, the behaviour is different when using the ksa_adapter. When using the novaclient I was catching such exceptions because I was explicitly checking for exceptions instead of response codes (https://review.opendev.org/#/c/664842/6/ironic/tests/unit/common/test_nova.py@173). I think I will add the test back and also check this with what you have suggested.","commit_id":"c7439afb82445bd31ae2555f8f1cf97f8d13f278"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"6fea953f7efde182da414b9bf21367dd013afb62","unresolved":false,"context_lines":[{"line_number":61,"context_line":"        \u0027/os-server-external-events\u0027, json\u003d{\u0027events\u0027: events},"},{"line_number":62,"context_line":"        microversion\u003dapi_version, global_request_id\u003dcontext.global_id,"},{"line_number":63,"context_line":"        raise_exc\u003dFalse)"},{"line_number":64,"context_line":"    if not response:"},{"line_number":65,"context_line":"        if response.status_code \u003d\u003d 404:"},{"line_number":66,"context_line":"            LOG.warning(\u0027Nova returned NotFound for events: %s.\u0027, events)"},{"line_number":67,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":10,"id":"7faddb67_12e8d4b0","line":64,"range":{"start_line":64,"start_character":4,"end_line":64,"end_character":20},"updated":"2019-08-02 15:19:18.000000000","message":"I suggest checking for status_code \u003e\u003d 400","commit_id":"c7439afb82445bd31ae2555f8f1cf97f8d13f278"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"21cb3af296912eed454250ab5098dbb9abaddebf","unresolved":false,"context_lines":[{"line_number":61,"context_line":"        \u0027/os-server-external-events\u0027, json\u003d{\u0027events\u0027: events},"},{"line_number":62,"context_line":"        microversion\u003dapi_version, global_request_id\u003dcontext.global_id,"},{"line_number":63,"context_line":"        raise_exc\u003dFalse)"},{"line_number":64,"context_line":"    if not response:"},{"line_number":65,"context_line":"        if response.status_code \u003d\u003d 404:"},{"line_number":66,"context_line":"            LOG.warning(\u0027Nova returned NotFound for events: %s.\u0027, events)"},{"line_number":67,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":10,"id":"7faddb67_96fb4377","line":64,"range":{"start_line":64,"start_character":4,"end_line":64,"end_character":20},"in_reply_to":"7faddb67_12e8d4b0","updated":"2019-08-05 16:04:44.000000000","message":"ok, is this for it to be cleaner ?","commit_id":"c7439afb82445bd31ae2555f8f1cf97f8d13f278"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"6fea953f7efde182da414b9bf21367dd013afb62","unresolved":false,"context_lines":[{"line_number":70,"context_line":"        return False"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    resp_events \u003d response.json()[\u0027events\u0027]"},{"line_number":73,"context_line":"    response_error \u003d response.status_code \u003d\u003d 207"},{"line_number":74,"context_line":"    for event in resp_events:"},{"line_number":75,"context_line":"        code \u003d event.get(\u0027code\u0027)"},{"line_number":76,"context_line":"        if code is None:"}],"source_content_type":"text/x-python","patch_set":10,"id":"7faddb67_32df100e","line":73,"range":{"start_line":73,"start_character":22,"end_line":73,"end_character":48},"updated":"2019-08-02 15:19:18.000000000","message":"What is 207 an error? Maybe leave a comment?","commit_id":"c7439afb82445bd31ae2555f8f1cf97f8d13f278"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"21cb3af296912eed454250ab5098dbb9abaddebf","unresolved":false,"context_lines":[{"line_number":70,"context_line":"        return False"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    resp_events \u003d response.json()[\u0027events\u0027]"},{"line_number":73,"context_line":"    response_error \u003d response.status_code \u003d\u003d 207"},{"line_number":74,"context_line":"    for event in resp_events:"},{"line_number":75,"context_line":"        code \u003d event.get(\u0027code\u0027)"},{"line_number":76,"context_line":"        if code is None:"}],"source_content_type":"text/x-python","patch_set":10,"id":"7faddb67_87146b45","line":73,"range":{"start_line":73,"start_character":22,"end_line":73,"end_character":48},"in_reply_to":"7faddb67_32df100e","updated":"2019-08-05 16:04:44.000000000","message":"This is a server side legacy logic. By default a successful event will have status_code 200, but in case of mishap it is set to 207 explicitly with the specific code being 400 (no tag etc..) or 404 for InstanceNotFound.\n\nHowever this logic contradicts the logic of checking non-200 code values so by default the response_error should be set to False. Infact like Eric mentions below I am going to change this whole logic to handle just a single event. Makes it more cleaner.","commit_id":"c7439afb82445bd31ae2555f8f1cf97f8d13f278"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"11ef0f3d4b159e4a73e4b83cfa2423e4840fa118","unresolved":false,"context_lines":[{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    resp_events \u003d response.json()[\u0027events\u0027]"},{"line_number":73,"context_line":"    response_error \u003d response.status_code \u003d\u003d 207"},{"line_number":74,"context_line":"    for event in resp_events:"},{"line_number":75,"context_line":"        code \u003d event.get(\u0027code\u0027)"},{"line_number":76,"context_line":"        if code is None:"},{"line_number":77,"context_line":"            response_error \u003d True"}],"source_content_type":"text/x-python","patch_set":10,"id":"7faddb67_9243643f","line":74,"range":{"start_line":74,"start_character":4,"end_line":74,"end_character":28},"updated":"2019-08-02 15:14:43.000000000","message":"I know you\u0027ve made this method generic to handle multiple events, but given that you\u0027re currently only ever using one, you could simplify this logic.","commit_id":"c7439afb82445bd31ae2555f8f1cf97f8d13f278"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"21cb3af296912eed454250ab5098dbb9abaddebf","unresolved":false,"context_lines":[{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    resp_events \u003d response.json()[\u0027events\u0027]"},{"line_number":73,"context_line":"    response_error \u003d response.status_code \u003d\u003d 207"},{"line_number":74,"context_line":"    for event in resp_events:"},{"line_number":75,"context_line":"        code \u003d event.get(\u0027code\u0027)"},{"line_number":76,"context_line":"        if code is None:"},{"line_number":77,"context_line":"            response_error \u003d True"}],"source_content_type":"text/x-python","patch_set":10,"id":"7faddb67_16c0b3e0","line":74,"range":{"start_line":74,"start_character":4,"end_line":74,"end_character":28},"in_reply_to":"7faddb67_9243643f","updated":"2019-08-05 16:04:44.000000000","message":"fair enough.","commit_id":"c7439afb82445bd31ae2555f8f1cf97f8d13f278"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"6fea953f7efde182da414b9bf21367dd013afb62","unresolved":false,"context_lines":[{"line_number":80,"context_line":"            LOG.warning("},{"line_number":81,"context_line":"                \u0027Nova event: %s returned with failed status.\u0027, event)"},{"line_number":82,"context_line":"        else:"},{"line_number":83,"context_line":"            LOG.info(\u0027Nova event response: %s.\u0027, event)"},{"line_number":84,"context_line":"    if response_error:"},{"line_number":85,"context_line":"        LOG.error(\u0027Error response returned from nova: %s.\u0027, response)"},{"line_number":86,"context_line":"        return False"}],"source_content_type":"text/x-python","patch_set":10,"id":"7faddb67_72c34839","line":83,"range":{"start_line":83,"start_character":16,"end_line":83,"end_character":20},"updated":"2019-08-02 15:19:18.000000000","message":"s/info/debug/","commit_id":"c7439afb82445bd31ae2555f8f1cf97f8d13f278"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"21cb3af296912eed454250ab5098dbb9abaddebf","unresolved":false,"context_lines":[{"line_number":80,"context_line":"            LOG.warning("},{"line_number":81,"context_line":"                \u0027Nova event: %s returned with failed status.\u0027, event)"},{"line_number":82,"context_line":"        else:"},{"line_number":83,"context_line":"            LOG.info(\u0027Nova event response: %s.\u0027, event)"},{"line_number":84,"context_line":"    if response_error:"},{"line_number":85,"context_line":"        LOG.error(\u0027Error response returned from nova: %s.\u0027, response)"},{"line_number":86,"context_line":"        return False"}],"source_content_type":"text/x-python","patch_set":10,"id":"7faddb67_09917447","line":83,"range":{"start_line":83,"start_character":16,"end_line":83,"end_character":20},"in_reply_to":"7faddb67_72c34839","updated":"2019-08-05 16:04:44.000000000","message":"Done","commit_id":"c7439afb82445bd31ae2555f8f1cf97f8d13f278"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"6fea953f7efde182da414b9bf21367dd013afb62","unresolved":false,"context_lines":[{"line_number":82,"context_line":"        else:"},{"line_number":83,"context_line":"            LOG.info(\u0027Nova event response: %s.\u0027, event)"},{"line_number":84,"context_line":"    if response_error:"},{"line_number":85,"context_line":"        LOG.error(\u0027Error response returned from nova: %s.\u0027, response)"},{"line_number":86,"context_line":"        return False"},{"line_number":87,"context_line":"    return True"},{"line_number":88,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"7faddb67_b2cd4067","line":85,"range":{"start_line":85,"start_character":20,"end_line":85,"end_character":52},"updated":"2019-08-02 15:19:18.000000000","message":"Let\u0027s provide more context (mention power events)","commit_id":"c7439afb82445bd31ae2555f8f1cf97f8d13f278"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"21cb3af296912eed454250ab5098dbb9abaddebf","unresolved":false,"context_lines":[{"line_number":82,"context_line":"        else:"},{"line_number":83,"context_line":"            LOG.info(\u0027Nova event response: %s.\u0027, event)"},{"line_number":84,"context_line":"    if response_error:"},{"line_number":85,"context_line":"        LOG.error(\u0027Error response returned from nova: %s.\u0027, response)"},{"line_number":86,"context_line":"        return False"},{"line_number":87,"context_line":"    return True"},{"line_number":88,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"7faddb67_094e5496","line":85,"range":{"start_line":85,"start_character":20,"end_line":85,"end_character":52},"in_reply_to":"7faddb67_b2cd4067","updated":"2019-08-05 16:04:44.000000000","message":"Done","commit_id":"c7439afb82445bd31ae2555f8f1cf97f8d13f278"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"11ef0f3d4b159e4a73e4b83cfa2423e4840fa118","unresolved":false,"context_lines":[{"line_number":96,"context_line":"    :param server_uuid:"},{"line_number":97,"context_line":"        The uuid of the node whose power state changed."},{"line_number":98,"context_line":"    :param target_power_state:"},{"line_number":99,"context_line":"        Targeted power state change i.e \"power on\" or \"power off\""},{"line_number":100,"context_line":"    :returns:"},{"line_number":101,"context_line":"        A boolean which indicates if the power update was executed"},{"line_number":102,"context_line":"        successfully (mainly for testing purposes)."}],"source_content_type":"text/x-python","patch_set":10,"id":"7faddb67_d2ab1cd3","line":99,"range":{"start_line":99,"start_character":40,"end_line":99,"end_character":65},"updated":"2019-08-02 15:14:43.000000000","message":"POWER_ON or POWER_OFF\n\nor even fully qualified\n\n ironic.common.states.POWER_ON or .POWER_OFF","commit_id":"c7439afb82445bd31ae2555f8f1cf97f8d13f278"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"21cb3af296912eed454250ab5098dbb9abaddebf","unresolved":false,"context_lines":[{"line_number":96,"context_line":"    :param server_uuid:"},{"line_number":97,"context_line":"        The uuid of the node whose power state changed."},{"line_number":98,"context_line":"    :param target_power_state:"},{"line_number":99,"context_line":"        Targeted power state change i.e \"power on\" or \"power off\""},{"line_number":100,"context_line":"    :returns:"},{"line_number":101,"context_line":"        A boolean which indicates if the power update was executed"},{"line_number":102,"context_line":"        successfully (mainly for testing purposes)."}],"source_content_type":"text/x-python","patch_set":10,"id":"7faddb67_69002803","line":99,"range":{"start_line":99,"start_character":40,"end_line":99,"end_character":65},"in_reply_to":"7faddb67_d2ab1cd3","updated":"2019-08-05 16:04:44.000000000","message":"Done","commit_id":"c7439afb82445bd31ae2555f8f1cf97f8d13f278"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"11ef0f3d4b159e4a73e4b83cfa2423e4840fa118","unresolved":false,"context_lines":[{"line_number":101,"context_line":"        A boolean which indicates if the power update was executed"},{"line_number":102,"context_line":"        successfully (mainly for testing purposes)."},{"line_number":103,"context_line":"    \"\"\""},{"line_number":104,"context_line":"    if CONF.nova.send_power_notifications:"},{"line_number":105,"context_line":"        api_version \u003d \u00272.75\u0027"},{"line_number":106,"context_line":"        if target_power_state \u003d\u003d states.POWER_ON:"},{"line_number":107,"context_line":"            target_power_state \u003d \"POWER_ON\""}],"source_content_type":"text/x-python","patch_set":10,"id":"7faddb67_329dd0bb","line":104,"updated":"2019-08-02 15:14:43.000000000","message":"nit, could save some indent with:\n\n if not CONF...:\n     LOG.debug(...)\n     return False\n\n \u003crest of logic\u003e","commit_id":"c7439afb82445bd31ae2555f8f1cf97f8d13f278"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"21cb3af296912eed454250ab5098dbb9abaddebf","unresolved":false,"context_lines":[{"line_number":101,"context_line":"        A boolean which indicates if the power update was executed"},{"line_number":102,"context_line":"        successfully (mainly for testing purposes)."},{"line_number":103,"context_line":"    \"\"\""},{"line_number":104,"context_line":"    if CONF.nova.send_power_notifications:"},{"line_number":105,"context_line":"        api_version \u003d \u00272.75\u0027"},{"line_number":106,"context_line":"        if target_power_state \u003d\u003d states.POWER_ON:"},{"line_number":107,"context_line":"            target_power_state \u003d \"POWER_ON\""}],"source_content_type":"text/x-python","patch_set":10,"id":"7faddb67_c9111c5f","line":104,"in_reply_to":"7faddb67_329dd0bb","updated":"2019-08-05 16:04:44.000000000","message":"Done","commit_id":"c7439afb82445bd31ae2555f8f1cf97f8d13f278"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"6fea953f7efde182da414b9bf21367dd013afb62","unresolved":false,"context_lines":[{"line_number":102,"context_line":"        successfully (mainly for testing purposes)."},{"line_number":103,"context_line":"    \"\"\""},{"line_number":104,"context_line":"    if CONF.nova.send_power_notifications:"},{"line_number":105,"context_line":"        api_version \u003d \u00272.75\u0027"},{"line_number":106,"context_line":"        if target_power_state \u003d\u003d states.POWER_ON:"},{"line_number":107,"context_line":"            target_power_state \u003d \"POWER_ON\""},{"line_number":108,"context_line":"        elif target_power_state \u003d\u003d states.POWER_OFF:"}],"source_content_type":"text/x-python","patch_set":10,"id":"7faddb67_d2cd5c5d","line":105,"range":{"start_line":105,"start_character":8,"end_line":105,"end_character":28},"updated":"2019-08-02 15:19:18.000000000","message":"Let\u0027s make this a top-level constant.","commit_id":"c7439afb82445bd31ae2555f8f1cf97f8d13f278"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"21cb3af296912eed454250ab5098dbb9abaddebf","unresolved":false,"context_lines":[{"line_number":102,"context_line":"        successfully (mainly for testing purposes)."},{"line_number":103,"context_line":"    \"\"\""},{"line_number":104,"context_line":"    if CONF.nova.send_power_notifications:"},{"line_number":105,"context_line":"        api_version \u003d \u00272.75\u0027"},{"line_number":106,"context_line":"        if target_power_state \u003d\u003d states.POWER_ON:"},{"line_number":107,"context_line":"            target_power_state \u003d \"POWER_ON\""},{"line_number":108,"context_line":"        elif target_power_state \u003d\u003d states.POWER_OFF:"}],"source_content_type":"text/x-python","patch_set":10,"id":"7faddb67_291f906c","line":105,"range":{"start_line":105,"start_character":8,"end_line":105,"end_character":28},"in_reply_to":"7faddb67_d2cd5c5d","updated":"2019-08-05 16:04:44.000000000","message":"Done","commit_id":"c7439afb82445bd31ae2555f8f1cf97f8d13f278"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"6fea953f7efde182da414b9bf21367dd013afb62","unresolved":false,"context_lines":[{"line_number":108,"context_line":"        elif target_power_state \u003d\u003d states.POWER_OFF:"},{"line_number":109,"context_line":"            target_power_state \u003d \"POWER_OFF\""},{"line_number":110,"context_line":"        else:"},{"line_number":111,"context_line":"            LOG.error(\u0027Invalid Power State %s.\u0027, target_power_state)"},{"line_number":112,"context_line":"            return False"},{"line_number":113,"context_line":"        events \u003d [_get_power_update_event(server_uuid, target_power_state)]"},{"line_number":114,"context_line":"        result \u003d _send_events(context, events, api_version\u003dapi_version)"},{"line_number":115,"context_line":"        return result"}],"source_content_type":"text/x-python","patch_set":10,"id":"7faddb67_1201b46a","line":112,"range":{"start_line":111,"start_character":12,"end_line":112,"end_character":24},"updated":"2019-08-02 15:19:18.000000000","message":"This shouldn\u0027t happen, we\u0027re in control of power states.","commit_id":"c7439afb82445bd31ae2555f8f1cf97f8d13f278"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"21cb3af296912eed454250ab5098dbb9abaddebf","unresolved":false,"context_lines":[{"line_number":108,"context_line":"        elif target_power_state \u003d\u003d states.POWER_OFF:"},{"line_number":109,"context_line":"            target_power_state \u003d \"POWER_OFF\""},{"line_number":110,"context_line":"        else:"},{"line_number":111,"context_line":"            LOG.error(\u0027Invalid Power State %s.\u0027, target_power_state)"},{"line_number":112,"context_line":"            return False"},{"line_number":113,"context_line":"        events \u003d [_get_power_update_event(server_uuid, target_power_state)]"},{"line_number":114,"context_line":"        result \u003d _send_events(context, events, api_version\u003dapi_version)"},{"line_number":115,"context_line":"        return result"}],"source_content_type":"text/x-python","patch_set":10,"id":"7faddb67_8670f473","line":112,"range":{"start_line":111,"start_character":12,"end_line":112,"end_character":24},"in_reply_to":"7faddb67_1201b46a","updated":"2019-08-05 16:04:44.000000000","message":"Nova will only entertain \"power on\" and \"power off\" states as target ones. So other ironic power state changes like setting the power state to \"None\" will not be sent to nova.","commit_id":"c7439afb82445bd31ae2555f8f1cf97f8d13f278"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"11ef0f3d4b159e4a73e4b83cfa2423e4840fa118","unresolved":false,"context_lines":[{"line_number":114,"context_line":"        result \u003d _send_events(context, events, api_version\u003dapi_version)"},{"line_number":115,"context_line":"        return result"},{"line_number":116,"context_line":"    else:"},{"line_number":117,"context_line":"        LOG.debug(\u0027Power state change callbacks to nova is not enabled.\u0027)"},{"line_number":118,"context_line":"        return False"}],"source_content_type":"text/x-python","patch_set":10,"id":"7faddb67_d2947c8d","line":117,"range":{"start_line":117,"start_character":56,"end_line":117,"end_character":58},"updated":"2019-08-02 15:14:43.000000000","message":"are","commit_id":"c7439afb82445bd31ae2555f8f1cf97f8d13f278"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"21cb3af296912eed454250ab5098dbb9abaddebf","unresolved":false,"context_lines":[{"line_number":114,"context_line":"        result \u003d _send_events(context, events, api_version\u003dapi_version)"},{"line_number":115,"context_line":"        return result"},{"line_number":116,"context_line":"    else:"},{"line_number":117,"context_line":"        LOG.debug(\u0027Power state change callbacks to nova is not enabled.\u0027)"},{"line_number":118,"context_line":"        return False"}],"source_content_type":"text/x-python","patch_set":10,"id":"7faddb67_49052c13","line":117,"range":{"start_line":117,"start_character":56,"end_line":117,"end_character":58},"in_reply_to":"7faddb67_d2947c8d","updated":"2019-08-05 16:04:44.000000000","message":"Done","commit_id":"c7439afb82445bd31ae2555f8f1cf97f8d13f278"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"c6267fcbe6b8e2f0216edd64bf98e36a04a92418","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        successfully."},{"line_number":58,"context_line":"    \"\"\""},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    nova \u003d _get_nova_adapter()"},{"line_number":61,"context_line":"    response \u003d nova.post("},{"line_number":62,"context_line":"        \u0027/os-server-external-events\u0027, json\u003d{\u0027events\u0027: [event]},"},{"line_number":63,"context_line":"        microversion\u003dapi_version, global_request_id\u003dcontext.global_id,"}],"source_content_type":"text/x-python","patch_set":11,"id":"7faddb67_c97d5fb3","line":60,"updated":"2019-08-08 08:13:57.000000000","message":"we need to handle keystoneauth errors here in case the [nova] section is not fully populated","commit_id":"121145f251b82940a5b47233dc51317d612f0d7f"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"39efef8780abd94882367452ff303d9614720e42","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        successfully."},{"line_number":58,"context_line":"    \"\"\""},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    nova \u003d _get_nova_adapter()"},{"line_number":61,"context_line":"    response \u003d nova.post("},{"line_number":62,"context_line":"        \u0027/os-server-external-events\u0027, json\u003d{\u0027events\u0027: [event]},"},{"line_number":63,"context_line":"        microversion\u003dapi_version, global_request_id\u003dcontext.global_id,"}],"source_content_type":"text/x-python","patch_set":11,"id":"7faddb67_8af42f89","line":60,"in_reply_to":"7faddb67_00682185","updated":"2019-08-08 14:50:26.000000000","message":"They are.\n\nWhen using raise_exc\u003dFalse, you can still get ksa ClientException subclasses for things like catalog and connection errors.","commit_id":"121145f251b82940a5b47233dc51317d612f0d7f"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"eb944ebd3204fadc655b02c5848bd5d8ca1e55a3","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        successfully."},{"line_number":58,"context_line":"    \"\"\""},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    nova \u003d _get_nova_adapter()"},{"line_number":61,"context_line":"    response \u003d nova.post("},{"line_number":62,"context_line":"        \u0027/os-server-external-events\u0027, json\u003d{\u0027events\u0027: [event]},"},{"line_number":63,"context_line":"        microversion\u003dapi_version, global_request_id\u003dcontext.global_id,"}],"source_content_type":"text/x-python","patch_set":11,"id":"7faddb67_00682185","line":60,"in_reply_to":"7faddb67_afcfc0b1","updated":"2019-08-08 14:06:41.000000000","message":"I\u0027m not sure all exceptions are ClientException in keystone, but I may be wrong.","commit_id":"121145f251b82940a5b47233dc51317d612f0d7f"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"57225e5c222da8f5f93c96f3f31097055917f6b3","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        successfully."},{"line_number":58,"context_line":"    \"\"\""},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    nova \u003d _get_nova_adapter()"},{"line_number":61,"context_line":"    response \u003d nova.post("},{"line_number":62,"context_line":"        \u0027/os-server-external-events\u0027, json\u003d{\u0027events\u0027: [event]},"},{"line_number":63,"context_line":"        microversion\u003dapi_version, global_request_id\u003dcontext.global_id,"}],"source_content_type":"text/x-python","patch_set":11,"id":"7faddb67_afcfc0b1","line":60,"in_reply_to":"7faddb67_c97d5fb3","updated":"2019-08-08 12:38:42.000000000","message":"\u003e we need to handle keystoneauth errors here in case the [nova]\n \u003e section is not fully populated\n\nIts done on L112. Any exception including auth like you saw here (https://logs.opendev.org/42/664842/11/check/ironic-tempest-ipa-partition-redfish-tinyipa/485ee32/controller/logs/screen-ir-cond.txt.gz?level\u003dWARNING#_Aug_05_17_18_04_372181) will be caught there.","commit_id":"121145f251b82940a5b47233dc51317d612f0d7f"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"c6267fcbe6b8e2f0216edd64bf98e36a04a92418","unresolved":false,"context_lines":[{"line_number":61,"context_line":"    response \u003d nova.post("},{"line_number":62,"context_line":"        \u0027/os-server-external-events\u0027, json\u003d{\u0027events\u0027: [event]},"},{"line_number":63,"context_line":"        microversion\u003dapi_version, global_request_id\u003dcontext.global_id,"},{"line_number":64,"context_line":"        raise_exc\u003dFalse)"},{"line_number":65,"context_line":"    if response.status_code \u003e\u003d 400:"},{"line_number":66,"context_line":"        if response.status_code \u003d\u003d 404:"},{"line_number":67,"context_line":"            LOG.warning(\u0027Nova returned NotFound for event: %s.\u0027, event)"}],"source_content_type":"text/x-python","patch_set":11,"id":"7faddb67_e97a9bb8","line":64,"updated":"2019-08-08 08:13:57.000000000","message":"let\u0027s handle ClientException here, not in send_event to have all error handling in once place","commit_id":"121145f251b82940a5b47233dc51317d612f0d7f"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"eb944ebd3204fadc655b02c5848bd5d8ca1e55a3","unresolved":false,"context_lines":[{"line_number":61,"context_line":"    response \u003d nova.post("},{"line_number":62,"context_line":"        \u0027/os-server-external-events\u0027, json\u003d{\u0027events\u0027: [event]},"},{"line_number":63,"context_line":"        microversion\u003dapi_version, global_request_id\u003dcontext.global_id,"},{"line_number":64,"context_line":"        raise_exc\u003dFalse)"},{"line_number":65,"context_line":"    if response.status_code \u003e\u003d 400:"},{"line_number":66,"context_line":"        if response.status_code \u003d\u003d 404:"},{"line_number":67,"context_line":"            LOG.warning(\u0027Nova returned NotFound for event: %s.\u0027, event)"}],"source_content_type":"text/x-python","patch_set":11,"id":"7faddb67_c00769c9","line":64,"in_reply_to":"7faddb67_4a92baa1","updated":"2019-08-08 14:06:41.000000000","message":"I\u0027d catch all keystone exceptions here still.","commit_id":"121145f251b82940a5b47233dc51317d612f0d7f"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"e2ae379284b7b19a45b9eed30c1a5fe8dbb30036","unresolved":false,"context_lines":[{"line_number":61,"context_line":"    response \u003d nova.post("},{"line_number":62,"context_line":"        \u0027/os-server-external-events\u0027, json\u003d{\u0027events\u0027: [event]},"},{"line_number":63,"context_line":"        microversion\u003dapi_version, global_request_id\u003dcontext.global_id,"},{"line_number":64,"context_line":"        raise_exc\u003dFalse)"},{"line_number":65,"context_line":"    if response.status_code \u003e\u003d 400:"},{"line_number":66,"context_line":"        if response.status_code \u003d\u003d 404:"},{"line_number":67,"context_line":"            LOG.warning(\u0027Nova returned NotFound for event: %s.\u0027, event)"}],"source_content_type":"text/x-python","patch_set":11,"id":"7faddb67_4a92baa1","line":64,"in_reply_to":"7faddb67_6f3ea88c","updated":"2019-08-08 12:45:15.000000000","message":"On second thoughts I don\u0027t have a strong opinion on where it should handled. I put it there because eric suggested it. I can change it to be done in this function also.","commit_id":"121145f251b82940a5b47233dc51317d612f0d7f"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"39efef8780abd94882367452ff303d9614720e42","unresolved":false,"context_lines":[{"line_number":61,"context_line":"    response \u003d nova.post("},{"line_number":62,"context_line":"        \u0027/os-server-external-events\u0027, json\u003d{\u0027events\u0027: [event]},"},{"line_number":63,"context_line":"        microversion\u003dapi_version, global_request_id\u003dcontext.global_id,"},{"line_number":64,"context_line":"        raise_exc\u003dFalse)"},{"line_number":65,"context_line":"    if response.status_code \u003e\u003d 400:"},{"line_number":66,"context_line":"        if response.status_code \u003d\u003d 404:"},{"line_number":67,"context_line":"            LOG.warning(\u0027Nova returned NotFound for event: %s.\u0027, event)"}],"source_content_type":"text/x-python","patch_set":11,"id":"7faddb67_8a398f40","line":64,"in_reply_to":"7faddb67_c00769c9","updated":"2019-08-08 14:50:26.000000000","message":"Shrug, that\u0027s fine.","commit_id":"121145f251b82940a5b47233dc51317d612f0d7f"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"57225e5c222da8f5f93c96f3f31097055917f6b3","unresolved":false,"context_lines":[{"line_number":61,"context_line":"    response \u003d nova.post("},{"line_number":62,"context_line":"        \u0027/os-server-external-events\u0027, json\u003d{\u0027events\u0027: [event]},"},{"line_number":63,"context_line":"        microversion\u003dapi_version, global_request_id\u003dcontext.global_id,"},{"line_number":64,"context_line":"        raise_exc\u003dFalse)"},{"line_number":65,"context_line":"    if response.status_code \u003e\u003d 400:"},{"line_number":66,"context_line":"        if response.status_code \u003d\u003d 404:"},{"line_number":67,"context_line":"            LOG.warning(\u0027Nova returned NotFound for event: %s.\u0027, event)"}],"source_content_type":"text/x-python","patch_set":11,"id":"7faddb67_6f3ea88c","line":64,"in_reply_to":"7faddb67_e97a9bb8","updated":"2019-08-08 12:38:42.000000000","message":"\u003e let\u0027s handle ClientException here, not in send_event to have all\n \u003e error handling in once place\n\nIsn\u0027t it better to have the \"all exception\" thing for the whole _send_events ? Since we already have this module for the nova specific exception handling.","commit_id":"121145f251b82940a5b47233dc51317d612f0d7f"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"c6267fcbe6b8e2f0216edd64bf98e36a04a92418","unresolved":false,"context_lines":[{"line_number":63,"context_line":"        microversion\u003dapi_version, global_request_id\u003dcontext.global_id,"},{"line_number":64,"context_line":"        raise_exc\u003dFalse)"},{"line_number":65,"context_line":"    if response.status_code \u003e\u003d 400:"},{"line_number":66,"context_line":"        if response.status_code \u003d\u003d 404:"},{"line_number":67,"context_line":"            LOG.warning(\u0027Nova returned NotFound for event: %s.\u0027, event)"},{"line_number":68,"context_line":"        else:"},{"line_number":69,"context_line":"            LOG.warning(\u0027Failed to notify nova on event: %s. %s.\u0027,"}],"source_content_type":"text/x-python","patch_set":11,"id":"7faddb67_8949a78f","line":66,"updated":"2019-08-08 08:13:57.000000000","message":"do we need to specially handle this? it seems that the message on line 69 is good enough.","commit_id":"121145f251b82940a5b47233dc51317d612f0d7f"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"eb944ebd3204fadc655b02c5848bd5d8ca1e55a3","unresolved":false,"context_lines":[{"line_number":63,"context_line":"        microversion\u003dapi_version, global_request_id\u003dcontext.global_id,"},{"line_number":64,"context_line":"        raise_exc\u003dFalse)"},{"line_number":65,"context_line":"    if response.status_code \u003e\u003d 400:"},{"line_number":66,"context_line":"        if response.status_code \u003d\u003d 404:"},{"line_number":67,"context_line":"            LOG.warning(\u0027Nova returned NotFound for event: %s.\u0027, event)"},{"line_number":68,"context_line":"        else:"},{"line_number":69,"context_line":"            LOG.warning(\u0027Failed to notify nova on event: %s. %s.\u0027,"}],"source_content_type":"text/x-python","patch_set":11,"id":"7faddb67_80117107","line":66,"in_reply_to":"7faddb67_6f96a841","updated":"2019-08-08 14:06:41.000000000","message":"I\u0027d prefer a simpler way for now.","commit_id":"121145f251b82940a5b47233dc51317d612f0d7f"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"0211d88dd3325c86d32f031d55dea03028c0af89","unresolved":false,"context_lines":[{"line_number":63,"context_line":"        microversion\u003dapi_version, global_request_id\u003dcontext.global_id,"},{"line_number":64,"context_line":"        raise_exc\u003dFalse)"},{"line_number":65,"context_line":"    if response.status_code \u003e\u003d 400:"},{"line_number":66,"context_line":"        if response.status_code \u003d\u003d 404:"},{"line_number":67,"context_line":"            LOG.warning(\u0027Nova returned NotFound for event: %s.\u0027, event)"},{"line_number":68,"context_line":"        else:"},{"line_number":69,"context_line":"            LOG.warning(\u0027Failed to notify nova on event: %s. %s.\u0027,"}],"source_content_type":"text/x-python","patch_set":11,"id":"7faddb67_2dc3d53a","line":66,"in_reply_to":"7faddb67_80117107","updated":"2019-08-08 15:24:58.000000000","message":"Done","commit_id":"121145f251b82940a5b47233dc51317d612f0d7f"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"57225e5c222da8f5f93c96f3f31097055917f6b3","unresolved":false,"context_lines":[{"line_number":63,"context_line":"        microversion\u003dapi_version, global_request_id\u003dcontext.global_id,"},{"line_number":64,"context_line":"        raise_exc\u003dFalse)"},{"line_number":65,"context_line":"    if response.status_code \u003e\u003d 400:"},{"line_number":66,"context_line":"        if response.status_code \u003d\u003d 404:"},{"line_number":67,"context_line":"            LOG.warning(\u0027Nova returned NotFound for event: %s.\u0027, event)"},{"line_number":68,"context_line":"        else:"},{"line_number":69,"context_line":"            LOG.warning(\u0027Failed to notify nova on event: %s. %s.\u0027,"}],"source_content_type":"text/x-python","patch_set":11,"id":"7faddb67_6f96a841","line":66,"in_reply_to":"7faddb67_8949a78f","updated":"2019-08-08 12:38:42.000000000","message":"\u003e do we need to specially handle this? it seems that the message on\n \u003e line 69 is good enough.\n\nIts just more specific based on error codes. I did this framework based on how it was done on the cinder side for extending volumes. If people feel its unnecessary I can remove it and log a common thing for all \u003e\u003d400 errors.","commit_id":"121145f251b82940a5b47233dc51317d612f0d7f"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"c6267fcbe6b8e2f0216edd64bf98e36a04a92418","unresolved":false,"context_lines":[{"line_number":77,"context_line":"                  \u0027event %s.\u0027, response, event)"},{"line_number":78,"context_line":"        return False"},{"line_number":79,"context_line":"    elif code !\u003d 200:"},{"line_number":80,"context_line":"        LOG.warning(\u0027Nova event: %s returned with failed status.\u0027, resp_event)"},{"line_number":81,"context_line":"    else:"},{"line_number":82,"context_line":"        LOG.debug(\u0027Nova event response: %s.\u0027, resp_event)"},{"line_number":83,"context_line":"    return True"}],"source_content_type":"text/x-python","patch_set":11,"id":"7faddb67_a94ee393","line":80,"updated":"2019-08-08 08:13:57.000000000","message":"Why different warnings here and on line 76? it seems that they can be consolidates under one\n\n if code !\u003d 200:","commit_id":"121145f251b82940a5b47233dc51317d612f0d7f"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"eb944ebd3204fadc655b02c5848bd5d8ca1e55a3","unresolved":false,"context_lines":[{"line_number":77,"context_line":"                  \u0027event %s.\u0027, response, event)"},{"line_number":78,"context_line":"        return False"},{"line_number":79,"context_line":"    elif code !\u003d 200:"},{"line_number":80,"context_line":"        LOG.warning(\u0027Nova event: %s returned with failed status.\u0027, resp_event)"},{"line_number":81,"context_line":"    else:"},{"line_number":82,"context_line":"        LOG.debug(\u0027Nova event response: %s.\u0027, resp_event)"},{"line_number":83,"context_line":"    return True"}],"source_content_type":"text/x-python","patch_set":11,"id":"7faddb67_6025555c","line":80,"in_reply_to":"7faddb67_0f8cd47d","updated":"2019-08-08 14:06:41.000000000","message":"Oh, okay. Then let us use \u003e\u003d 400 here and be more specific on line 76. Maybe just replace \"Error\" with \"Invalid\".","commit_id":"121145f251b82940a5b47233dc51317d612f0d7f"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"0211d88dd3325c86d32f031d55dea03028c0af89","unresolved":false,"context_lines":[{"line_number":77,"context_line":"                  \u0027event %s.\u0027, response, event)"},{"line_number":78,"context_line":"        return False"},{"line_number":79,"context_line":"    elif code !\u003d 200:"},{"line_number":80,"context_line":"        LOG.warning(\u0027Nova event: %s returned with failed status.\u0027, resp_event)"},{"line_number":81,"context_line":"    else:"},{"line_number":82,"context_line":"        LOG.debug(\u0027Nova event response: %s.\u0027, resp_event)"},{"line_number":83,"context_line":"    return True"}],"source_content_type":"text/x-python","patch_set":11,"id":"7faddb67_ed9e1d68","line":80,"in_reply_to":"7faddb67_6025555c","updated":"2019-08-08 15:24:58.000000000","message":"Done","commit_id":"121145f251b82940a5b47233dc51317d612f0d7f"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"57225e5c222da8f5f93c96f3f31097055917f6b3","unresolved":false,"context_lines":[{"line_number":77,"context_line":"                  \u0027event %s.\u0027, response, event)"},{"line_number":78,"context_line":"        return False"},{"line_number":79,"context_line":"    elif code !\u003d 200:"},{"line_number":80,"context_line":"        LOG.warning(\u0027Nova event: %s returned with failed status.\u0027, resp_event)"},{"line_number":81,"context_line":"    else:"},{"line_number":82,"context_line":"        LOG.debug(\u0027Nova event response: %s.\u0027, resp_event)"},{"line_number":83,"context_line":"    return True"}],"source_content_type":"text/x-python","patch_set":11,"id":"7faddb67_0f8cd47d","line":80,"in_reply_to":"7faddb67_a94ee393","updated":"2019-08-08 12:38:42.000000000","message":"\u003e Why different warnings here and on line 76? it seems that they can\n \u003e be consolidates under one\n \u003e \n \u003e if code !\u003d 200:\n\nIts because they are actually two different scenarios. A code status which is non-200 like 400/404/422 for external events is still considered a successful send/receival whereas a \"None\" code means something went wrong when compiling results and the status of the event is neither success nor failed. See https://docs.openstack.org/api-ref/compute/?expanded\u003drun-events-detail#id395 for more details. This is why we return False for code None and True for code!\u003d200 cases from this function.","commit_id":"121145f251b82940a5b47233dc51317d612f0d7f"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"c6267fcbe6b8e2f0216edd64bf98e36a04a92418","unresolved":false,"context_lines":[{"line_number":98,"context_line":"        successfully (mainly for testing purposes)."},{"line_number":99,"context_line":"    \"\"\""},{"line_number":100,"context_line":"    if not CONF.nova.send_power_notifications:"},{"line_number":101,"context_line":"        LOG.debug(\u0027Power state change callbacks to nova are not enabled.\u0027)"},{"line_number":102,"context_line":"        return False"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"    if target_power_state \u003d\u003d states.POWER_ON:"}],"source_content_type":"text/x-python","patch_set":11,"id":"7faddb67_4943af6d","line":101,"updated":"2019-08-08 08:13:57.000000000","message":"This will spam logs for standalone deployments, let\u0027s not log it (we log the configuration on start up anyway)","commit_id":"121145f251b82940a5b47233dc51317d612f0d7f"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"39efef8780abd94882367452ff303d9614720e42","unresolved":false,"context_lines":[{"line_number":98,"context_line":"        successfully (mainly for testing purposes)."},{"line_number":99,"context_line":"    \"\"\""},{"line_number":100,"context_line":"    if not CONF.nova.send_power_notifications:"},{"line_number":101,"context_line":"        LOG.debug(\u0027Power state change callbacks to nova are not enabled.\u0027)"},{"line_number":102,"context_line":"        return False"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"    if target_power_state \u003d\u003d states.POWER_ON:"}],"source_content_type":"text/x-python","patch_set":11,"id":"7faddb67_2a1f3bb8","line":101,"in_reply_to":"7faddb67_0fa7f4a9","updated":"2019-08-08 14:50:26.000000000","message":"Could save a global nag counter/boolean so you only emit this once.","commit_id":"121145f251b82940a5b47233dc51317d612f0d7f"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"0211d88dd3325c86d32f031d55dea03028c0af89","unresolved":false,"context_lines":[{"line_number":98,"context_line":"        successfully (mainly for testing purposes)."},{"line_number":99,"context_line":"    \"\"\""},{"line_number":100,"context_line":"    if not CONF.nova.send_power_notifications:"},{"line_number":101,"context_line":"        LOG.debug(\u0027Power state change callbacks to nova are not enabled.\u0027)"},{"line_number":102,"context_line":"        return False"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"    if target_power_state \u003d\u003d states.POWER_ON:"}],"source_content_type":"text/x-python","patch_set":11,"id":"7faddb67_4d1651f4","line":101,"in_reply_to":"7faddb67_2a1f3bb8","updated":"2019-08-08 15:24:58.000000000","message":"\u003e Could save a global nag counter/boolean so you only emit this once.\n\nremoved it entirely","commit_id":"121145f251b82940a5b47233dc51317d612f0d7f"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"57225e5c222da8f5f93c96f3f31097055917f6b3","unresolved":false,"context_lines":[{"line_number":98,"context_line":"        successfully (mainly for testing purposes)."},{"line_number":99,"context_line":"    \"\"\""},{"line_number":100,"context_line":"    if not CONF.nova.send_power_notifications:"},{"line_number":101,"context_line":"        LOG.debug(\u0027Power state change callbacks to nova are not enabled.\u0027)"},{"line_number":102,"context_line":"        return False"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"    if target_power_state \u003d\u003d states.POWER_ON:"}],"source_content_type":"text/x-python","patch_set":11,"id":"7faddb67_0fa7f4a9","line":101,"in_reply_to":"7faddb67_4943af6d","updated":"2019-08-08 12:38:42.000000000","message":"\u003e This will spam logs for standalone deployments, let\u0027s not log it\n \u003e (we log the configuration on start up anyway)\n\nMy reasoning was that it would be useful for the non-standalone deployments like ours. I would have liked to have arne_wiebalck\u0027s opinion on this but he is on vacation. Anyways its true by default so I\u0027ll just remove this config since I don\u0027t want this to be a deal breaker for moving forward.","commit_id":"121145f251b82940a5b47233dc51317d612f0d7f"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"c6267fcbe6b8e2f0216edd64bf98e36a04a92418","unresolved":false,"context_lines":[{"line_number":106,"context_line":"    elif target_power_state \u003d\u003d states.POWER_OFF:"},{"line_number":107,"context_line":"        target_power_state \u003d \"POWER_OFF\""},{"line_number":108,"context_line":"    else:"},{"line_number":109,"context_line":"        LOG.error(\u0027Invalid Power State %s.\u0027, target_power_state)"},{"line_number":110,"context_line":"        return False"},{"line_number":111,"context_line":"    event \u003d _get_power_update_event(server_uuid, target_power_state)"},{"line_number":112,"context_line":"    try:"}],"source_content_type":"text/x-python","patch_set":11,"id":"7faddb67_6948eb86","line":109,"updated":"2019-08-08 08:13:57.000000000","message":"target_power_state can be REBOOT, no?","commit_id":"121145f251b82940a5b47233dc51317d612f0d7f"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"eb944ebd3204fadc655b02c5848bd5d8ca1e55a3","unresolved":false,"context_lines":[{"line_number":106,"context_line":"    elif target_power_state \u003d\u003d states.POWER_OFF:"},{"line_number":107,"context_line":"        target_power_state \u003d \"POWER_OFF\""},{"line_number":108,"context_line":"    else:"},{"line_number":109,"context_line":"        LOG.error(\u0027Invalid Power State %s.\u0027, target_power_state)"},{"line_number":110,"context_line":"        return False"},{"line_number":111,"context_line":"    event \u003d _get_power_update_event(server_uuid, target_power_state)"},{"line_number":112,"context_line":"    try:"}],"source_content_type":"text/x-python","patch_set":11,"id":"7faddb67_60da354c","line":109,"in_reply_to":"7faddb67_0f29349a","updated":"2019-08-08 14:06:41.000000000","message":"I\u0027m wondering what happens if a user issues `openstack baremetal node reboot \u003cnode\u003e`, will it raise an error here?","commit_id":"121145f251b82940a5b47233dc51317d612f0d7f"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"0211d88dd3325c86d32f031d55dea03028c0af89","unresolved":false,"context_lines":[{"line_number":106,"context_line":"    elif target_power_state \u003d\u003d states.POWER_OFF:"},{"line_number":107,"context_line":"        target_power_state \u003d \"POWER_OFF\""},{"line_number":108,"context_line":"    else:"},{"line_number":109,"context_line":"        LOG.error(\u0027Invalid Power State %s.\u0027, target_power_state)"},{"line_number":110,"context_line":"        return False"},{"line_number":111,"context_line":"    event \u003d _get_power_update_event(server_uuid, target_power_state)"},{"line_number":112,"context_line":"    try:"}],"source_content_type":"text/x-python","patch_set":11,"id":"7faddb67_ad54a5ff","line":109,"in_reply_to":"7faddb67_60da354c","updated":"2019-08-08 15:24:58.000000000","message":"\u003e I\u0027m wondering what happens if a user issues `openstack baremetal\n \u003e node reboot \u003cnode\u003e`, will it raise an error here?\n\nSo I don\u0027t see any special behaviour for reboot. It seems to work like for power on and power off:\n\n \u003cResponse [200]\u003e\n{u\u0027status\u0027: u\u0027completed\u0027, u\u0027tag\u0027: u\u0027POWER_ON\u0027, u\u0027name\u0027: u\u0027power-update\u0027, u\u0027server_uuid\u0027: u\u00278264554d-7c99-40f0-b5ec-e164e4dd6043\u0027, u\u0027code\u0027: 200}\nDEBUG ironic.common.nova [None req-5f5fc0c8-28b5-4c6e-97e1-1aac4e8163c8 None None] Nova event response: {u\u0027status\u0027: u\u0027completed\u0027, u\u0027tag\u0027: u\u0027POWER_ON\u0027, u\u0027name\u0027: u\u0027power-update\u0027, u\u0027server_uuid\u0027: u\u00278264554d-7c99-40f0-b5ec-e164e4dd6043\u0027, u\u0027code\u0027: 200}. {{(pid\u003d27415) _send_event /opt/stack/ironic/ironic/common/nova.py:89}}\nINFO ironic.conductor.utils [None req-5f5fc0c8-28b5-4c6e-97e1-1aac4e8163c8 None None] Successfully set node 6655b4e8-b960-4534-989b-9df5bf212836 power state to power on by rebooting.\n\nIts because REBOOT state is converted to POWER_ON in ironic (https://github.com/openstack/ironic/blob/b8db11279e8ac7db7858cdbe0d1c728237ba8071/ironic/conductor/utils.py#L157) inside the ``node_power_action`` function. So I guess we are good.","commit_id":"121145f251b82940a5b47233dc51317d612f0d7f"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"57225e5c222da8f5f93c96f3f31097055917f6b3","unresolved":false,"context_lines":[{"line_number":106,"context_line":"    elif target_power_state \u003d\u003d states.POWER_OFF:"},{"line_number":107,"context_line":"        target_power_state \u003d \"POWER_OFF\""},{"line_number":108,"context_line":"    else:"},{"line_number":109,"context_line":"        LOG.error(\u0027Invalid Power State %s.\u0027, target_power_state)"},{"line_number":110,"context_line":"        return False"},{"line_number":111,"context_line":"    event \u003d _get_power_update_event(server_uuid, target_power_state)"},{"line_number":112,"context_line":"    try:"}],"source_content_type":"text/x-python","patch_set":11,"id":"7faddb67_0f29349a","line":109,"in_reply_to":"7faddb67_6948eb86","updated":"2019-08-08 12:38:42.000000000","message":"\u003e target_power_state can be REBOOT, no?\n\nREBOOT is not exactly a power state in nova (https://github.com/openstack/nova/blob/master/nova/compute/power_state.py). My spec was more about sending power state change database updates to avoid the hassle around power-sync. I am not sure if ironic triggering a reboot in nova is in the scope. Hopefully I am not missing something obvious.","commit_id":"121145f251b82940a5b47233dc51317d612f0d7f"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"c6267fcbe6b8e2f0216edd64bf98e36a04a92418","unresolved":false,"context_lines":[{"line_number":112,"context_line":"    try:"},{"line_number":113,"context_line":"        result \u003d _send_event(context, event, api_version\u003dNOVA_API_MICROVERSION)"},{"line_number":114,"context_line":"    except kaexception.ClientException as ex:"},{"line_number":115,"context_line":"        LOG.warning(\u0027CONF.nova.send_power_notifications is enabled, but \u0027"},{"line_number":116,"context_line":"                    \u0027could not talk to Nova. %s\u0027, ex)"},{"line_number":117,"context_line":"        return False"},{"line_number":118,"context_line":"    return result"}],"source_content_type":"text/x-python","patch_set":11,"id":"7faddb67_095db747","line":115,"updated":"2019-08-08 08:13:57.000000000","message":"The first part of the message is redundant","commit_id":"121145f251b82940a5b47233dc51317d612f0d7f"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"57225e5c222da8f5f93c96f3f31097055917f6b3","unresolved":false,"context_lines":[{"line_number":112,"context_line":"    try:"},{"line_number":113,"context_line":"        result \u003d _send_event(context, event, api_version\u003dNOVA_API_MICROVERSION)"},{"line_number":114,"context_line":"    except kaexception.ClientException as ex:"},{"line_number":115,"context_line":"        LOG.warning(\u0027CONF.nova.send_power_notifications is enabled, but \u0027"},{"line_number":116,"context_line":"                    \u0027could not talk to Nova. %s\u0027, ex)"},{"line_number":117,"context_line":"        return False"},{"line_number":118,"context_line":"    return result"}],"source_content_type":"text/x-python","patch_set":11,"id":"7faddb67_f42b4f92","line":115,"in_reply_to":"7faddb67_095db747","updated":"2019-08-08 12:38:42.000000000","message":"\u003e The first part of the message is redundant\n\nNot really right ? The whole point behind having this config was to use it for the standalone case. So if its a standalone deployment, all they have to do is to switch it off.","commit_id":"121145f251b82940a5b47233dc51317d612f0d7f"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"0211d88dd3325c86d32f031d55dea03028c0af89","unresolved":false,"context_lines":[{"line_number":112,"context_line":"    try:"},{"line_number":113,"context_line":"        result \u003d _send_event(context, event, api_version\u003dNOVA_API_MICROVERSION)"},{"line_number":114,"context_line":"    except kaexception.ClientException as ex:"},{"line_number":115,"context_line":"        LOG.warning(\u0027CONF.nova.send_power_notifications is enabled, but \u0027"},{"line_number":116,"context_line":"                    \u0027could not talk to Nova. %s\u0027, ex)"},{"line_number":117,"context_line":"        return False"},{"line_number":118,"context_line":"    return result"}],"source_content_type":"text/x-python","patch_set":11,"id":"7faddb67_0d02990a","line":115,"in_reply_to":"7faddb67_60b3150c","updated":"2019-08-08 15:24:58.000000000","message":"Done","commit_id":"121145f251b82940a5b47233dc51317d612f0d7f"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"eb944ebd3204fadc655b02c5848bd5d8ca1e55a3","unresolved":false,"context_lines":[{"line_number":112,"context_line":"    try:"},{"line_number":113,"context_line":"        result \u003d _send_event(context, event, api_version\u003dNOVA_API_MICROVERSION)"},{"line_number":114,"context_line":"    except kaexception.ClientException as ex:"},{"line_number":115,"context_line":"        LOG.warning(\u0027CONF.nova.send_power_notifications is enabled, but \u0027"},{"line_number":116,"context_line":"                    \u0027could not talk to Nova. %s\u0027, ex)"},{"line_number":117,"context_line":"        return False"},{"line_number":118,"context_line":"    return result"}],"source_content_type":"text/x-python","patch_set":11,"id":"7faddb67_60b3150c","line":115,"in_reply_to":"7faddb67_f42b4f92","updated":"2019-08-08 14:06:41.000000000","message":"Maybe \"Could not connect to Nova to send a power notification, please check configuration. %s\"","commit_id":"121145f251b82940a5b47233dc51317d612f0d7f"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"7ca20f171b23acf930030d0c5baec37ec000e53d","unresolved":false,"context_lines":[{"line_number":25,"context_line":"_NOVA_ADAPTER \u003d None"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"def _get_nova_adapter():"},{"line_number":29,"context_line":"    global _NOVA_ADAPTER"},{"line_number":30,"context_line":"    if not _NOVA_ADAPTER:"},{"line_number":31,"context_line":"        _NOVA_ADAPTER \u003d keystone.get_adapter("}],"source_content_type":"text/x-python","patch_set":13,"id":"7faddb67_b0af1c7c","line":28,"updated":"2019-08-08 16:23:20.000000000","message":"would still be neat if you used sdk for this, but that can be done later","commit_id":"f146426aed41b4fbcfe273d364b62087616f1fbb"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"7ca20f171b23acf930030d0c5baec37ec000e53d","unresolved":false,"context_lines":[{"line_number":43,"context_line":""},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"def _send_event(context, event, api_version\u003dNone):"},{"line_number":46,"context_line":"    \"\"\"Sends events to Nova conveying power state change."},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    :param context:"},{"line_number":49,"context_line":"        request context,"}],"source_content_type":"text/x-python","patch_set":13,"id":"7faddb67_10e070cc","line":46,"range":{"start_line":46,"start_character":13,"end_line":46,"end_character":19},"updated":"2019-08-08 16:23:20.000000000","message":"one event","commit_id":"f146426aed41b4fbcfe273d364b62087616f1fbb"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"6311db6214b03aa6ddd6e471d0861d1f2d7d3901","unresolved":false,"context_lines":[{"line_number":43,"context_line":""},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"def _send_event(context, event, api_version\u003dNone):"},{"line_number":46,"context_line":"    \"\"\"Sends events to Nova conveying power state change."},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    :param context:"},{"line_number":49,"context_line":"        request context,"}],"source_content_type":"text/x-python","patch_set":13,"id":"7faddb67_b82297b9","line":46,"range":{"start_line":46,"start_character":13,"end_line":46,"end_character":19},"in_reply_to":"7faddb67_10e070cc","updated":"2019-08-09 14:04:55.000000000","message":"Done","commit_id":"f146426aed41b4fbcfe273d364b62087616f1fbb"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"7ca20f171b23acf930030d0c5baec37ec000e53d","unresolved":false,"context_lines":[{"line_number":71,"context_line":"        LOG.warning(\u0027Failed to notify nova on event: %s. %s.\u0027,"},{"line_number":72,"context_line":"                    event, response.text)"},{"line_number":73,"context_line":"        return False"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    resp_event \u003d response.json()[\u0027events\u0027][0]"},{"line_number":76,"context_line":"    code \u003d resp_event.get(\u0027code\u0027)"},{"line_number":77,"context_line":"    if code is None:"}],"source_content_type":"text/x-python","patch_set":13,"id":"7faddb67_90678052","line":74,"updated":"2019-08-08 16:23:20.000000000","message":"So 207 weirdness falls through to here, where a \u003e\u003d400 code indicates the problem.","commit_id":"f146426aed41b4fbcfe273d364b62087616f1fbb"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"d4bf10ae073eb5b7b88b3573ee2032d774d1ffea","unresolved":false,"context_lines":[{"line_number":71,"context_line":"        LOG.warning(\u0027Failed to notify nova on event: %s. %s.\u0027,"},{"line_number":72,"context_line":"                    event, response.text)"},{"line_number":73,"context_line":"        return False"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    resp_event \u003d response.json()[\u0027events\u0027][0]"},{"line_number":76,"context_line":"    code \u003d resp_event.get(\u0027code\u0027)"},{"line_number":77,"context_line":"    if code is None:"}],"source_content_type":"text/x-python","patch_set":13,"id":"7faddb67_9ec0f17e","line":74,"in_reply_to":"7faddb67_90678052","updated":"2019-08-08 17:18:43.000000000","message":"yes","commit_id":"f146426aed41b4fbcfe273d364b62087616f1fbb"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"7ca20f171b23acf930030d0c5baec37ec000e53d","unresolved":false,"context_lines":[{"line_number":79,"context_line":"                  \u0027event %s.\u0027, response, event)"},{"line_number":80,"context_line":"        return False"},{"line_number":81,"context_line":"    elif code \u003e\u003d 400:"},{"line_number":82,"context_line":"        LOG.warning(\u0027Nova event: %s returned with failed status.\u0027, resp_event)"},{"line_number":83,"context_line":"    else:"},{"line_number":84,"context_line":"        LOG.debug(\u0027Nova event response: %s.\u0027, resp_event)"},{"line_number":85,"context_line":"    return True"}],"source_content_type":"text/x-python","patch_set":13,"id":"7faddb67_90cb0049","line":82,"range":{"start_line":82,"start_character":57,"end_line":82,"end_character":63},"updated":"2019-08-08 16:23:20.000000000","message":"This should return False, nah?","commit_id":"f146426aed41b4fbcfe273d364b62087616f1fbb"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"1b4d2bfdd5e105b7a9b0624eec09fb307e018f4a","unresolved":false,"context_lines":[{"line_number":79,"context_line":"                  \u0027event %s.\u0027, response, event)"},{"line_number":80,"context_line":"        return False"},{"line_number":81,"context_line":"    elif code \u003e\u003d 400:"},{"line_number":82,"context_line":"        LOG.warning(\u0027Nova event: %s returned with failed status.\u0027, resp_event)"},{"line_number":83,"context_line":"    else:"},{"line_number":84,"context_line":"        LOG.debug(\u0027Nova event response: %s.\u0027, resp_event)"},{"line_number":85,"context_line":"    return True"}],"source_content_type":"text/x-python","patch_set":13,"id":"7faddb67_5e4a79ac","line":82,"range":{"start_line":82,"start_character":57,"end_line":82,"end_character":63},"in_reply_to":"7faddb67_1e63a1b3","updated":"2019-08-08 17:37:03.000000000","message":"Ah, okay, that wasn\u0027t clear to me.","commit_id":"f146426aed41b4fbcfe273d364b62087616f1fbb"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"d4bf10ae073eb5b7b88b3573ee2032d774d1ffea","unresolved":false,"context_lines":[{"line_number":79,"context_line":"                  \u0027event %s.\u0027, response, event)"},{"line_number":80,"context_line":"        return False"},{"line_number":81,"context_line":"    elif code \u003e\u003d 400:"},{"line_number":82,"context_line":"        LOG.warning(\u0027Nova event: %s returned with failed status.\u0027, resp_event)"},{"line_number":83,"context_line":"    else:"},{"line_number":84,"context_line":"        LOG.debug(\u0027Nova event response: %s.\u0027, resp_event)"},{"line_number":85,"context_line":"    return True"}],"source_content_type":"text/x-python","patch_set":13,"id":"7faddb67_1e63a1b3","line":82,"range":{"start_line":82,"start_character":57,"end_line":82,"end_character":63},"in_reply_to":"7faddb67_90cb0049","updated":"2019-08-08 17:18:43.000000000","message":"No, this function returns true if an event was sent and received successfully, doesn\u0027t matter if the status of the event is failed or success. From Nova\u0027s pov the event\u0027s result was returned correctly.","commit_id":"f146426aed41b4fbcfe273d364b62087616f1fbb"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"0c04375a1ec3e6ff37f570a7fb03f6da8a6f5b64","unresolved":false,"context_lines":[{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    try:"},{"line_number":77,"context_line":"        resp_event \u003d response.json()[\u0027events\u0027][0]"},{"line_number":78,"context_line":"        code \u003d resp_event.get(\u0027code\u0027)"},{"line_number":79,"context_line":"    except Exception as e:"},{"line_number":80,"context_line":"        LOG.error(\u0027Invalid response %s returned from nova for power-update \u0027"},{"line_number":81,"context_line":"                  \u0027event %s. %s.\u0027, response, event, e)"}],"source_content_type":"text/x-python","patch_set":14,"id":"7faddb67_d5dab149","line":78,"range":{"start_line":78,"start_character":8,"end_line":78,"end_character":37},"updated":"2019-08-09 16:55:20.000000000","message":"If you made this\n\n code \u003d resp_event[\u0027code\u0027]\n\n...","commit_id":"90a546d97360577181b1124c21d12ae5af396bc8"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"0c04375a1ec3e6ff37f570a7fb03f6da8a6f5b64","unresolved":false,"context_lines":[{"line_number":81,"context_line":"                  \u0027event %s. %s.\u0027, response, event, e)"},{"line_number":82,"context_line":"        return False"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"    if code is None:"},{"line_number":85,"context_line":"        LOG.error(\u0027Invalid response %s returned from nova for power-update \u0027"},{"line_number":86,"context_line":"                  \u0027event %s.\u0027, response, event)"},{"line_number":87,"context_line":"        return False"},{"line_number":88,"context_line":"    elif code \u003e\u003d 400:"},{"line_number":89,"context_line":"        LOG.warning(\u0027Nova event: %s returned with failed status.\u0027, resp_event)"},{"line_number":90,"context_line":"    else:"},{"line_number":91,"context_line":"        LOG.debug(\u0027Nova event response: %s.\u0027, resp_event)"}],"source_content_type":"text/x-python","patch_set":14,"id":"7faddb67_f5b80de6","line":88,"range":{"start_line":84,"start_character":0,"end_line":88,"end_character":6},"updated":"2019-08-09 16:55:20.000000000","message":"...then you could get rid of this.","commit_id":"90a546d97360577181b1124c21d12ae5af396bc8"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"c55cdbfa27614be6b5ee71e82c62dd89efd9a318","unresolved":false,"context_lines":[{"line_number":68,"context_line":"                    \u0027please check configuration. %s\u0027, ex)"},{"line_number":69,"context_line":"        return False"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    if response.status_code is None or response.status_code \u003e\u003d 400:"},{"line_number":72,"context_line":"        LOG.warning(\u0027Failed to notify nova on event: %s. %s.\u0027,"},{"line_number":73,"context_line":"                    event, response.text)"},{"line_number":74,"context_line":"        return False"}],"source_content_type":"text/x-python","patch_set":16,"id":"7faddb67_c929aaf2","line":71,"range":{"start_line":71,"start_character":7,"end_line":71,"end_character":35},"updated":"2019-08-12 09:57:10.000000000","message":"I don\u0027t know if there can be a None status_code situation, its just a fail safe for the py3 type error in terms of comparison.","commit_id":"310136d25aad7a776076182e15559b0da60fde1c"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"b4f21cf1f44af2a4ce765d5838a3c058f01ca20b","unresolved":false,"context_lines":[{"line_number":68,"context_line":"                    \u0027please check configuration. %s\u0027, ex)"},{"line_number":69,"context_line":"        return False"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    if response.status_code is None or response.status_code \u003e\u003d 400:"},{"line_number":72,"context_line":"        LOG.warning(\u0027Failed to notify nova on event: %s. %s.\u0027,"},{"line_number":73,"context_line":"                    event, response.text)"},{"line_number":74,"context_line":"        return False"}],"source_content_type":"text/x-python","patch_set":16,"id":"7faddb67_898172c6","line":71,"range":{"start_line":71,"start_character":7,"end_line":71,"end_character":35},"in_reply_to":"7faddb67_c929aaf2","updated":"2019-08-12 10:08:27.000000000","message":"hmm I should just put this also in the try block below.","commit_id":"310136d25aad7a776076182e15559b0da60fde1c"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"ec98a4939d886a35680e7559fec828b2c113eb68","unresolved":false,"context_lines":[{"line_number":21,"context_line":"LOG \u003d log.getLogger(__name__)"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"NOVA_API_VERSION \u003d \"2.1\""},{"line_number":24,"context_line":"NOVA_API_MICROVERSION \u003d \u00272.75\u0027"},{"line_number":25,"context_line":"_NOVA_ADAPTER \u003d None"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"7faddb67_90f18e98","line":24,"updated":"2019-08-12 16:04:46.000000000","message":"2.75 doesn\u0027t seem to be in https://docs.openstack.org/nova/latest/reference/api-microversion-history.html but I take your word on it","commit_id":"75919c26965a8cc9e470f0181286776f235f6e90"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9766143e5bef469c47da789aeb124340f3cefabc","unresolved":false,"context_lines":[{"line_number":21,"context_line":"LOG \u003d log.getLogger(__name__)"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"NOVA_API_VERSION \u003d \"2.1\""},{"line_number":24,"context_line":"NOVA_API_MICROVERSION \u003d \u00272.75\u0027"},{"line_number":25,"context_line":"_NOVA_ADAPTER \u003d None"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"7faddb67_a2c7a064","line":24,"updated":"2019-08-12 14:42:47.000000000","message":"This is taken now, so this needs to be at least 2.76.","commit_id":"75919c26965a8cc9e470f0181286776f235f6e90"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6ce6e58dd990aff805a8efbfb3d0263149c2c8bf","unresolved":false,"context_lines":[{"line_number":21,"context_line":"LOG \u003d log.getLogger(__name__)"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"NOVA_API_VERSION \u003d \"2.1\""},{"line_number":24,"context_line":"NOVA_API_MICROVERSION \u003d \u00272.75\u0027"},{"line_number":25,"context_line":"_NOVA_ADAPTER \u003d None"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"7faddb67_c68f4973","line":24,"in_reply_to":"7faddb67_90f18e98","updated":"2019-08-12 19:03:39.000000000","message":"It will be: https://review.opendev.org/#/c/666889/14","commit_id":"75919c26965a8cc9e470f0181286776f235f6e90"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"0f25dc7e59f39e28e69050d82bb928ebaac13273","unresolved":false,"context_lines":[{"line_number":69,"context_line":"        return False"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    try:"},{"line_number":72,"context_line":"        if response.status_code \u003e\u003d 400:"},{"line_number":73,"context_line":"            LOG.warning(\u0027Failed to notify nova on event: %s. %s.\u0027,"},{"line_number":74,"context_line":"                        event, response.text)"},{"line_number":75,"context_line":"            return False"}],"source_content_type":"text/x-python","patch_set":19,"id":"7faddb67_46e599db","line":72,"updated":"2019-08-12 19:43:34.000000000","message":"I take it that this is raw http code.... and the 400 below is embedded in the message body? That seems to be the only way this handling code makes sense.","commit_id":"d693d4c06c1ba89332ef8f3f672809b3cc81f8c9"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"550c26ed0f590a2f2f8d34aad32e5e59652c36a0","unresolved":false,"context_lines":[{"line_number":69,"context_line":"        return False"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    try:"},{"line_number":72,"context_line":"        if response.status_code \u003e\u003d 400:"},{"line_number":73,"context_line":"            LOG.warning(\u0027Failed to notify nova on event: %s. %s.\u0027,"},{"line_number":74,"context_line":"                        event, response.text)"},{"line_number":75,"context_line":"            return False"}],"source_content_type":"text/x-python","patch_set":19,"id":"7faddb67_0c27b766","line":72,"in_reply_to":"7faddb67_46e599db","updated":"2019-08-13 12:51:24.000000000","message":"Yeah it\u0027s a requests.Response object so the status_code is the raw value from the server and text is the pretty form of the error message.","commit_id":"d693d4c06c1ba89332ef8f3f672809b3cc81f8c9"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"550c26ed0f590a2f2f8d34aad32e5e59652c36a0","unresolved":false,"context_lines":[{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    if code \u003e\u003d 400:"},{"line_number":84,"context_line":"        LOG.warning(\u0027Nova event: %s returned with failed status.\u0027, resp_event)"},{"line_number":85,"context_line":"    else:"},{"line_number":86,"context_line":"        LOG.debug(\u0027Nova event response: %s.\u0027, resp_event)"},{"line_number":87,"context_line":"    return True"},{"line_number":88,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"7faddb67_acea23d5","line":85,"updated":"2019-08-13 12:51:24.000000000","message":"In the non-400+ case the possible expected values from this API are 200 and 207, and the API ref says:\n\n\u003e A 200 will be returned if all events succeeded, 207 will be returned if some events could not be processed. The code attribute for the event will explain further what went wrong.\n\nSince we\u0027re only posting one event and expecting to get back one event in the response, is it possible to get a 207? But even if we did, it doesn\u0027t really matter right? Because we\u0027re checking the code on the event, not the code on the response itself.","commit_id":"d693d4c06c1ba89332ef8f3f672809b3cc81f8c9"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"3363f555e9a3fb83b9decc4545e5c37473029ce7","unresolved":false,"context_lines":[{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    if code \u003e\u003d 400:"},{"line_number":84,"context_line":"        LOG.warning(\u0027Nova event: %s returned with failed status.\u0027, resp_event)"},{"line_number":85,"context_line":"    else:"},{"line_number":86,"context_line":"        LOG.debug(\u0027Nova event response: %s.\u0027, resp_event)"},{"line_number":87,"context_line":"    return True"},{"line_number":88,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"3fa7e38b_c5d6f853","line":85,"in_reply_to":"3fa7e38b_22758298","updated":"2019-12-10 15:36:55.000000000","message":"I put up https://review.opendev.org/698273 for this.","commit_id":"d693d4c06c1ba89332ef8f3f672809b3cc81f8c9"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"14c8dc033a3ab53c0ac92bedd1e7ca1cd6605524","unresolved":false,"context_lines":[{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    if code \u003e\u003d 400:"},{"line_number":84,"context_line":"        LOG.warning(\u0027Nova event: %s returned with failed status.\u0027, resp_event)"},{"line_number":85,"context_line":"    else:"},{"line_number":86,"context_line":"        LOG.debug(\u0027Nova event response: %s.\u0027, resp_event)"},{"line_number":87,"context_line":"    return True"},{"line_number":88,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"3fa7e38b_22758298","line":85,"in_reply_to":"7faddb67_87494061","updated":"2019-12-10 14:43:35.000000000","message":"This has changed now, by [1], such that you\u0027ll *never* get the 404. If the (single) event bounces, you\u0027ll get 207 with an individual event code. The way this is coded, I believe that means it\u0027ll return True in that case. Where/how is that return value used?\n\n[Later] ...only in UT. Phew.\n\nFor the sake of form, it wouldn\u0027t be a terrible idea to refactor this code to work properly against the new behavior, which was always the intent. Since L84 was unreachable before anyway, this shouldn\u0027t affect prod code.\n\n[1] https://review.opendev.org/#/c/698037/","commit_id":"d693d4c06c1ba89332ef8f3f672809b3cc81f8c9"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"cdffd68ce2492ddd23791c2ca8336d62bf13d761","unresolved":false,"context_lines":[{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    if code \u003e\u003d 400:"},{"line_number":84,"context_line":"        LOG.warning(\u0027Nova event: %s returned with failed status.\u0027, resp_event)"},{"line_number":85,"context_line":"    else:"},{"line_number":86,"context_line":"        LOG.debug(\u0027Nova event response: %s.\u0027, resp_event)"},{"line_number":87,"context_line":"    return True"},{"line_number":88,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"7faddb67_87494061","line":85,"in_reply_to":"7faddb67_acea23d5","updated":"2019-08-13 13:34:50.000000000","message":"\u003e In the non-400+ case the possible expected values from this API are\n \u003e 200 and 207, and the API ref says:\n \u003e \n \u003e \u003e A 200 will be returned if all events succeeded, 207 will be\n \u003e returned if some events could not be processed. The code attribute\n \u003e for the event will explain further what went wrong.\n \u003e \n \u003e Since we\u0027re only posting one event and expecting to get back one\n \u003e event in the response, is it possible to get a 207?\n\nno its not possible.\n\n \u003e But even if we\n \u003e did, it doesn\u0027t really matter right? Because we\u0027re checking the\n \u003e code on the event, not the code on the response itself.\n\ncorrect. Btw, like noted before atm since we have bug 1839009 in nova, we would always get only one of the following responses:\n\n1) a code\u003d200 and status_code\u003d200 / when success - this will have L86 as debug\n2) or a HTTPNotFound with status_code\u003d404 / when its a failure irrespective of the type (https://github.com/openstack/nova/blob/e3a55493ba0cb405f14b9090282d93eb230c5715/nova/api/openstack/compute/server_external_events.py#L147) - this will have L73 as error.","commit_id":"d693d4c06c1ba89332ef8f3f672809b3cc81f8c9"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"550c26ed0f590a2f2f8d34aad32e5e59652c36a0","unresolved":false,"context_lines":[{"line_number":83,"context_line":"    if code \u003e\u003d 400:"},{"line_number":84,"context_line":"        LOG.warning(\u0027Nova event: %s returned with failed status.\u0027, resp_event)"},{"line_number":85,"context_line":"    else:"},{"line_number":86,"context_line":"        LOG.debug(\u0027Nova event response: %s.\u0027, resp_event)"},{"line_number":87,"context_line":"    return True"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"7faddb67_ec8edb30","line":86,"updated":"2019-08-13 12:51:24.000000000","message":"Here is an example 200 case:\n\nhttps://logs.opendev.org/42/664842/19/check/ironic-tempest-ipa-wholedisk-direct-tinyipa-multinode/4bd0408/controller/logs/screen-ir-cond.txt.gz#_Aug_12_18_57_50_506304\n\nAug 12 18:57:50.506304 ubuntu-bionic-rax-iad-0010063764 ironic-conductor[23335]: DEBUG ironic.common.nova [None req-9d647d50-f56c-48b2-bc3f-689016bf8986 None None] Nova event response: {u\u0027status\u0027: u\u0027completed\u0027, u\u0027tag\u0027: u\u0027POWER_OFF\u0027, u\u0027name\u0027: u\u0027power-update\u0027, u\u0027server_uuid\u0027: u\u0027c3541378-0afa-448d-9f3f-87008eeac085\u0027, u\u0027code\u0027: 200}. {{(pid\u003d23335) _send_event /opt/stack/ironic/ironic/common/nova.py:86}}","commit_id":"d693d4c06c1ba89332ef8f3f672809b3cc81f8c9"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"0f25dc7e59f39e28e69050d82bb928ebaac13273","unresolved":false,"context_lines":[{"line_number":84,"context_line":"        LOG.warning(\u0027Nova event: %s returned with failed status.\u0027, resp_event)"},{"line_number":85,"context_line":"    else:"},{"line_number":86,"context_line":"        LOG.debug(\u0027Nova event response: %s.\u0027, resp_event)"},{"line_number":87,"context_line":"    return True"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"def power_update(context, server_uuid, target_power_state):"}],"source_content_type":"text/x-python","patch_set":19,"id":"7faddb67_46fef96b","line":87,"updated":"2019-08-12 19:43:34.000000000","message":"I guess it makes sense to fall all the way through and return true.","commit_id":"d693d4c06c1ba89332ef8f3f672809b3cc81f8c9"}],"ironic/conductor/manager.py":[{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"f13f7ee8c8ccbbdef548f4296581c4f108850fae","unresolved":false,"context_lines":[{"line_number":1480,"context_line":"        if error is None:"},{"line_number":1481,"context_line":"            if power_state !\u003d node.power_state:"},{"line_number":1482,"context_line":"                old_power_state \u003d node.power_state"},{"line_number":1483,"context_line":"                node.power_state \u003d power_state"},{"line_number":1484,"context_line":"                task.process_event(\u0027done\u0027)"},{"line_number":1485,"context_line":"                notify_utils.emit_power_state_corrected_notification("},{"line_number":1486,"context_line":"                    task, old_power_state)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fb8cfa7_252ef2fa","line":1483,"updated":"2019-06-12 15:23:06.000000000","message":"also do it here (although I don\u0027t know if a node goes through this code path after scheduling.) if needed.","commit_id":"dd5fb9eec1a855be43bc68749ae6b9316c6966e8"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"c63740d83c1fb27a7718ed8597b1bb212948d531","unresolved":false,"context_lines":[{"line_number":1480,"context_line":"        if error is None:"},{"line_number":1481,"context_line":"            if power_state !\u003d node.power_state:"},{"line_number":1482,"context_line":"                old_power_state \u003d node.power_state"},{"line_number":1483,"context_line":"                node.power_state \u003d power_state"},{"line_number":1484,"context_line":"                task.process_event(\u0027done\u0027)"},{"line_number":1485,"context_line":"                notify_utils.emit_power_state_corrected_notification("},{"line_number":1486,"context_line":"                    task, old_power_state)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fb8cfa7_3447f4be","line":1483,"in_reply_to":"9fb8cfa7_252ef2fa","updated":"2019-06-13 09:05:27.000000000","message":"not needed since this happens during the enrolling/managing stages when there is no physical instance (https://docs.openstack.org/ironic/pike/_images/states.svg).","commit_id":"dd5fb9eec1a855be43bc68749ae6b9316c6966e8"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"11ef0f3d4b159e4a73e4b83cfa2423e4840fa118","unresolved":false,"context_lines":[{"line_number":3996,"context_line":"    node.fault \u003d faults.POWER_FAILURE"},{"line_number":3997,"context_line":"    node.save()"},{"line_number":3998,"context_line":"    if old_power_state !\u003d actual_power_state:"},{"line_number":3999,"context_line":"        if node.instance_uuid:"},{"line_number":4000,"context_line":"            nova.power_update("},{"line_number":4001,"context_line":"                task.context, node.instance_uuid, node.power_state)"},{"line_number":4002,"context_line":"        notify_utils.emit_power_state_corrected_notification("}],"source_content_type":"text/x-python","patch_set":10,"id":"7faddb67_b2fa20ba","line":3999,"range":{"start_line":3999,"start_character":11,"end_line":3999,"end_character":29},"updated":"2019-08-02 15:14:43.000000000","message":"It\u0027s weird (to my un-ironic-trained eye) that you\u0027re doing this everywhere. When/why doesn\u0027t a node have a UUID?\n\nOh, is instance_uuid the thing that signals the node is being handled by nova?\n\nAnd this is here so that, in the standalone case, we won\u0027t make any attempt to do the callback, regardless of the conf setting?\n\nIf that\u0027s an accurate guess, then have you considered moving the condition from here to the nova.power_update method itself, and doing a check-and-quick-return there? IMO that would make for a cleaner interface.\n\nAnother nit, you could conceivably collapse the node.instance_uuid and node.power_state params to just `node` and access the fields from within nova.power_update","commit_id":"c7439afb82445bd31ae2555f8f1cf97f8d13f278"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"21cb3af296912eed454250ab5098dbb9abaddebf","unresolved":false,"context_lines":[{"line_number":3996,"context_line":"    node.fault \u003d faults.POWER_FAILURE"},{"line_number":3997,"context_line":"    node.save()"},{"line_number":3998,"context_line":"    if old_power_state !\u003d actual_power_state:"},{"line_number":3999,"context_line":"        if node.instance_uuid:"},{"line_number":4000,"context_line":"            nova.power_update("},{"line_number":4001,"context_line":"                task.context, node.instance_uuid, node.power_state)"},{"line_number":4002,"context_line":"        notify_utils.emit_power_state_corrected_notification("}],"source_content_type":"text/x-python","patch_set":10,"id":"7faddb67_07c07be0","line":3999,"range":{"start_line":3999,"start_character":11,"end_line":3999,"end_character":29},"in_reply_to":"7faddb67_b2fa20ba","updated":"2019-08-05 16:04:44.000000000","message":"\u003e It\u0027s weird (to my un-ironic-trained eye) that you\u0027re doing this\n \u003e everywhere. When/why doesn\u0027t a node have a UUID?\n \u003e \n \u003e Oh, is instance_uuid the thing that signals the node is being\n \u003e handled by nova?\n\nwell to be accurate, if an instance_uuid is set, it means that the ironic node (compute node in nova) is hosting a physical instance, as in the node is in active state as opposed to the \"available\" state in which case the node is a candidate for scheduling.\n\n \u003e \n \u003e And this is here so that, in the standalone case, we won\u0027t make any\n \u003e attempt to do the callback, regardless of the conf setting?\n \u003e \n\nWe will attempt to call back in standalone case as well. Essentially the instance_uuid is just to know if the node is a candidate for scheduler versus if it is already hosting something. Similar to whether a compute node has an instance or not. So:\n\nnode.uuid \u003d\u003d compute_node.uuid \u003d\u003d rp.uuid and if the node possesses an instance, it means node.instance_uuid would be set which means we will have a corresponding instance record in the instances table in nova.\n\ntbh, I do not possess enough standalone scenario knowledge to imagine what takes care of scheduling or more like what replaces nova.\n\n \u003e If that\u0027s an accurate guess, then have you considered moving the\n \u003e condition from here to the nova.power_update method itself, and\n \u003e doing a check-and-quick-return there? IMO that would make for a\n \u003e cleaner interface.\n \u003e \n \u003e Another nit, you could conceivably collapse the node.instance_uuid\n \u003e and node.power_state params to just `node` and access the fields\n \u003e from within nova.power_update\n\nyeah I could just pass node and parse stuff from nova.py file, but I want to keep the variable terminology of using server_uuid/target_power_state and do not want to bring in the \"ironic node\" portion in the nova interface.","commit_id":"c7439afb82445bd31ae2555f8f1cf97f8d13f278"}],"ironic/conf/conductor.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"11ef0f3d4b159e4a73e4b83cfa2423e4840fa118","unresolved":false,"context_lines":[{"line_number":49,"context_line":"               help\u003d_(\u0027Maximum time (in seconds) since the last check-in \u0027"},{"line_number":50,"context_line":"                      \u0027of a conductor. A conductor is considered inactive \u0027"},{"line_number":51,"context_line":"                      \u0027when this time has been exceeded.\u0027)),"},{"line_number":52,"context_line":"    cfg.IntOpt(\u0027sync_power_state_interval\u0027,"},{"line_number":53,"context_line":"               default\u003d60,"},{"line_number":54,"context_line":"               help\u003d_(\u0027Interval between syncing the node power state to the \u0027"},{"line_number":55,"context_line":"                      \u0027database, in seconds. Set to 0 to disable syncing.\u0027)),"}],"source_content_type":"text/x-python","patch_set":10,"id":"7faddb67_e76a18eb","line":52,"range":{"start_line":52,"start_character":16,"end_line":52,"end_character":41},"updated":"2019-08-02 15:14:43.000000000","message":"✔","commit_id":"c7439afb82445bd31ae2555f8f1cf97f8d13f278"}],"ironic/tests/unit/common/test_nova.py":[{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"204c3543315b4d1dcdef67822b478692ee1dc418","unresolved":false,"context_lines":[{"line_number":147,"context_line":"                        \u0027tag\u0027: \u0027POWER_OFF\u0027}]),"},{"line_number":148,"context_line":"            mock.call([{\u0027name\u0027: \u0027power-update\u0027,"},{"line_number":149,"context_line":"                        \u0027server_uuid\u0027: \u0027server-id-2\u0027,"},{"line_number":150,"context_line":"                        \u0027tag\u0027: \u0027POWER_OFF\u0027}])"},{"line_number":151,"context_line":"        ])"}],"source_content_type":"text/x-python","patch_set":4,"id":"9fb8cfa7_0d22a3bb","line":150,"updated":"2019-07-03 13:46:04.000000000","message":"It would be good to have a test explicitly mocking no nova in the environment. It looks like we have only a single test on the NotFound side of the exception.","commit_id":"116e6f2cb22bc5d606563b9c7bf4f66edfc37647"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"bab59c9a010374e03d37abf3878824a23df27ccc","unresolved":false,"context_lines":[{"line_number":147,"context_line":"                        \u0027tag\u0027: \u0027POWER_OFF\u0027}]),"},{"line_number":148,"context_line":"            mock.call([{\u0027name\u0027: \u0027power-update\u0027,"},{"line_number":149,"context_line":"                        \u0027server_uuid\u0027: \u0027server-id-2\u0027,"},{"line_number":150,"context_line":"                        \u0027tag\u0027: \u0027POWER_OFF\u0027}])"},{"line_number":151,"context_line":"        ])"}],"source_content_type":"text/x-python","patch_set":4,"id":"9fb8cfa7_88d0c12d","line":150,"in_reply_to":"9fb8cfa7_0d22a3bb","updated":"2019-07-03 13:55:55.000000000","message":"\u003e It would be good to have a test explicitly mocking no nova in the\n \u003e environment. It looks like we have only a single test on the\n \u003e NotFound side of the exception.\n\ngood point, I am indeed missing coverage for this.","commit_id":"116e6f2cb22bc5d606563b9c7bf4f66edfc37647"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"70cac459e94975ef53960cfecad0fb7ed9080977","unresolved":false,"context_lines":[{"line_number":147,"context_line":"                        \u0027tag\u0027: \u0027POWER_OFF\u0027}]),"},{"line_number":148,"context_line":"            mock.call([{\u0027name\u0027: \u0027power-update\u0027,"},{"line_number":149,"context_line":"                        \u0027server_uuid\u0027: \u0027server-id-2\u0027,"},{"line_number":150,"context_line":"                        \u0027tag\u0027: \u0027POWER_OFF\u0027}])"},{"line_number":151,"context_line":"        ])"}],"source_content_type":"text/x-python","patch_set":4,"id":"7faddb67_2341803a","line":150,"in_reply_to":"9fb8cfa7_88d0c12d","updated":"2019-07-09 08:38:16.000000000","message":"\u003e \u003e It would be good to have a test explicitly mocking no nova in the\n \u003e \u003e environment. It looks like we have only a single test on the\n \u003e \u003e NotFound side of the exception.\n \u003e \n \u003e good point, I am indeed missing coverage for this.\n\nActually I am not missing the exception test, I have four tests (which are the faulty cases in the _send_events function) in the same test checking for the NotFound, Exception being caught, incorrect list being returned and if a NULL code result is returned using ddt module. So I am already testing a case of where the Exception is raised. But I should do another test which explicitly creates it and checks for the warning message also.","commit_id":"116e6f2cb22bc5d606563b9c7bf4f66edfc37647"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"6fea953f7efde182da414b9bf21367dd013afb62","unresolved":false,"context_lines":[{"line_number":26,"context_line":"@mock.patch.object(keystone, \u0027get_adapter\u0027, autospec\u003dTrue)"},{"line_number":27,"context_line":"class TestNovaAdapter(base.TestCase):"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    def setUp(self):"},{"line_number":30,"context_line":"        super(TestNovaAdapter, self).setUp()"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    def test_get_nova_adapter(self, mock_adapter, mock_nova_session):"},{"line_number":33,"context_line":"        nova._NOVA_ADAPTER \u003d None"}],"source_content_type":"text/x-python","patch_set":10,"id":"7faddb67_527e4ce4","line":30,"range":{"start_line":29,"start_character":0,"end_line":30,"end_character":44},"updated":"2019-08-02 15:19:18.000000000","message":"nit: not needed","commit_id":"c7439afb82445bd31ae2555f8f1cf97f8d13f278"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"21cb3af296912eed454250ab5098dbb9abaddebf","unresolved":false,"context_lines":[{"line_number":26,"context_line":"@mock.patch.object(keystone, \u0027get_adapter\u0027, autospec\u003dTrue)"},{"line_number":27,"context_line":"class TestNovaAdapter(base.TestCase):"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    def setUp(self):"},{"line_number":30,"context_line":"        super(TestNovaAdapter, self).setUp()"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    def test_get_nova_adapter(self, mock_adapter, mock_nova_session):"},{"line_number":33,"context_line":"        nova._NOVA_ADAPTER \u003d None"}],"source_content_type":"text/x-python","patch_set":10,"id":"7faddb67_67792fc3","line":30,"range":{"start_line":29,"start_character":0,"end_line":30,"end_character":44},"in_reply_to":"7faddb67_527e4ce4","updated":"2019-08-05 16:04:44.000000000","message":"Done","commit_id":"c7439afb82445bd31ae2555f8f1cf97f8d13f278"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"11ef0f3d4b159e4a73e4b83cfa2423e4840fa118","unresolved":false,"context_lines":[{"line_number":43,"context_line":"        \"\"\"Check if existing adapter is used.\"\"\""},{"line_number":44,"context_line":"        mock_nova_session.reset_mock()"},{"line_number":45,"context_line":"        nova._get_nova_adapter()"},{"line_number":46,"context_line":"        self.assertFalse(mock_nova_session.called)"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"@ddt.ddt"}],"source_content_type":"text/x-python","patch_set":10,"id":"7faddb67_b27f8013","line":46,"range":{"start_line":46,"start_character":8,"end_line":46,"end_character":50},"updated":"2019-08-02 15:14:43.000000000","message":"or\n\n mock_nova_session.assert_not_called()","commit_id":"c7439afb82445bd31ae2555f8f1cf97f8d13f278"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"21cb3af296912eed454250ab5098dbb9abaddebf","unresolved":false,"context_lines":[{"line_number":43,"context_line":"        \"\"\"Check if existing adapter is used.\"\"\""},{"line_number":44,"context_line":"        mock_nova_session.reset_mock()"},{"line_number":45,"context_line":"        nova._get_nova_adapter()"},{"line_number":46,"context_line":"        self.assertFalse(mock_nova_session.called)"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"@ddt.ddt"}],"source_content_type":"text/x-python","patch_set":10,"id":"7faddb67_2751f736","line":46,"range":{"start_line":46,"start_character":8,"end_line":46,"end_character":50},"in_reply_to":"7faddb67_b27f8013","updated":"2019-08-05 16:04:44.000000000","message":"Done","commit_id":"c7439afb82445bd31ae2555f8f1cf97f8d13f278"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"6fea953f7efde182da414b9bf21367dd013afb62","unresolved":false,"context_lines":[{"line_number":60,"context_line":"                           \u0027server_uuid\u0027: \u00271234\u0027,"},{"line_number":61,"context_line":"                           \u0027code\u0027: 200}]},"},{"line_number":62,"context_line":"              {\u0027events\u0027: [{\u0027code\u0027: 404}]})"},{"line_number":63,"context_line":"    @mock.patch.object(nova, \u0027LOG\u0027, autospec\u003dTrue)"},{"line_number":64,"context_line":"    def test_power_update(self, nova_result, mock_log):"},{"line_number":65,"context_line":"        server_ids \u003d [\u0027server-id-1\u0027, \u0027server-id-2\u0027]"},{"line_number":66,"context_line":"        nova_adapter \u003d mock.Mock()"}],"source_content_type":"text/x-python","patch_set":10,"id":"7faddb67_d2523c67","line":63,"range":{"start_line":63,"start_character":0,"end_line":63,"end_character":50},"updated":"2019-08-02 15:19:18.000000000","message":"This is repeated for every method, so it can be moved to the class level","commit_id":"c7439afb82445bd31ae2555f8f1cf97f8d13f278"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"21cb3af296912eed454250ab5098dbb9abaddebf","unresolved":false,"context_lines":[{"line_number":60,"context_line":"                           \u0027server_uuid\u0027: \u00271234\u0027,"},{"line_number":61,"context_line":"                           \u0027code\u0027: 200}]},"},{"line_number":62,"context_line":"              {\u0027events\u0027: [{\u0027code\u0027: 404}]})"},{"line_number":63,"context_line":"    @mock.patch.object(nova, \u0027LOG\u0027, autospec\u003dTrue)"},{"line_number":64,"context_line":"    def test_power_update(self, nova_result, mock_log):"},{"line_number":65,"context_line":"        server_ids \u003d [\u0027server-id-1\u0027, \u0027server-id-2\u0027]"},{"line_number":66,"context_line":"        nova_adapter \u003d mock.Mock()"}],"source_content_type":"text/x-python","patch_set":10,"id":"7faddb67_67a4cf4b","line":63,"range":{"start_line":63,"start_character":0,"end_line":63,"end_character":50},"in_reply_to":"7faddb67_d2523c67","updated":"2019-08-05 16:04:44.000000000","message":"Done","commit_id":"c7439afb82445bd31ae2555f8f1cf97f8d13f278"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"11ef0f3d4b159e4a73e4b83cfa2423e4840fa118","unresolved":false,"context_lines":[{"line_number":63,"context_line":"    @mock.patch.object(nova, \u0027LOG\u0027, autospec\u003dTrue)"},{"line_number":64,"context_line":"    def test_power_update(self, nova_result, mock_log):"},{"line_number":65,"context_line":"        server_ids \u003d [\u0027server-id-1\u0027, \u0027server-id-2\u0027]"},{"line_number":66,"context_line":"        nova_adapter \u003d mock.Mock()"},{"line_number":67,"context_line":"        with mock.patch.object(nova, \u0027_get_nova_adapter\u0027) as mock_adapter, \\"},{"line_number":68,"context_line":"                mock.patch.object(nova_adapter,"},{"line_number":69,"context_line":"                                  \u0027post\u0027) as mock_post_event:"},{"line_number":70,"context_line":"            post_resp_mock \u003d mock.Mock()"},{"line_number":71,"context_line":"            post_resp_mock.json.return_value \u003d nova_result"},{"line_number":72,"context_line":"            mock_adapter.return_value \u003d nova_adapter"}],"source_content_type":"text/x-python","patch_set":10,"id":"7faddb67_32915048","line":69,"range":{"start_line":66,"start_character":0,"end_line":69,"end_character":61},"updated":"2019-08-02 15:14:43.000000000","message":"You could do this mock setup in setUp (and save the mocks as instance attrs) to tidy up your test methods a bit.","commit_id":"c7439afb82445bd31ae2555f8f1cf97f8d13f278"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"6fea953f7efde182da414b9bf21367dd013afb62","unresolved":false,"context_lines":[{"line_number":63,"context_line":"    @mock.patch.object(nova, \u0027LOG\u0027, autospec\u003dTrue)"},{"line_number":64,"context_line":"    def test_power_update(self, nova_result, mock_log):"},{"line_number":65,"context_line":"        server_ids \u003d [\u0027server-id-1\u0027, \u0027server-id-2\u0027]"},{"line_number":66,"context_line":"        nova_adapter \u003d mock.Mock()"},{"line_number":67,"context_line":"        with mock.patch.object(nova, \u0027_get_nova_adapter\u0027) as mock_adapter, \\"},{"line_number":68,"context_line":"                mock.patch.object(nova_adapter,"},{"line_number":69,"context_line":"                                  \u0027post\u0027) as mock_post_event:"},{"line_number":70,"context_line":"            post_resp_mock \u003d mock.Mock()"},{"line_number":71,"context_line":"            post_resp_mock.json.return_value \u003d nova_result"},{"line_number":72,"context_line":"            mock_adapter.return_value \u003d nova_adapter"}],"source_content_type":"text/x-python","patch_set":10,"id":"7faddb67_926fe426","line":69,"range":{"start_line":66,"start_character":0,"end_line":69,"end_character":61},"in_reply_to":"7faddb67_32915048","updated":"2019-08-02 15:19:18.000000000","message":"I\u0027d do them on the method, similarly to line 63","commit_id":"c7439afb82445bd31ae2555f8f1cf97f8d13f278"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"21cb3af296912eed454250ab5098dbb9abaddebf","unresolved":false,"context_lines":[{"line_number":63,"context_line":"    @mock.patch.object(nova, \u0027LOG\u0027, autospec\u003dTrue)"},{"line_number":64,"context_line":"    def test_power_update(self, nova_result, mock_log):"},{"line_number":65,"context_line":"        server_ids \u003d [\u0027server-id-1\u0027, \u0027server-id-2\u0027]"},{"line_number":66,"context_line":"        nova_adapter \u003d mock.Mock()"},{"line_number":67,"context_line":"        with mock.patch.object(nova, \u0027_get_nova_adapter\u0027) as mock_adapter, \\"},{"line_number":68,"context_line":"                mock.patch.object(nova_adapter,"},{"line_number":69,"context_line":"                                  \u0027post\u0027) as mock_post_event:"},{"line_number":70,"context_line":"            post_resp_mock \u003d mock.Mock()"},{"line_number":71,"context_line":"            post_resp_mock.json.return_value \u003d nova_result"},{"line_number":72,"context_line":"            mock_adapter.return_value \u003d nova_adapter"}],"source_content_type":"text/x-python","patch_set":10,"id":"7faddb67_e29f4dff","line":69,"range":{"start_line":66,"start_character":0,"end_line":69,"end_character":61},"in_reply_to":"7faddb67_926fe426","updated":"2019-08-05 16:04:44.000000000","message":"I\u0027ll try to tidy it up as suggested.","commit_id":"c7439afb82445bd31ae2555f8f1cf97f8d13f278"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"c6267fcbe6b8e2f0216edd64bf98e36a04a92418","unresolved":false,"context_lines":[{"line_number":126,"context_line":"                mock_log.reset_mock()"},{"line_number":127,"context_line":"                nova_result.status_code \u003d stat_code"},{"line_number":128,"context_line":"                type(nova_result).text \u003d mock.PropertyMock(return_value\u003d\"blah\")"},{"line_number":129,"context_line":"                if stat_code is 207:"},{"line_number":130,"context_line":"                    def json_func():"},{"line_number":131,"context_line":"                        return {\u0027events\u0027: [{\u0027code\u0027: None}]}"},{"line_number":132,"context_line":"                    nova_result.json \u003d json_func"}],"source_content_type":"text/x-python","patch_set":11,"id":"7faddb67_295af34f","line":129,"updated":"2019-08-08 08:13:57.000000000","message":"do not use \"is\" for comparing numbers. the fact that it works is a CPython implementation details and is not guaranteed (same below)","commit_id":"121145f251b82940a5b47233dc51317d612f0d7f"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"57225e5c222da8f5f93c96f3f31097055917f6b3","unresolved":false,"context_lines":[{"line_number":126,"context_line":"                mock_log.reset_mock()"},{"line_number":127,"context_line":"                nova_result.status_code \u003d stat_code"},{"line_number":128,"context_line":"                type(nova_result).text \u003d mock.PropertyMock(return_value\u003d\"blah\")"},{"line_number":129,"context_line":"                if stat_code is 207:"},{"line_number":130,"context_line":"                    def json_func():"},{"line_number":131,"context_line":"                        return {\u0027events\u0027: [{\u0027code\u0027: None}]}"},{"line_number":132,"context_line":"                    nova_result.json \u003d json_func"}],"source_content_type":"text/x-python","patch_set":11,"id":"7faddb67_2ff7508f","line":129,"in_reply_to":"7faddb67_295af34f","updated":"2019-08-08 12:38:42.000000000","message":"ack","commit_id":"121145f251b82940a5b47233dc51317d612f0d7f"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"7ca20f171b23acf930030d0c5baec37ec000e53d","unresolved":false,"context_lines":[{"line_number":75,"context_line":"            mock_post_event.return_value \u003d post_resp_mock"},{"line_number":76,"context_line":"            for server in server_ids:"},{"line_number":77,"context_line":"                result \u003d self.api.power_update(self.ctx, server, \u0027power on\u0027)"},{"line_number":78,"context_line":"                self.assertTrue(result)"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"        mock_adapter.assert_has_calls([mock.call(), mock.call()])"},{"line_number":81,"context_line":"        req_url \u003d \u0027/os-server-external-events\u0027"}],"source_content_type":"text/x-python","patch_set":13,"id":"7faddb67_b00b9c7b","line":78,"range":{"start_line":78,"start_character":21,"end_line":78,"end_character":31},"updated":"2019-08-08 16:23:20.000000000","message":"Yeah, this should assertFalse for the 404 and 400 events.","commit_id":"f146426aed41b4fbcfe273d364b62087616f1fbb"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"d4bf10ae073eb5b7b88b3573ee2032d774d1ffea","unresolved":false,"context_lines":[{"line_number":75,"context_line":"            mock_post_event.return_value \u003d post_resp_mock"},{"line_number":76,"context_line":"            for server in server_ids:"},{"line_number":77,"context_line":"                result \u003d self.api.power_update(self.ctx, server, \u0027power on\u0027)"},{"line_number":78,"context_line":"                self.assertTrue(result)"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"        mock_adapter.assert_has_calls([mock.call(), mock.call()])"},{"line_number":81,"context_line":"        req_url \u003d \u0027/os-server-external-events\u0027"}],"source_content_type":"text/x-python","patch_set":13,"id":"7faddb67_feb9e5eb","line":78,"range":{"start_line":78,"start_character":21,"end_line":78,"end_character":31},"in_reply_to":"7faddb67_b00b9c7b","updated":"2019-08-08 17:18:43.000000000","message":"\u003e Yeah, this should assertFalse for the 404 and 400 events.\n\nNo the \u0027code\u0027 in /os-external-events can be 400/404/422 and still be a valid result from nova (this of course won\u0027t happen in today\u0027s nova world because of https://bugs.launchpad.net/nova/+bug/1839009 , but ideally it should happen). What should be false is if the status_code in the Response body is \u003e\u003d400.","commit_id":"f146426aed41b4fbcfe273d364b62087616f1fbb"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"7ca20f171b23acf930030d0c5baec37ec000e53d","unresolved":false,"context_lines":[{"line_number":128,"context_line":"                type(nova_result).text \u003d mock.PropertyMock(return_value\u003d\"blah\")"},{"line_number":129,"context_line":"                if stat_code \u003d\u003d 207:"},{"line_number":130,"context_line":"                    def json_func():"},{"line_number":131,"context_line":"                        return {\u0027events\u0027: [{\u0027code\u0027: None}]}"},{"line_number":132,"context_line":"                    nova_result.json \u003d json_func"},{"line_number":133,"context_line":"                mock_post_event.return_value \u003d nova_result"},{"line_number":134,"context_line":"                result \u003d self.api.power_update("}],"source_content_type":"text/x-python","patch_set":13,"id":"7faddb67_30900cee","line":131,"range":{"start_line":131,"start_character":52,"end_line":131,"end_character":56},"updated":"2019-08-08 16:23:20.000000000","message":"IIUC, when stat_code \u003d\u003d 207, this code will be one of 400, 404, or 422, so you should be testing (at least one of) those as well. As written, I think those are broken because they will return True (as noted in the code).\n\nAnd you should also cover the case where you get\n\n {\u0027events\u0027: [{}]}\n\n...which I think your code handles properly.\n\n(If you wanted to get really defensive, you could also cover things like\n\n {\u0027events\u0027: []}\n\nand\n\n {\u0027events\u0027: None}\n\nand maybe even\n\n {}\n\nall of which I think your code doesn\u0027t handle right now. Probably overkill, though.)","commit_id":"f146426aed41b4fbcfe273d364b62087616f1fbb"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"6311db6214b03aa6ddd6e471d0861d1f2d7d3901","unresolved":false,"context_lines":[{"line_number":128,"context_line":"                type(nova_result).text \u003d mock.PropertyMock(return_value\u003d\"blah\")"},{"line_number":129,"context_line":"                if stat_code \u003d\u003d 207:"},{"line_number":130,"context_line":"                    def json_func():"},{"line_number":131,"context_line":"                        return {\u0027events\u0027: [{\u0027code\u0027: None}]}"},{"line_number":132,"context_line":"                    nova_result.json \u003d json_func"},{"line_number":133,"context_line":"                mock_post_event.return_value \u003d nova_result"},{"line_number":134,"context_line":"                result \u003d self.api.power_update("}],"source_content_type":"text/x-python","patch_set":13,"id":"7faddb67_3bd0e153","line":131,"range":{"start_line":131,"start_character":52,"end_line":131,"end_character":56},"in_reply_to":"7faddb67_30900cee","updated":"2019-08-09 14:04:55.000000000","message":"\u003e IIUC, when stat_code \u003d\u003d 207, this code will be one of 400, 404, or\n \u003e 422, so you should be testing (at least one of) those as well. As\n \u003e written, I think those are broken because they will return True (as\n \u003e noted in the code).\n \u003e \n \u003e And you should also cover the case where you get\n \u003e \n \u003e {\u0027events\u0027: [{}]}\n \u003e \n \u003e ...which I think your code handles properly.\n \u003e \n \u003e (If you wanted to get really defensive, you could also cover things\n \u003e like\n \u003e \n \u003e {\u0027events\u0027: []}\n \u003e \n \u003e and\n \u003e \n \u003e {\u0027events\u0027: None}\n \u003e \n \u003e and maybe even\n \u003e \n \u003e {}\n \u003e \n \u003e all of which I think your code doesn\u0027t handle right now. Probably\n \u003e overkill, though.)\n\ngood points for UI check. I\u0027ll see what I can do. Probably doing too much of these checks is useless since in the end it cannot be guaranteed what comes through","commit_id":"f146426aed41b4fbcfe273d364b62087616f1fbb"}],"ironic/tests/unit/conductor/test_manager.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"6fea953f7efde182da414b9bf21367dd013afb62","unresolved":false,"context_lines":[{"line_number":6297,"context_line":"        self.assertFalse(node_power_action.called)"},{"line_number":6298,"context_line":"        self.assertFalse(self.task.upgrade_lock.called)"},{"line_number":6299,"context_line":""},{"line_number":6300,"context_line":"    @mock.patch.object(nova, \u0027power_update\u0027)"},{"line_number":6301,"context_line":"    def test_state_not_set(self, mock_power_update, node_power_action):"},{"line_number":6302,"context_line":"        self._do_sync_power_state(None, states.POWER_ON)"},{"line_number":6303,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"7faddb67_7246e8c2","line":6300,"updated":"2019-08-02 15:19:18.000000000","message":"autospec\u003dTrue","commit_id":"c7439afb82445bd31ae2555f8f1cf97f8d13f278"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"21cb3af296912eed454250ab5098dbb9abaddebf","unresolved":false,"context_lines":[{"line_number":6297,"context_line":"        self.assertFalse(node_power_action.called)"},{"line_number":6298,"context_line":"        self.assertFalse(self.task.upgrade_lock.called)"},{"line_number":6299,"context_line":""},{"line_number":6300,"context_line":"    @mock.patch.object(nova, \u0027power_update\u0027)"},{"line_number":6301,"context_line":"    def test_state_not_set(self, mock_power_update, node_power_action):"},{"line_number":6302,"context_line":"        self._do_sync_power_state(None, states.POWER_ON)"},{"line_number":6303,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"7faddb67_bd3e5a88","line":6300,"in_reply_to":"7faddb67_7246e8c2","updated":"2019-08-05 16:04:44.000000000","message":"Done","commit_id":"c7439afb82445bd31ae2555f8f1cf97f8d13f278"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"6fea953f7efde182da414b9bf21367dd013afb62","unresolved":false,"context_lines":[{"line_number":6338,"context_line":"        self.assertEqual(1,"},{"line_number":6339,"context_line":"                         self.service.power_state_sync_count[self.node.uuid])"},{"line_number":6340,"context_line":""},{"line_number":6341,"context_line":"    @mock.patch.object(nova, \u0027power_update\u0027)"},{"line_number":6342,"context_line":"    def test_state_changed_no_sync(self, mock_power_update, node_power_action):"},{"line_number":6343,"context_line":"        self._do_sync_power_state(states.POWER_ON, states.POWER_OFF)"},{"line_number":6344,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"7faddb67_321630aa","line":6341,"updated":"2019-08-02 15:19:18.000000000","message":"ditto here and below","commit_id":"c7439afb82445bd31ae2555f8f1cf97f8d13f278"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"21cb3af296912eed454250ab5098dbb9abaddebf","unresolved":false,"context_lines":[{"line_number":6338,"context_line":"        self.assertEqual(1,"},{"line_number":6339,"context_line":"                         self.service.power_state_sync_count[self.node.uuid])"},{"line_number":6340,"context_line":""},{"line_number":6341,"context_line":"    @mock.patch.object(nova, \u0027power_update\u0027)"},{"line_number":6342,"context_line":"    def test_state_changed_no_sync(self, mock_power_update, node_power_action):"},{"line_number":6343,"context_line":"        self._do_sync_power_state(states.POWER_ON, states.POWER_OFF)"},{"line_number":6344,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"7faddb67_7d4c6241","line":6341,"in_reply_to":"7faddb67_321630aa","updated":"2019-08-05 16:04:44.000000000","message":"Done","commit_id":"c7439afb82445bd31ae2555f8f1cf97f8d13f278"}],"ironic/tests/unit/conductor/test_utils.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"6fea953f7efde182da414b9bf21367dd013afb62","unresolved":false,"context_lines":[{"line_number":177,"context_line":""},{"line_number":178,"context_line":"    @mock.patch(\u0027ironic.objects.node.NodeSetPowerStateNotification\u0027)"},{"line_number":179,"context_line":"    @mock.patch.object(fake.FakePower, \u0027get_power_state\u0027, autospec\u003dTrue)"},{"line_number":180,"context_line":"    @mock.patch.object(nova, \u0027power_update\u0027)"},{"line_number":181,"context_line":"    def test_node_power_action_power_on_notify(self, mock_power_update,"},{"line_number":182,"context_line":"                                               get_power_mock,"},{"line_number":183,"context_line":"                                               mock_notif):"}],"source_content_type":"text/x-python","patch_set":10,"id":"7faddb67_12369452","line":180,"updated":"2019-08-02 15:19:18.000000000","message":"autospec\u003dTrue","commit_id":"c7439afb82445bd31ae2555f8f1cf97f8d13f278"}],"lower-constraints.txt":[{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"6bb489d97b9642c4ef100646ecf88aa2d0c1e7d7","unresolved":false,"context_lines":[{"line_number":119,"context_line":"python-keystoneclient\u003d\u003d3.15.0"},{"line_number":120,"context_line":"python-mimeparse\u003d\u003d1.6.0"},{"line_number":121,"context_line":"python-neutronclient\u003d\u003d6.7.0"},{"line_number":122,"context_line":"python-novaclient\u003d\u003d14.1.0"},{"line_number":123,"context_line":"python-subunit\u003d\u003d1.2.0"},{"line_number":124,"context_line":"python-swiftclient\u003d\u003d3.2.0"},{"line_number":125,"context_line":"pytz\u003d\u003d2013.6"}],"source_content_type":"text/plain","patch_set":4,"id":"9fb8cfa7_b439e9d7","line":122,"range":{"start_line":122,"start_character":22,"end_line":122,"end_character":23},"updated":"2019-06-26 13:50:35.000000000","message":"will be changed to next version once the nova side work merges.","commit_id":"116e6f2cb22bc5d606563b9c7bf4f66edfc37647"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"204c3543315b4d1dcdef67822b478692ee1dc418","unresolved":false,"context_lines":[{"line_number":119,"context_line":"python-keystoneclient\u003d\u003d3.15.0"},{"line_number":120,"context_line":"python-mimeparse\u003d\u003d1.6.0"},{"line_number":121,"context_line":"python-neutronclient\u003d\u003d6.7.0"},{"line_number":122,"context_line":"python-novaclient\u003d\u003d14.1.0"},{"line_number":123,"context_line":"python-subunit\u003d\u003d1.2.0"},{"line_number":124,"context_line":"python-swiftclient\u003d\u003d3.2.0"},{"line_number":125,"context_line":"pytz\u003d\u003d2013.6"}],"source_content_type":"text/plain","patch_set":4,"id":"9fb8cfa7_ed7aafb8","line":122,"range":{"start_line":122,"start_character":22,"end_line":122,"end_character":23},"in_reply_to":"9fb8cfa7_b439e9d7","updated":"2019-07-03 13:46:04.000000000","message":"Acknowledged","commit_id":"116e6f2cb22bc5d606563b9c7bf4f66edfc37647"}],"releasenotes/notes/bp-nova-support-instance-power-update-49c531ef13982e62.yaml":[{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"204c3543315b4d1dcdef67822b478692ee1dc418","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    Add power state change callbacks of an instance to nova by performing API"},{"line_number":5,"context_line":"    requests. Whenever there is a change in the power state of a physical"},{"line_number":6,"context_line":"    instance (example a \"power on\" or \"power off\" IPMI command is issued or the"},{"line_number":7,"context_line":"    periodic ``_sync_power_states`` task detects a change in power state)"}],"source_content_type":"text/x-yaml","patch_set":4,"id":"9fb8cfa7_6d16bf58","line":4,"range":{"start_line":4,"start_character":55,"end_line":4,"end_character":60},"updated":"2019-07-03 13:46:04.000000000","message":"s/nova/Compute service/","commit_id":"116e6f2cb22bc5d606563b9c7bf4f66edfc37647"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"bab59c9a010374e03d37abf3878824a23df27ccc","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    Add power state change callbacks of an instance to nova by performing API"},{"line_number":5,"context_line":"    requests. Whenever there is a change in the power state of a physical"},{"line_number":6,"context_line":"    instance (example a \"power on\" or \"power off\" IPMI command is issued or the"},{"line_number":7,"context_line":"    periodic ``_sync_power_states`` task detects a change in power state)"}],"source_content_type":"text/x-yaml","patch_set":4,"id":"9fb8cfa7_485729cc","line":4,"range":{"start_line":4,"start_character":55,"end_line":4,"end_character":60},"in_reply_to":"9fb8cfa7_6d16bf58","updated":"2019-07-03 13:55:55.000000000","message":"Done","commit_id":"116e6f2cb22bc5d606563b9c7bf4f66edfc37647"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"204c3543315b4d1dcdef67822b478692ee1dc418","unresolved":false,"context_lines":[{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    Add power state change callbacks of an instance to nova by performing API"},{"line_number":5,"context_line":"    requests. Whenever there is a change in the power state of a physical"},{"line_number":6,"context_line":"    instance (example a \"power on\" or \"power off\" IPMI command is issued or the"},{"line_number":7,"context_line":"    periodic ``_sync_power_states`` task detects a change in power state)"},{"line_number":8,"context_line":"    ironic will create and send a ``power-update`` external event to nova using"}],"source_content_type":"text/x-yaml","patch_set":4,"id":"9fb8cfa7_e8b29d49","line":5,"range":{"start_line":5,"start_character":0,"end_line":5,"end_character":13},"updated":"2019-07-03 13:46:04.000000000","message":"maybe s/requests/notification/?","commit_id":"116e6f2cb22bc5d606563b9c7bf4f66edfc37647"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"bab59c9a010374e03d37abf3878824a23df27ccc","unresolved":false,"context_lines":[{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    Add power state change callbacks of an instance to nova by performing API"},{"line_number":5,"context_line":"    requests. Whenever there is a change in the power state of a physical"},{"line_number":6,"context_line":"    instance (example a \"power on\" or \"power off\" IPMI command is issued or the"},{"line_number":7,"context_line":"    periodic ``_sync_power_states`` task detects a change in power state)"},{"line_number":8,"context_line":"    ironic will create and send a ``power-update`` external event to nova using"}],"source_content_type":"text/x-yaml","patch_set":4,"id":"9fb8cfa7_286e7596","line":5,"range":{"start_line":5,"start_character":0,"end_line":5,"end_character":13},"in_reply_to":"9fb8cfa7_e8b29d49","updated":"2019-07-03 13:55:55.000000000","message":"Done","commit_id":"116e6f2cb22bc5d606563b9c7bf4f66edfc37647"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"204c3543315b4d1dcdef67822b478692ee1dc418","unresolved":false,"context_lines":[{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    Add power state change callbacks of an instance to nova by performing API"},{"line_number":5,"context_line":"    requests. Whenever there is a change in the power state of a physical"},{"line_number":6,"context_line":"    instance (example a \"power on\" or \"power off\" IPMI command is issued or the"},{"line_number":7,"context_line":"    periodic ``_sync_power_states`` task detects a change in power state)"},{"line_number":8,"context_line":"    ironic will create and send a ``power-update`` external event to nova using"},{"line_number":9,"context_line":"    which nova will update the power state of the instance in its database. By"}],"source_content_type":"text/x-yaml","patch_set":4,"id":"9fb8cfa7_e82ffd85","line":6,"range":{"start_line":6,"start_character":50,"end_line":6,"end_character":54},"updated":"2019-07-03 13:46:04.000000000","message":"I would drop the reference to \"IPMI\". It doesn\u0027t really make sense to mention since it is all abstracted for our users through our API and it looks like this will work without IPMI as well.","commit_id":"116e6f2cb22bc5d606563b9c7bf4f66edfc37647"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"bab59c9a010374e03d37abf3878824a23df27ccc","unresolved":false,"context_lines":[{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    Add power state change callbacks of an instance to nova by performing API"},{"line_number":5,"context_line":"    requests. Whenever there is a change in the power state of a physical"},{"line_number":6,"context_line":"    instance (example a \"power on\" or \"power off\" IPMI command is issued or the"},{"line_number":7,"context_line":"    periodic ``_sync_power_states`` task detects a change in power state)"},{"line_number":8,"context_line":"    ironic will create and send a ``power-update`` external event to nova using"},{"line_number":9,"context_line":"    which nova will update the power state of the instance in its database. By"}],"source_content_type":"text/x-yaml","patch_set":4,"id":"9fb8cfa7_c86a3980","line":6,"range":{"start_line":6,"start_character":50,"end_line":6,"end_character":54},"in_reply_to":"9fb8cfa7_e82ffd85","updated":"2019-07-03 13:55:55.000000000","message":"Done","commit_id":"116e6f2cb22bc5d606563b9c7bf4f66edfc37647"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"204c3543315b4d1dcdef67822b478692ee1dc418","unresolved":false,"context_lines":[{"line_number":5,"context_line":"    requests. Whenever there is a change in the power state of a physical"},{"line_number":6,"context_line":"    instance (example a \"power on\" or \"power off\" IPMI command is issued or the"},{"line_number":7,"context_line":"    periodic ``_sync_power_states`` task detects a change in power state)"},{"line_number":8,"context_line":"    ironic will create and send a ``power-update`` external event to nova using"},{"line_number":9,"context_line":"    which nova will update the power state of the instance in its database. By"},{"line_number":10,"context_line":"    conveying the power state changes to nova, ironic becomes the source of"},{"line_number":11,"context_line":"    truth thus preventing nova from forcing wrong power states on the instance"},{"line_number":12,"context_line":"    during the nova-ironic periodic sync. It also adds the possibility of"}],"source_content_type":"text/x-yaml","patch_set":4,"id":"9fb8cfa7_c860f9d2","line":9,"range":{"start_line":8,"start_character":66,"end_line":9,"end_character":19},"updated":"2019-07-03 13:46:04.000000000","message":"This seems a little weird to read. Perhaps \"external event to the compute service, which will cause the power state of the instance to be updated in its database.\"?","commit_id":"116e6f2cb22bc5d606563b9c7bf4f66edfc37647"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"bab59c9a010374e03d37abf3878824a23df27ccc","unresolved":false,"context_lines":[{"line_number":5,"context_line":"    requests. Whenever there is a change in the power state of a physical"},{"line_number":6,"context_line":"    instance (example a \"power on\" or \"power off\" IPMI command is issued or the"},{"line_number":7,"context_line":"    periodic ``_sync_power_states`` task detects a change in power state)"},{"line_number":8,"context_line":"    ironic will create and send a ``power-update`` external event to nova using"},{"line_number":9,"context_line":"    which nova will update the power state of the instance in its database. By"},{"line_number":10,"context_line":"    conveying the power state changes to nova, ironic becomes the source of"},{"line_number":11,"context_line":"    truth thus preventing nova from forcing wrong power states on the instance"},{"line_number":12,"context_line":"    during the nova-ironic periodic sync. It also adds the possibility of"}],"source_content_type":"text/x-yaml","patch_set":4,"id":"9fb8cfa7_880201ba","line":9,"range":{"start_line":8,"start_character":66,"end_line":9,"end_character":19},"in_reply_to":"9fb8cfa7_c860f9d2","updated":"2019-07-03 13:55:55.000000000","message":"Done","commit_id":"116e6f2cb22bc5d606563b9c7bf4f66edfc37647"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"204c3543315b4d1dcdef67822b478692ee1dc418","unresolved":false,"context_lines":[{"line_number":7,"context_line":"    periodic ``_sync_power_states`` task detects a change in power state)"},{"line_number":8,"context_line":"    ironic will create and send a ``power-update`` external event to nova using"},{"line_number":9,"context_line":"    which nova will update the power state of the instance in its database. By"},{"line_number":10,"context_line":"    conveying the power state changes to nova, ironic becomes the source of"},{"line_number":11,"context_line":"    truth thus preventing nova from forcing wrong power states on the instance"},{"line_number":12,"context_line":"    during the nova-ironic periodic sync. It also adds the possibility of"},{"line_number":13,"context_line":"    bringing up/down a physical instance through the ironic API even if it was"}],"source_content_type":"text/x-yaml","patch_set":4,"id":"9fb8cfa7_486de9ca","line":10,"range":{"start_line":10,"start_character":40,"end_line":10,"end_character":53},"updated":"2019-07-03 13:46:04.000000000","message":"Proper service type names, Compute Service, Bare Metal Service. etc.","commit_id":"116e6f2cb22bc5d606563b9c7bf4f66edfc37647"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"bab59c9a010374e03d37abf3878824a23df27ccc","unresolved":false,"context_lines":[{"line_number":7,"context_line":"    periodic ``_sync_power_states`` task detects a change in power state)"},{"line_number":8,"context_line":"    ironic will create and send a ``power-update`` external event to nova using"},{"line_number":9,"context_line":"    which nova will update the power state of the instance in its database. By"},{"line_number":10,"context_line":"    conveying the power state changes to nova, ironic becomes the source of"},{"line_number":11,"context_line":"    truth thus preventing nova from forcing wrong power states on the instance"},{"line_number":12,"context_line":"    during the nova-ironic periodic sync. It also adds the possibility of"},{"line_number":13,"context_line":"    bringing up/down a physical instance through the ironic API even if it was"}],"source_content_type":"text/x-yaml","patch_set":4,"id":"9fb8cfa7_a807c5c9","line":10,"range":{"start_line":10,"start_character":40,"end_line":10,"end_character":53},"in_reply_to":"9fb8cfa7_486de9ca","updated":"2019-07-03 13:55:55.000000000","message":"Done","commit_id":"116e6f2cb22bc5d606563b9c7bf4f66edfc37647"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"204c3543315b4d1dcdef67822b478692ee1dc418","unresolved":false,"context_lines":[{"line_number":9,"context_line":"    which nova will update the power state of the instance in its database. By"},{"line_number":10,"context_line":"    conveying the power state changes to nova, ironic becomes the source of"},{"line_number":11,"context_line":"    truth thus preventing nova from forcing wrong power states on the instance"},{"line_number":12,"context_line":"    during the nova-ironic periodic sync. It also adds the possibility of"},{"line_number":13,"context_line":"    bringing up/down a physical instance through the ironic API even if it was"},{"line_number":14,"context_line":"    put down/up through the nova API."},{"line_number":15,"context_line":"upgrade:"}],"source_content_type":"text/x-yaml","patch_set":4,"id":"9fb8cfa7_28a995dc","line":12,"range":{"start_line":12,"start_character":15,"end_line":12,"end_character":40},"updated":"2019-07-03 13:46:04.000000000","message":"I suspect this should be re-written, or maybe we split this feature block to \"Features\" and \"Fixes\" The feature being the high level what was done to fix the issue with new behavior, the fixes could describe the entire mechanism and why it is a positive move forward.","commit_id":"116e6f2cb22bc5d606563b9c7bf4f66edfc37647"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"70cac459e94975ef53960cfecad0fb7ed9080977","unresolved":false,"context_lines":[{"line_number":9,"context_line":"    which nova will update the power state of the instance in its database. By"},{"line_number":10,"context_line":"    conveying the power state changes to nova, ironic becomes the source of"},{"line_number":11,"context_line":"    truth thus preventing nova from forcing wrong power states on the instance"},{"line_number":12,"context_line":"    during the nova-ironic periodic sync. It also adds the possibility of"},{"line_number":13,"context_line":"    bringing up/down a physical instance through the ironic API even if it was"},{"line_number":14,"context_line":"    put down/up through the nova API."},{"line_number":15,"context_line":"upgrade:"}],"source_content_type":"text/x-yaml","patch_set":4,"id":"7faddb67_ccc23186","line":12,"range":{"start_line":12,"start_character":15,"end_line":12,"end_character":40},"in_reply_to":"9fb8cfa7_081ff109","updated":"2019-07-09 08:38:16.000000000","message":"Done","commit_id":"116e6f2cb22bc5d606563b9c7bf4f66edfc37647"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"bab59c9a010374e03d37abf3878824a23df27ccc","unresolved":false,"context_lines":[{"line_number":9,"context_line":"    which nova will update the power state of the instance in its database. By"},{"line_number":10,"context_line":"    conveying the power state changes to nova, ironic becomes the source of"},{"line_number":11,"context_line":"    truth thus preventing nova from forcing wrong power states on the instance"},{"line_number":12,"context_line":"    during the nova-ironic periodic sync. It also adds the possibility of"},{"line_number":13,"context_line":"    bringing up/down a physical instance through the ironic API even if it was"},{"line_number":14,"context_line":"    put down/up through the nova API."},{"line_number":15,"context_line":"upgrade:"}],"source_content_type":"text/x-yaml","patch_set":4,"id":"9fb8cfa7_081ff109","line":12,"range":{"start_line":12,"start_character":15,"end_line":12,"end_character":40},"in_reply_to":"9fb8cfa7_28a995dc","updated":"2019-07-03 13:55:55.000000000","message":"\u003e I suspect this should be re-written, or maybe we split this feature\n \u003e block to \"Features\" and \"Fixes\" The feature being the high level\n \u003e what was done to fix the issue with new behavior, the fixes could\n \u003e describe the entire mechanism and why it is a positive move\n \u003e forward.\n\nhmm yea I\u0027ll add half of this to the fixes section.","commit_id":"116e6f2cb22bc5d606563b9c7bf4f66edfc37647"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"11ef0f3d4b159e4a73e4b83cfa2423e4840fa118","unresolved":false,"context_lines":[{"line_number":4,"context_line":"    Adds power state change callbacks of an instance to the Compute service by"},{"line_number":5,"context_line":"    performing API notifications. This is configurable through the"},{"line_number":6,"context_line":"    ``nova.send_power_notifications`` config option. Whenever there is a change"},{"line_number":7,"context_line":"    in the power state of a physical instance (example a \"power on\" or"},{"line_number":8,"context_line":"    \"power off\" API command is issued or the periodic ``_sync_power_states``"},{"line_number":9,"context_line":"    task detects a change in power state) the Baremetal service will create and"},{"line_number":10,"context_line":"    send a ``power-update`` external event to the Compute service which will"}],"source_content_type":"text/x-yaml","patch_set":10,"id":"7faddb67_d2f55ccc","line":7,"range":{"start_line":7,"start_character":47,"end_line":7,"end_character":54},"updated":"2019-08-02 15:14:43.000000000","message":"for example,","commit_id":"c7439afb82445bd31ae2555f8f1cf97f8d13f278"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"21cb3af296912eed454250ab5098dbb9abaddebf","unresolved":false,"context_lines":[{"line_number":4,"context_line":"    Adds power state change callbacks of an instance to the Compute service by"},{"line_number":5,"context_line":"    performing API notifications. This is configurable through the"},{"line_number":6,"context_line":"    ``nova.send_power_notifications`` config option. Whenever there is a change"},{"line_number":7,"context_line":"    in the power state of a physical instance (example a \"power on\" or"},{"line_number":8,"context_line":"    \"power off\" API command is issued or the periodic ``_sync_power_states``"},{"line_number":9,"context_line":"    task detects a change in power state) the Baremetal service will create and"},{"line_number":10,"context_line":"    send a ``power-update`` external event to the Compute service which will"}],"source_content_type":"text/x-yaml","patch_set":10,"id":"7faddb67_1d520e14","line":7,"range":{"start_line":7,"start_character":47,"end_line":7,"end_character":54},"in_reply_to":"7faddb67_d2f55ccc","updated":"2019-08-05 16:04:44.000000000","message":"Done","commit_id":"c7439afb82445bd31ae2555f8f1cf97f8d13f278"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"6fea953f7efde182da414b9bf21367dd013afb62","unresolved":false,"context_lines":[{"line_number":19,"context_line":"    power state is either \"power on\" or \"power off\") of an instance through"},{"line_number":20,"context_line":"    external events to the Compute service, the Baremetal service becomes the"},{"line_number":21,"context_line":"    source of truth thus preventing the Compute service from forcing wrong"},{"line_number":22,"context_line":"    power states on the instance during the nova-ironic ``_sync_power_states``"},{"line_number":23,"context_line":"    periodic task. An exception would be if a race condition were to occur due"},{"line_number":24,"context_line":"    to the nova-ironic power sync task happening a nano-second before the power"},{"line_number":25,"context_line":"    state change event is received from the Baremetal service in which case the"},{"line_number":26,"context_line":"    nova instance state will be forced on the baremetal node."}],"source_content_type":"text/x-yaml","patch_set":10,"id":"7faddb67_72e268a2","line":23,"range":{"start_line":22,"start_character":44,"end_line":23,"end_character":17},"updated":"2019-08-02 15:19:18.000000000","message":"Let\u0027s not mention function names in the operator facing docs. Just \"during power state synchronization between nova and ironic.\" (same above)","commit_id":"c7439afb82445bd31ae2555f8f1cf97f8d13f278"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"21cb3af296912eed454250ab5098dbb9abaddebf","unresolved":false,"context_lines":[{"line_number":19,"context_line":"    power state is either \"power on\" or \"power off\") of an instance through"},{"line_number":20,"context_line":"    external events to the Compute service, the Baremetal service becomes the"},{"line_number":21,"context_line":"    source of truth thus preventing the Compute service from forcing wrong"},{"line_number":22,"context_line":"    power states on the instance during the nova-ironic ``_sync_power_states``"},{"line_number":23,"context_line":"    periodic task. An exception would be if a race condition were to occur due"},{"line_number":24,"context_line":"    to the nova-ironic power sync task happening a nano-second before the power"},{"line_number":25,"context_line":"    state change event is received from the Baremetal service in which case the"},{"line_number":26,"context_line":"    nova instance state will be forced on the baremetal node."}],"source_content_type":"text/x-yaml","patch_set":10,"id":"7faddb67_7dc78297","line":23,"range":{"start_line":22,"start_character":44,"end_line":23,"end_character":17},"in_reply_to":"7faddb67_72e268a2","updated":"2019-08-05 16:04:44.000000000","message":"Done","commit_id":"c7439afb82445bd31ae2555f8f1cf97f8d13f278"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"11ef0f3d4b159e4a73e4b83cfa2423e4840fa118","unresolved":false,"context_lines":[{"line_number":26,"context_line":"    nova instance state will be forced on the baremetal node."},{"line_number":27,"context_line":"upgrade:"},{"line_number":28,"context_line":"  - |"},{"line_number":29,"context_line":"    Introduces dependency on ``keystoneauth1`` version 3.15.0 or greater to"},{"line_number":30,"context_line":"    send the power state change callbacks to nova and perform the required"},{"line_number":31,"context_line":"    power updates. This also requires the ``[nova]`` section to be defined in"},{"line_number":32,"context_line":"    the ironic configuration."}],"source_content_type":"text/x-yaml","patch_set":10,"id":"7faddb67_72190820","line":31,"range":{"start_line":29,"start_character":4,"end_line":31,"end_character":18},"updated":"2019-08-02 15:14:43.000000000","message":"Yeah, here it might be more appropriate. Though there was already a dependency on ksa (at an earlier version). Do we really add an upgrade reno every time we bump a minimum for an already-required dep?","commit_id":"c7439afb82445bd31ae2555f8f1cf97f8d13f278"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"21cb3af296912eed454250ab5098dbb9abaddebf","unresolved":false,"context_lines":[{"line_number":26,"context_line":"    nova instance state will be forced on the baremetal node."},{"line_number":27,"context_line":"upgrade:"},{"line_number":28,"context_line":"  - |"},{"line_number":29,"context_line":"    Introduces dependency on ``keystoneauth1`` version 3.15.0 or greater to"},{"line_number":30,"context_line":"    send the power state change callbacks to nova and perform the required"},{"line_number":31,"context_line":"    power updates. This also requires the ``[nova]`` section to be defined in"},{"line_number":32,"context_line":"    the ironic configuration."}],"source_content_type":"text/x-yaml","patch_set":10,"id":"7faddb67_7ddea26d","line":31,"range":{"start_line":29,"start_character":4,"end_line":31,"end_character":18},"in_reply_to":"7faddb67_72190820","updated":"2019-08-05 16:04:44.000000000","message":"Done","commit_id":"c7439afb82445bd31ae2555f8f1cf97f8d13f278"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"6fea953f7efde182da414b9bf21367dd013afb62","unresolved":false,"context_lines":[{"line_number":26,"context_line":"    nova instance state will be forced on the baremetal node."},{"line_number":27,"context_line":"upgrade:"},{"line_number":28,"context_line":"  - |"},{"line_number":29,"context_line":"    Introduces dependency on ``keystoneauth1`` version 3.15.0 or greater to"},{"line_number":30,"context_line":"    send the power state change callbacks to nova and perform the required"},{"line_number":31,"context_line":"    power updates. This also requires the ``[nova]`` section to be defined in"},{"line_number":32,"context_line":"    the ironic configuration."}],"source_content_type":"text/x-yaml","patch_set":10,"id":"7faddb67_f2ce582b","line":31,"range":{"start_line":29,"start_character":4,"end_line":31,"end_character":18},"in_reply_to":"7faddb67_72190820","updated":"2019-08-02 15:19:18.000000000","message":"We usually don\u0027t, operators and distributions are supposed to check requirements every release anyway.","commit_id":"c7439afb82445bd31ae2555f8f1cf97f8d13f278"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"21cb3af296912eed454250ab5098dbb9abaddebf","unresolved":false,"context_lines":[{"line_number":26,"context_line":"    nova instance state will be forced on the baremetal node."},{"line_number":27,"context_line":"upgrade:"},{"line_number":28,"context_line":"  - |"},{"line_number":29,"context_line":"    Introduces dependency on ``keystoneauth1`` version 3.15.0 or greater to"},{"line_number":30,"context_line":"    send the power state change callbacks to nova and perform the required"},{"line_number":31,"context_line":"    power updates. This also requires the ``[nova]`` section to be defined in"},{"line_number":32,"context_line":"    the ironic configuration."}],"source_content_type":"text/x-yaml","patch_set":10,"id":"7faddb67_ddf31608","line":31,"range":{"start_line":29,"start_character":4,"end_line":31,"end_character":18},"in_reply_to":"7faddb67_f2ce582b","updated":"2019-08-05 16:04:44.000000000","message":"Done","commit_id":"c7439afb82445bd31ae2555f8f1cf97f8d13f278"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"7ca20f171b23acf930030d0c5baec37ec000e53d","unresolved":false,"context_lines":[{"line_number":27,"context_line":"    on the baremetal node."},{"line_number":28,"context_line":"upgrade:"},{"line_number":29,"context_line":"  - |"},{"line_number":30,"context_line":"    In order to support power state change call backs to nova requires the"},{"line_number":31,"context_line":"    ``[nova]`` section to be configured in the ironic configuration."}],"source_content_type":"text/x-yaml","patch_set":13,"id":"7faddb67_d0489888","line":31,"range":{"start_line":30,"start_character":57,"end_line":31,"end_character":28},"updated":"2019-08-08 16:23:20.000000000","message":"\"...nova, ironic requires the ``[nova]`` section to be...\"\n\nor\n\n\"...nova, the ``[nova]`` section must be...\"","commit_id":"f146426aed41b4fbcfe273d364b62087616f1fbb"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"6311db6214b03aa6ddd6e471d0861d1f2d7d3901","unresolved":false,"context_lines":[{"line_number":27,"context_line":"    on the baremetal node."},{"line_number":28,"context_line":"upgrade:"},{"line_number":29,"context_line":"  - |"},{"line_number":30,"context_line":"    In order to support power state change call backs to nova requires the"},{"line_number":31,"context_line":"    ``[nova]`` section to be configured in the ironic configuration."}],"source_content_type":"text/x-yaml","patch_set":13,"id":"7faddb67_9611ad60","line":31,"range":{"start_line":30,"start_character":57,"end_line":31,"end_character":28},"in_reply_to":"7faddb67_d0489888","updated":"2019-08-09 14:04:55.000000000","message":"oh yea! oops that sentence I wrote clearly shows my love for nova.","commit_id":"f146426aed41b4fbcfe273d364b62087616f1fbb"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6f94ed070a7cba237eaca27df6fca0c6651e453c","unresolved":false,"context_lines":[{"line_number":28,"context_line":"upgrade:"},{"line_number":29,"context_line":"  - |"},{"line_number":30,"context_line":"    In order to support power state change call backs to nova, the ``[nova]``"},{"line_number":31,"context_line":"    section must be configured in the baremetal service configuration."}],"source_content_type":"text/x-yaml","patch_set":19,"id":"7faddb67_7c537a3a","line":31,"updated":"2019-08-13 15:24:07.000000000","message":"Since the compute API is not doing service version checks of the computes, if you\u0027re doing a rolling upgrade of the nova-compute services, sending this event to nova will change the task_state on the instance (as the code is currently written) and the (older) compute service wouldn\u0027t have the code to process the event and then the instance.task_state will be stuck until the admin manually resets it. Due to this, I\u0027d probably mention that ``[nova]/send_power_notifications`` should not be set to True until all nova-compute services managing ironic nodes are upgraded to Train.","commit_id":"d693d4c06c1ba89332ef8f3f672809b3cc81f8c9"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"9e9e7df3150207576ebdc91a828377cc3ad128f9","unresolved":false,"context_lines":[{"line_number":28,"context_line":"upgrade:"},{"line_number":29,"context_line":"  - |"},{"line_number":30,"context_line":"    In order to support power state change call backs to nova, the ``[nova]``"},{"line_number":31,"context_line":"    section must be configured in the baremetal service configuration."}],"source_content_type":"text/x-yaml","patch_set":19,"id":"7faddb67_e0581432","line":31,"in_reply_to":"7faddb67_7c537a3a","updated":"2019-08-13 19:54:02.000000000","message":"Seems like a reasonable follow-up.","commit_id":"d693d4c06c1ba89332ef8f3f672809b3cc81f8c9"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"c958e0f60c9bc2c6e03e43f8f30d14bfd2ab8606","unresolved":false,"context_lines":[{"line_number":28,"context_line":"upgrade:"},{"line_number":29,"context_line":"  - |"},{"line_number":30,"context_line":"    In order to support power state change call backs to nova, the ``[nova]``"},{"line_number":31,"context_line":"    section must be configured in the baremetal service configuration."}],"source_content_type":"text/x-yaml","patch_set":19,"id":"7faddb67_557a04ba","line":31,"in_reply_to":"7faddb67_e0581432","updated":"2019-08-14 14:35:57.000000000","message":"fair point.","commit_id":"d693d4c06c1ba89332ef8f3f672809b3cc81f8c9"}],"requirements.txt":[{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"acad658d33354b2e5b12715f52667acbd760cbfa","unresolved":false,"context_lines":[{"line_number":9,"context_line":"WebOb\u003e\u003d1.7.1 # MIT"},{"line_number":10,"context_line":"python-cinderclient!\u003d4.0.0,\u003e\u003d3.3.0 # Apache-2.0"},{"line_number":11,"context_line":"python-neutronclient\u003e\u003d6.7.0 # Apache-2.0"},{"line_number":12,"context_line":"python-novaclient\u003e\u003d14.1.0 # Apache-2.0"},{"line_number":13,"context_line":"python-glanceclient\u003e\u003d2.8.0 # Apache-2.0"},{"line_number":14,"context_line":"keystoneauth1\u003e\u003d3.4.0 # Apache-2.0"},{"line_number":15,"context_line":"ironic-lib\u003e\u003d2.17.1 # Apache-2.0"}],"source_content_type":"text/plain","patch_set":1,"id":"9fb8cfa7_223d8dc3","line":12,"range":{"start_line":12,"start_character":19,"end_line":12,"end_character":25},"updated":"2019-06-12 09:58:24.000000000","message":"from the past behaviours of interactions with cinder/neutron clients etc, the dependency seems to be on the latest version of the client that is supporting the code, but since we do support microversions, to avoid blocking upgrade impact we could fix this to the lowest version of the client and then if it doesn\u0027t support the needed level of microversion we just log warnings and novaclient will say \"its not supported\". Not sure which is the better way out.","commit_id":"dd5fb9eec1a855be43bc68749ae6b9316c6966e8"}],"zuul.d/ironic-jobs.yaml":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"6fea953f7efde182da414b9bf21367dd013afb62","unresolved":false,"context_lines":[{"line_number":111,"context_line":"        s-container: True"},{"line_number":112,"context_line":"        s-object: True"},{"line_number":113,"context_line":"        s-proxy: True"},{"line_number":114,"context_line":"      devstack_local_conf:"},{"line_number":115,"context_line":"        post-config:"},{"line_number":116,"context_line":"          $IRONIC_CONF:"},{"line_number":117,"context_line":"            nova:"},{"line_number":118,"context_line":"              # Disable power state change callbacks to nova."},{"line_number":119,"context_line":"              send_power_notifications: False"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"- job:"},{"line_number":122,"context_line":"    name: ironic-tempest-ipa-partition-redfish-tinyipa"}],"source_content_type":"text/x-yaml","patch_set":10,"id":"7faddb67_f2af387a","line":119,"range":{"start_line":114,"start_character":0,"end_line":119,"end_character":45},"updated":"2019-08-02 15:19:18.000000000","message":"This should go to the devstack plugin, not to the job.","commit_id":"c7439afb82445bd31ae2555f8f1cf97f8d13f278"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"fd11e73746cebf7600b2a52dae967168d88d7224","unresolved":false,"context_lines":[{"line_number":111,"context_line":"        s-container: True"},{"line_number":112,"context_line":"        s-object: True"},{"line_number":113,"context_line":"        s-proxy: True"},{"line_number":114,"context_line":"      devstack_local_conf:"},{"line_number":115,"context_line":"        post-config:"},{"line_number":116,"context_line":"          $IRONIC_CONF:"},{"line_number":117,"context_line":"            nova:"},{"line_number":118,"context_line":"              # Disable power state change callbacks to nova."},{"line_number":119,"context_line":"              send_power_notifications: False"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"- job:"},{"line_number":122,"context_line":"    name: ironic-tempest-ipa-partition-redfish-tinyipa"}],"source_content_type":"text/x-yaml","patch_set":10,"id":"7faddb67_3d1fcab7","line":119,"range":{"start_line":114,"start_character":0,"end_line":119,"end_character":45},"in_reply_to":"7faddb67_9df59ecd","updated":"2019-08-05 16:20:54.000000000","message":"ok got it (I hope) thanks dmitry, sorry for the confusion.","commit_id":"c7439afb82445bd31ae2555f8f1cf97f8d13f278"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"21cb3af296912eed454250ab5098dbb9abaddebf","unresolved":false,"context_lines":[{"line_number":111,"context_line":"        s-container: True"},{"line_number":112,"context_line":"        s-object: True"},{"line_number":113,"context_line":"        s-proxy: True"},{"line_number":114,"context_line":"      devstack_local_conf:"},{"line_number":115,"context_line":"        post-config:"},{"line_number":116,"context_line":"          $IRONIC_CONF:"},{"line_number":117,"context_line":"            nova:"},{"line_number":118,"context_line":"              # Disable power state change callbacks to nova."},{"line_number":119,"context_line":"              send_power_notifications: False"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"- job:"},{"line_number":122,"context_line":"    name: ironic-tempest-ipa-partition-redfish-tinyipa"}],"source_content_type":"text/x-yaml","patch_set":10,"id":"7faddb67_9df59ecd","line":119,"range":{"start_line":114,"start_character":0,"end_line":119,"end_character":45},"in_reply_to":"7faddb67_f2af387a","updated":"2019-08-05 16:04:44.000000000","message":"Apologies as discussed on IRC, I am not very familiar with how this is done. In nova we have done it this way in some places so I tried it out. I will see if this can be added to the devstack plugin like you suggest.","commit_id":"c7439afb82445bd31ae2555f8f1cf97f8d13f278"}]}
