python-ironic: openstack baremetal node inject nmi fails: Resource could not be found. (HTTP 404) Environment: openstack-ironic-conductor-6.3.0-0.20170202224548.ac2b1a4.el7.centos.noarch python-ironic-lib-2.5.2-0.20170123115307.ace87b6.el7.centos.noarc python2-ironicclient-1.11.0-0.20170127212643.f1f10cb.el7.centos.noarch openstack-ironic-common-6.3.0-0.20170202224548.ac2b1a4.el7.centos.noarch openstack-ironic-api-6.3.0-0.20170202224548.ac2b1a4.el7.centos.noarch python-ironic-inspector-client-1.11.0-0.20170131151259.481a92e.el7.centos.noarch puppet-ironic-10.2.0-0.20170206140831.2597485.el7.centos.noarch python-ironic-tests-6.3.0-0.20170202224548.ac2b1a4.el7.centos.noarch openstack-ironic-inspector-4.2.1-0.20170202180332.516ddc4.el7.centos.noarch instack-undercloud-6.0.0-0.20170206015830.5972cca.el7.centos.noarch Steps to reproduce: 1. deploy overcloud 2. Try to run "openstack baremetal node inject nmi <uuid>, where [stack@undercloud ~]$ ironic node-list +--------------------------------------+-----------+--------------------------------------+-------------+--------------------+-------------+ | UUID | Name | Instance UUID | Power State | Provisioning State | Maintenance | +--------------------------------------+-----------+--------------------------------------+-------------+--------------------+-------------+ | acad4b56-df32-4cf4-91be-d63c1dad6d27 | control-0 | ccae038d-9207-44c3-9957-c309237f23c9 | power on | active | False | | 37e50de5-338e-42d4-ba4b-97b02f7b8523 | control-1 | None | power off | available | False | | 1b06d5bc-2cba-478e-a172-1a2cd6bc26fc | control-2 | None | power off | available | False | | dec1daa7-48fe-4fb9-b43d-cf9300791022 | compute-0 | None | power off | available | False | | 9cb1ae62-fa95-400b-b995-048e95987613 | compute-1 | None | power off | available | False | | 1f281e0b-b62b-43ba-b5a8-531c1a7df8c9 | compute-2 | 8915b865-2866-4ee0-826f-0c17343b8980 | power off | active | False | | e68d9349-86c4-4861-abdf-dee2b38295f0 | ceph-0 | None | power off | available | False | +--------------------------------------+-----------+--------------------------------------+-------------+--------------------+-------------+ [stack@undercloud ~]$ openstack help baremetal node inject nmi usage: openstack baremetal node inject nmi [-h] <node> Inject NMI to baremetal node positional arguments: <node> Name or UUID of the node. optional arguments: -h, --help show this help message and exit [stack@undercloud ~]$ openstack --os-baremetal-api-version 1.28 baremetal node inject nmi 1f281e0b-b62b-43ba-b5a8-531c1a7df8c9 Resource could not be found. (HTTP 404) [stack@undercloud ~]$ openstack --os-baremetal-api-version 1.28 baremetal node inject nmi compute-2 Resource could not be found. (HTTP 404) Expected result: The nmi injection should fine the node.
Hi Sasha, I think the problem here is because the code we have in OSP 11 still a little behind from the upstream version and the NMI endpoint still doesn't exist. I see you are using the 1.28 version of the API is that the latest ? Because NMI was included in the 1.29 [0]. [0] https://review.openstack.org/#/c/348191/
I think Lucas is right, and you should use --os-baremetal-api-version 1.29
Here's what I get: openstack --os-baremetal-api-version 1.29 baremetal node inject nmi 113befaa-9f02-4e08-a249-04a27c13abb0 openstack: error: argument --os-baremetal-api-version: invalid choice: u'1.29' (choose from '1', '1.1', '1.2', '1.3', '1.4', '1.5', '1.6', '1.7', '1.8', '1.9', '1.10', '1.11', '1.12', '1.13', '1.14', '1.15', '1.16', '1.17', '1.18', '1.19', '1.20', '1.21', '1.22', '1.23', '1.24', '1.25', '1.26', '1.27', '1.28', 'latest') [stack@undercloud ~]$ openstack --os-baremetal-api-version=latest baremetal node inject Resource could not be found. (HTTP 404)
FWIW I don't believe it's a blocker as the 'ironic node-inject-nmi' command seems to understand the new version.
That's right, the 'ironic' command understands it in version 1.29: $ ironic --ironic-api-version 1.29 node-inject-nmi compute-1 Driver pxe_ssh does not support inject_nmi (disabled or not implemented). (HTTP 400) But as reported by Sasha the 'openstack' client only understands up to API version 1.28. With regards to Lucas' comment#2, the current OSP 11 where I checked this has the NMI code in it: # grep -n nmi /usr/lib/python2.7/site-packages/ironic/conductor/manager.py 2264: @METRICS.timer('ConductorManager.inject_nmi') 2268: def inject_nmi(self, context, node_id): 2277: support management or management.inject_nmi. 2282: LOG.debug('RPC inject_nmi called for node %s', node_id) 2285: purpose='inject nmi') as task: 2292: task.driver.management.inject_nmi(task) Not a blocker but relevant for documentation.
Verified: Environment: python-ironicclient-1.11.1-1.el7ost.noarch [stack@undercloud-0 ~]$ openstack --os-baremetal-api-version 1.29 baremetal node inject nmi a864ab86-2dfb-44b2-a3c3-0d312e775269 Message from syslogd@compute-1 at Mar 22 15:49:29 ... kernel: Uhhuh. NMI received for unknown reason 20 on CPU 0. Message from syslogd@compute-1 at Mar 22 15:49:29 ... kernel: Do you have a strange power saving mode enabled? Message from syslogd@compute-1 at Mar 22 15:49:29 ... kernel: Dazed and confused, but trying to continue [stack@undercloud-0 ~]$
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHEA-2017:1245