Bug 1442879

Summary: 'openstack baremetal instackenv validate' doesn't work with virtualbmc (it doesn't take port)
Product: Red Hat OpenStack Reporter: Chris Janiszewski <cjanisze>
Component: python-tripleoclientAssignee: Julie Pichon <jpichon>
Status: CLOSED DUPLICATE QA Contact: Gurenko Alex <agurenko>
Severity: medium Docs Contact:
Priority: medium    
Version: 11.0 (Ocata)CC: apevec, asimonel, beth.white, hbrock, jslagle, lhh, mburns, racedoro, rhel-osp-director-maint, srevivo, tcrowe, tvignaud
Target Milestone: Upstream M2Keywords: Triaged
Target Release: 13.0 (Queens)   
Hardware: x86_64   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-01-25 12:17:24 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Chris Janiszewski 2017-04-17 20:51:57 UTC
Description of problem:
pxe_ssh is getting deprecated and pxe_ipmitool with virtualbmc should be used with new releases. 
The validation command for instackenv.json - 'openstack baremetal instackenv validate' doesn't work with virtualbmc (doesn't take port)



Version-Release number of selected component (if applicable):
OSP11


How reproducible:
Everytime


Steps to Reproduce:
1. create instackenv.json that uses virtualbmc with ipmi
2. use validation command
3.

Actual results:
openstack baremetal instackenv validate --debug
START with options: [u'baremetal', u'instackenv', u'validate', u'--debug']
options: Namespace(access_key='', access_secret='***', access_token='***', access_token_endpoint='',
...
Checking node 192.168.122.1
Checking node 192.168.122.1
Identified baremetal node
Executing: ipmitool -R 1 -I lanplus -H 192.168.122.1 -U admin -P password chassis status
Error: Unable to establish IPMI v2 / RMCP+ session
ERROR: ipmitool failed
Checking node 192.168.122.1
Identified baremetal node
Executing: ipmitool -R 1 -I lanplus -H 192.168.122.1 -U admin -P password chassis status
Error: Unable to establish IPMI v2 / RMCP+ session
ERROR: ipmitool failed
Checking node 192.168.122.1
Identified baremetal node
...
ERROR: ipmitool failed
ERROR: Baremetals IPs are not all unique.
MAC addresses are all unique.
FAILURE: found 9 errors
clean_up ValidateInstackEnv: 
END return value: 0


Expected results:
All nodes validate


Additional info:

Here is part of my instackenv.json for reference. Please node the port number:

[stack@undercloud ~]$ cat instackenv.json
{
  "nodes": [
    {
      "pm_user": "admin",
      "mac": [
        "52:54:00:59:ff:17"
      ],
      "pm_type": "pxe_ipmitool",
      "pm_password": "password",
      "pm_addr": "192.168.122.1",
      "pm_port": "6235",
      "name": "overcloud-ctrl01"
    },
    {
      "pm_user": "admin",
      "mac": [
        "52:54:00:81:80:ca"
      ],
      "pm_type": "pxe_ipmitool",
      "pm_password": "password",
      "pm_addr": "192.168.122.1",
      "pm_port": "6236",
     "name": "overcloud-ctrl02"
    },


The instackenv.json can be still imported to ironic, introspected and deployed with .. it just the openstack-cli command that needs to be updated.

Comment 1 Thomas Crowe 2017-05-18 18:26:38 UTC
This occurs in OSP10 as well.  running 'openstack baremetal instackenv validate --debug' shows that the 'ipmitool' is being called without the '-p ####' option resulting in only attempting the default port.

Comment 3 Julie Pichon 2018-01-25 12:17:24 UTC
There is a bug upstream related to this that has seen some recent activity, not sure if it will get in on time for OSP13. Note that it's only the "validate" command which is outdated, importing the file still works fine and ports etc are taken into account. Marking as duplicate as the other bug has more information including a link to the upstream bug.

*** This bug has been marked as a duplicate of bug 1480699 ***