This is working as designed. The reason the change from the ironic side to the nova side isn't immediate is because (1) the ironic driver in nova doesn't implement the lifecycle event handling part of the virt driver API (libvirt and hyper-v implement instance lifecycle event handling) and (2) the _sync_power_states periodic task runs on a cron which is by default 10 minutes:
https://github.com/openstack/nova/blob/master/nova/compute/manager.py#L152 The config option is "sync_power_state_interval". So you have to wait by default at most 10 minutes before the power state change on the ironic side is processed on the nova side via that task. This could be made more automatic if the ironic driver in nova implemented the lifecycle event handling code in the virt driver, but that would require a blueprint and spec, so it's not a bug. ** Changed in: nova Status: New => Invalid -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to OpenStack Compute (nova). https://bugs.launchpad.net/bugs/1498756 Title: Power state inconsistence after using Ironic node-set-power-state Status in Ironic: Invalid Status in OpenStack Compute (nova): Invalid Bug description: Here is the steps to reproduce. I use the devstack to setup ironic with pxe deployment. ubuntu@devstack:~/devstack$ ironic node-list +--------------------------------------+--------+--------------------------------------+-------------+--------------------+-------------+ | UUID | Name | Instance UUID | Power State | Provisioning State | Maintenance | +--------------------------------------+--------+--------------------------------------+-------------+--------------------+-------------+ | e5f9a29e-c50c-4c13-9b8c-c6b8a0767b0a | node-0 | e8e2b89c-530f-43d6-b4e7-965a7864417e | power on | active | False | | e4aab274-077c-4238-a509-d17f6c5b767a | node-1 | None | power on | available | False | | 5d0db590-e9c3-46af-8b5b-7540d0a3faa7 | node-2 | 8da05834-2c43-430c-bba5-f136b6db872b | power on | active | False | +--------------------------------------+--------+--------------------------------------+-------------+--------------------+-------------+ ubuntu@devstack:~/devstack$ ironic node-set-power-state node-0 off ubuntu@devstack:~/devstack$ ironic node-list +--------------------------------------+--------+--------------------------------------+-------------+--------------------+-------------+ | UUID | Name | Instance UUID | Power State | Provisioning State | Maintenance | +--------------------------------------+--------+--------------------------------------+-------------+--------------------+-------------+ | e5f9a29e-c50c-4c13-9b8c-c6b8a0767b0a | node-0 | e8e2b89c-530f-43d6-b4e7-965a7864417e | power off | active | False | | e4aab274-077c-4238-a509-d17f6c5b767a | node-1 | None | power on | available | False | | 5d0db590-e9c3-46af-8b5b-7540d0a3faa7 | node-2 | 8da05834-2c43-430c-bba5-f136b6db872b | power on | active | False | +--------------------------------------+--------+--------------------------------------+-------------+--------------------+-------------+ The expected result is that I can see shutdown from 'nova list'. However, the result is as following. ubuntu@devstack:~/devstack$ nova list +--------------------------------------+------------+--------+------------+-------------+------------------------------------------------------+ | ID | Name | Status | Task State | Power State | Networks | +--------------------------------------+------------+--------+------------+-------------+------------------------------------------------------+ | 8da05834-2c43-430c-bba5-f136b6db872b | testing-01 | ACTIVE | - | Running | private=10.1.0.5, fdc6:d93f:45dd:0:5054:ff:fe70:ffe4 | | e8e2b89c-530f-43d6-b4e7-965a7864417e | testing-02 | ACTIVE | - | Running | private=10.1.0.6, fdc6:d93f:45dd:0:5054:ff:fec5:254c | +--------------------------------------+------------+--------+------------+-------------+------------------------------------------------------+ It doesn't not change the state immediately. After a while, it changes to shutdown in nova list. What confuse me is that when I change the power state from nova, it does change the state from ironic side. To manage notifications about this bug go to: https://bugs.launchpad.net/ironic/+bug/1498756/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : [email protected] Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp

