RDO tickets are now tracked in Jira https://issues.redhat.com/projects/RDO/issues/
Bug 1175121 - Registering nodes with the IPMI driver always fails
Summary: Registering nodes with the IPMI driver always fails
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RDO
Classification: Community
Component: openstack-tuskar-ui
Version: Juno
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: ---
: ---
Assignee: Ana Krivokapic
QA Contact: yeylon@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-12-17 08:36 UTC by Udi Kalifon
Modified: 2016-04-18 06:47 UTC (History)
5 users (show)

Fixed In Version: openstack-tuskar-ui-0.2.0-8.el7ost
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-03-30 23:08:41 UTC
Embargoed:


Attachments (Terms of Use)
journalctl output (2.79 KB, application/x-gzip)
2014-12-17 15:25 UTC, Udi Kalifon
no flags Details
openstack-ironic-api.log (7.79 KB, application/x-gzip)
2014-12-18 15:23 UTC, Udi Kalifon
no flags Details

Description Udi Kalifon 2014-12-17 08:36:23 UTC
Description of problem:
When registering a bare metal node and providing its IPMI details, registration always fails with: "Danger: There was an error submitting the form. Please try again."


How reproducible:
100%


Steps to Reproduce:
1. Install TripleO using the instructions in https://openstack.redhat.com/Deploying_RDO_on_a_Baremetal_Environment_using_Instack (or alternatively deploy in a virtual environment according to the instructions here: https://openstack.redhat.com/Deploying_RDO_on_a_Virtual_Machine_Environment_using_Instack)
2. Log in to TripleO via the GUI
3. Go to the Nodes section
4. Click on "Register Nodes"
5. Fill in all the details of the node's IPMI connection and the available hardware on the machine
6. Click on "Register"


Actual results:
You get an error: "Danger: There was an error submitting the form. Please try again."


Expected results:
Success, or a more informative error message...


Additional info:
Nothing meaningful is found in the logs

Comment 2 James Slagle 2014-12-17 12:53:45 UTC
this is either a UI bug or an Ironic bug. Can you add debug=True to /etc/ironic/ironic.conf, then restart openstack-ironic-api and openstack-ironic-conductor, then try adding the nodes again via the UI.

Then use journalctl to check the output from openstack-ironic-conductor for a meaningful failure. If you can attach that log here as well, that would be helpful.

journalctl -u openstack-ironic-conductor --full > openstack-ironic-conductor.log

Comment 3 Udi Kalifon 2014-12-17 14:36:29 UTC
From journalctl, it looks like the ipmitool command was called in an invalid way, because it is dumping the usage info to stderr, and stdout is blank:

2014-12-17 21:23:10.559 99176 DEBUG ironic.common.utils [-] Execution completed, command line is "ipmitool -N 0 -R 0 -h" execute /usr/lib/python2.7/site-packages/ironic/common/utils.py:84
2014-12-17 21:23:10.560 99176 DEBUG ironic.common.utils [-] Command stdout is: "" execute /usr/lib/python2.7/site-packages/ironic/common/utils.py:85 
2014-12-17 21:23:10.560 99176 DEBUG ironic.common.utils [-] Command stderr is: "ipmitool version 1.8.13
usage: ipmitool [options...] <command>
-h             This help
-V             Show version information
-v             Verbose (can use multiple times)
-c             Display output in comma separated format

.... [more usage info snipped]

" execute /usr/lib/python2.7/site-packages/ironic/common/utils.py:86

Comment 4 James Slagle 2014-12-17 14:43:45 UTC
that output is expected. ipmitool is first called with -h to show the help as a way to confirm that the client tool is installed and can be executed.

was there any other output after registering the node?

Comment 5 Udi Kalifon 2014-12-17 15:25:13 UTC
Created attachment 970171 [details]
journalctl output

There is nothing in the output after registering the node. The complere output is attached.

Comment 6 James Slagle 2014-12-17 16:25:35 UTC
please attach openstack-ironic-api log as well with debug=True in /etc/ironic/ironic.conf from the time when you tried to add the node via the UI.

Comment 7 James Slagle 2014-12-18 13:24:57 UTC
please provide the requested information from comment 6

Comment 8 James Slagle 2014-12-18 13:26:19 UTC
also please confirm the following from my email:

Failure to add the node with IPMI credentials usually means the IPMI
credentials are not correct. You can verify them from the CLI on the undercloud
by running the following:

