Support soft reboot and poweroff in nova ironic driver.

Registered by Tang Chen on 2015-09-30

This BP proposes to enhance 2 power interfaces in nova ironic driver.
1. Support server soft reboot
2. Support server soft poweroff

In nova/virt/ironic/driver.py:
1. reboot() ignores reboot_type because ironic does not support soft reboot.

    def reboot(self, context, instance, network_info, reboot_type,
               block_device_info=None, bad_volumes_callback=None):
        """Reboot the specified instance.
        ......
        :param reboot_type: Either a HARD or SOFT reboot. Ignored by
            this driver.

2. power_off() does not support soft power off.

    def power_off(self, instance, timeout=0, retry_interval=0):
        """Power off the specified instance.

        NOTE: Ironic does not support soft-off, so this method ignores
              timeout and retry_interval parameters.

According to blueprint enhance-power-interface-for-soft-reboot-and-nmi,
(https://blueprints.launchpad.net/ironic/+spec/enhance-power-interface-for-soft-reboot-and-nmi)
ironic will soon support reboot/poweroff a server softly. So we need to
improve nova ironic driver to be able to use these functionalities.

Blueprint information

Status:
Complete
Approver:
Matt Riedemann
Priority:
Low
Drafter:
Tang Chen
Direction:
Approved
Assignee:
Tang Chen
Definition:
Approved
Series goal:
Accepted for ocata
Implementation:
Implemented
Milestone target:
milestone icon ocata-3
Started by
Matt Riedemann on 2016-06-02
Completed by
Matt Riedemann on 2017-01-26

Related branches

Sprints

Whiteboard

Gerrit topic: https://review.openstack.org/#q,topic:bp/soft-reboot-poweroff,n,z

Addressed by: https://review.openstack.org/229282
    Support soft reboot and poweroff in nova ironic driver.

Addressed by: https://review.openstack.org/248584
    Translate power state strings with dict for nodes.set_power_state().

Addressed by: https://review.openstack.org/248585
    Add soft power off support to ironic driver.

Addressed by: https://review.openstack.org/248586
    Add soft reboot support to ironic driver.

Waiting for the Ironic blueprint to be approved before approving this. --johnthetubaguy 20151202

This BP depends on Ironic. -- hshiina 20160602
  RFE: https://bugs.launchpad.net/ironic/+bug/1526226
            [RFE] Enhance Power Interface for Soft Power Off and Inject NMI
  SPEC: https://review.openstack.org/#/c/186700/
                Enhance Power Interface for Soft Power Off and Inject NMI

Waiting for the Ironic blueprint to be approved before approving this. Also, I'd expect to see testing enabled in the Ironic CI job to show this working before we merge the changes in Nova. -- mriedem 20160602

Ironic spec was approved in Newton. - hshiina 20161109
  https://review.openstack.org/#/c/186700/
    Enhance Power Interface for Soft Power Off and Inject NMI

This is approved for Ocata as a specless feature parity blueprint but is blocked on the changes getting implemented on the Ironic side. -- mriedem 20161110

Addressed by: https://review.openstack.org/403745
    Add soft reboot support to ironic driver

Addressed by: https://review.openstack.org/407977
    ironic: Add soft power off support to ironic driver.

Just a status update but I've marked this as blocked as the Nova change is dependent on the python-ironicclient change which is (or should be) dependent on the Ironic REST API change. And the Nova change is going to require a release of the python-ironicclient change and a bump to global-requirements for the minimum required version of python-ironicclient that Nova can use. -- mriedem 20161227

(?)

Work Items

Dependency tree

* Blueprints in grey have been implemented.

This blueprint contains Public information 
Everyone can see this information.