Bug 1200681

Summary: Discovery image can't find BMC details on HP hardware
Product: Red Hat OpenStack Reporter: Eduard Barrera <ebarrera>
Component: foreman-discovery-imageAssignee: Lukas Zapletal <lzap>
Status: CLOSED EOL QA Contact: Omri Hochman <ohochman>
Severity: unspecified Docs Contact:
Priority: low    
Version: 6.0 (Juno)CC: jwaterwo, lzap, mburns, rhos-maint, srevivo
Target Milestone: z5Keywords: ZStream
Target Release: Installer   
Hardware: Unspecified   
OS: Unspecified   
URL: http://projects.theforeman.org/issues/9810
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-09-29 13:40:28 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 Eduard Barrera 2015-03-11 07:33:37 UTC
Description of problem:


The discovery image 20140905.0.el7sat is using the package ovirt-node-plugin-foreman-0.6.0-1.el7sat.noarch which installs the discovery script discovery-facts.rb that it's used to get the BMC details of the hosts (and more information).

This script looks for the bmc details by issuing this command:
"Facter::Util::Resolution.exec("ipmitool lan print 1 2>/dev/null")"
But, on HP hardware the ILO is on the channel 2, so the discovery script doesn't get the details.

For a better support of different hardware, the script should issue something like this before executing the ipmitool command:
for i in `seq 0 15`; do ipmitool lan print $i 2>/dev/null | grep -q ^IP && echo $i; done
And then use the returned value to find the BMC details with the ipmitool lan print command

Hide Section - Tags

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

discovery image 20140905.0.el7sat

How reproducible:
Unsure



Actual results:

 HP hardware the ILO is on the channel 2, so the discovery script doesn't get the details

Expected results:

Get the details

Additional info:

Comment 5 Lukas Zapletal 2015-03-18 13:20:00 UTC
Adding all ports in facts as ipmi_XXX_fact and will still provide the first found port as the existing facts named ipmi_fact.

Comment 6 Lukas Zapletal 2015-03-18 14:18:48 UTC
Created upstream issue: http://projects.theforeman.org/issues/9810

Created upstream patch: https://github.com/theforeman/foreman-discovery-image/pull/7

This patch now fixes ipmi_facts and also add ipmi_N_facts (where N is channel number) for those who would like to get information from multiple channels for any reason.

Example run of facter with this patch on IBM server with IPMI on channel 1:

[root@ibm-x3655-01 ~]# FACTERLIB=/root facter | grep ipmi
ipmi_1_gateway => 10.16.71.254
ipmi_1_ipaddress => 10.16.68.91
ipmi_1_ipaddress_source => DHCP Address
ipmi_1_macaddress => 00:14:5e:5b:8c:8e
ipmi_1_subnet_mask => 255.255.248.0
ipmi_enabled => true
ipmi_gateway => 10.16.71.254
ipmi_ipaddress => 10.16.68.91
ipmi_ipaddress_source => DHCP Address
ipmi_macaddress => 00:14:5e:5b:8c:8e
ipmi_subnet_mask => 255.255.248.0

The same on HP box with IPMI on channel 2:

[root@hp-dl165g6-01 ~]# FACTERLIB=/root facter | grep ipmi
ipmi_2_gateway => 10.16.71.254
ipmi_2_ipaddress => 10.16.66.131
ipmi_2_ipaddress_source => DHCP Address
ipmi_2_macaddress => 00:25:b3:e6:5d:98
ipmi_2_subnet_mask => 255.255.248.0
ipmi_enabled => true
ipmi_gateway => 10.16.71.254
ipmi_ipaddress => 10.16.66.131
ipmi_ipaddress_source => DHCP Address
ipmi_macaddress => 00:25:b3:e6:5d:98
ipmi_subnet_mask => 255.255.248.0

Please cherry-pick at will.

Comment 8 Mike McCune 2016-03-28 23:00:31 UTC
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune with any questions

Comment 11 Jaromir Coufal 2016-09-29 13:40:28 UTC
Closing list of bugs for RHEL OSP Installer since its support cycle has already ended [0]. If there is some bug closed by mistake, feel free to re-open.

For new deployments, please, use RHOSP director (starting with version 7).

-- Jaromir Coufal
-- Sr. Product Manager
-- Red Hat OpenStack Platform

[0] https://access.redhat.com/support/policy/updates/openstack/platform