ipmitool -I lanplus -H <ipmi-ip-address> -U <ipmi-username> -P <ipmi-password>  chassis status

You should see some output about the nodes state like so:

System Power         : on
Power Overload       : false
Power Interlock      : inactive
Main Power Fault     : false
Power Control Fault  : false
Power Restore Policy : always-on
Last Power Event     :
Chassis Intrusion    : inactive
Front-Panel Lockout  : inactive
Drive Fault          : false
Cooling/Fan Fault    : false
Front Panel Control  : none

Comment 9 Tzu-Mainn Chen 2014-12-18 13:30:52 UTC
It might be also worth setting debug=True in /usr/share/openstack-dashboard/openstack_dashboard/local/local_settings.py,restarting httpd, and attaching the output of the httpd log (in addition to Slagle's requested information).

Comment 10 Udi Kalifon 2014-12-18 15:23:10 UTC
Created attachment 970624 [details]
openstack-ironic-api.log

I verified the username and password are correct with the ipmitool. I attach the ironic-api log.

In httpd log you also see a related error:

[Thu Dec 18 15:01:02.925803 2014] [:error] [pid 20222] DEBUG:ironicclient.common.http:curl -i -X POST -H 'X-Auth-Token: 343beee77b7742d7859816786df869b4' -H 'Content-Type: application/json' -H 'Accept: application/json' -H 'User-Agent: python-ironicclient' -d '{"driver": "ipmi", "properties": {"memory_mb": 32768, "cpu_arch": "x86_64", "local_gb": 500, "cpus": 12}, "driver_info": {"password": "admin", "ipmi_address": "10.35.160.14", "ipmi_username": "admin"}}' http://192.0.2.1:6385//v1/nodes
[Thu Dec 18 15:01:02.942440 2014] [:error] [pid 20222] DEBUG:ironicclient.common.http:
[Thu Dec 18 15:01:02.942479 2014] [:error] [pid 20222] HTTP/1.0 400 Bad Request
[Thu Dec 18 15:01:02.942485 2014] [:error] [pid 20222] date: Thu, 18 Dec 2014 15:01:02 GMT
[Thu Dec 18 15:01:02.942490 2014] [:error] [pid 20222] content-length: 184
[Thu Dec 18 15:01:02.942494 2014] [:error] [pid 20222] content-type: application/json
[Thu Dec 18 15:01:02.942499 2014] [:error] [pid 20222] server: WSGIServer/0.1 Python/2.7.5
[Thu Dec 18 15:01:02.942503 2014] [:error] [pid 20222]
[Thu Dec 18 15:01:02.942516 2014] [:error] [pid 20222] {"error_message": "{\\"debuginfo\\": null, \\"faultcode\\": \\"Client\\", \\"faultstring\\": \\"No valid host was found. Reason: No conductor service registered which supports driver ipmi.\\"}"}
[Thu Dec 18 15:01:02.942522 2014] [:error] [pid 20222]
[Thu Dec 18 15:01:02.942639 2014] [:error] [pid 20222] WARNING:ironicclient.common.http:Request returned failure status.

Comment 11 Tzu-Mainn Chen 2014-12-18 15:35:26 UTC
Ah - this looks like an issue that was fixed previously:

https://github.com/openstack/tuskar-ui/commit/0e6e54da4296ae240a1f2317cdc24a2ea7569e59

Can you tell us what version of the tuskar-ui package is installed?  Are you using RHOS6 repositories only, or RDO as well?

Comment 12 Jaromir Coufal 2015-01-07 15:48:55 UTC
Udi, can you confirm what source did you install tuskar-ui from? That patch looks like it should have fixed it, so we need to check if you fave included it.

Comment 13 Udi Kalifon 2015-01-08 13:21:46 UTC
I recreated this today with these packages:

openstack-tuskar-0.4.15-2.fc22.noarch
openstack-tuskar-ui-0.2.0-5.fc22.noarch
python-tuskarclient-0.1.15-1.fc22.noarch

The repo is an RDO repo:
[openstack-juno]
name=OpenStack Juno Repository
baseurl=http://repos.fedorapeople.org/repos/openstack/openstack-juno/fedora-$releasever/
enabled=1
skip_if_unavailable=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-RDO-Juno

Comment 15 Udi Kalifon 2015-01-25 09:02:14 UTC
With the latest packages, the registration of bare metal nodes succeeds using the IPMI driver. However, the discovery stage takes forever... I guess this bug can be closed, though.


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