Bug 1419719 - API version 1.29 (introducing NMI) is not supported by ironicclient OSC plugin
Summary: API version 1.29 (introducing NMI) is not supported by ironicclient OSC plugin
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-ironicclient
Version: 11.0 (Ocata)
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: 11.0 (Ocata)
Assignee: Lucas Alvares Gomes
QA Contact: Raviv Bar-Tal
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-02-06 21:11 UTC by Alexander Chuzhoy
Modified: 2017-05-17 19:45 UTC (History)
8 users (show)

Fixed In Version: python-ironicclient-1.11.1-1.el7ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-05-17 19:45:08 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
OpenStack gerrit 430366 0 None None None 2017-02-09 11:07:44 UTC
Red Hat Product Errata RHEA-2017:1245 0 normal SHIPPED_LIVE Red Hat OpenStack Platform 11.0 Bug Fix and Enhancement Advisory 2017-05-17 23:01:50 UTC

Description Alexander Chuzhoy 2017-02-06 21:11:02 UTC
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.

Comment 2 Lucas Alvares Gomes 2017-02-07 09:40:39 UTC
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/

Comment 3 Dmitry Tantsur 2017-02-07 11:08:23 UTC
I think Lucas is right, and you should use --os-baremetal-api-version 1.29

Comment 4 Alexander Chuzhoy 2017-02-07 16:43:20 UTC
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)

Comment 5 Dmitry Tantsur 2017-02-09 11:07:45 UTC
FWIW I don't believe it's a blocker as the 'ironic node-inject-nmi' command seems to understand the new version.

Comment 6 Ramon Acedo 2017-02-24 11:26:59 UTC
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.

Comment 11 Alexander Chuzhoy 2017-03-22 19:50:43 UTC
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 ~]$

Comment 13 errata-xmlrpc 2017-05-17 19:45:08 UTC
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


Note You need to log in before you can comment on or make changes to this bug.