Bug 1165306
Summary: | [RFE] Add BMC interface to "Discovered Host" entry during foreman-discovery image | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat Satellite | Reporter: | John Trowbridge <jtrowbri> | ||||
Component: | Discovery Plugin | Assignee: | Lukas Zapletal <lzap> | ||||
Status: | CLOSED ERRATA | QA Contact: | Sachin Ghai <sghai> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | 6.0.5 | CC: | byodlows, dcleal, dmoessne, lzap, mhulan, ponsfrilus, riehecky, sghai, sthirugn, xdmoon | ||||
Target Milestone: | Unspecified | Keywords: | FutureFeature, Triaged | ||||
Target Release: | Unused | ||||||
Hardware: | All | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Enhancement | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2015-08-12 05:19:19 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: | |||||||
Attachments: |
|
Description
John Trowbridge
2014-11-18 19:28:18 UTC
Since this issue was entered in Red Hat Bugzilla, the release flag has been set to ? to ensure that it is properly evaluated for this release. lzap, please correct me if I'm wrong, but I believe this has already been delivered upstream with the latest images and plugin. Marek have included IPMI utilities on the image for Staypuft work, but I am not sure how this is/was used. CCing. Marek, can you briefely describe the Staypuft use case? The customer would like to provision a system with IPMI set via Foreman Discovery. I don't believe this is currently possible. We added detection for IPMI device in discovery image. We use dmidecode to detect device, then ipmitool to fetch data like IP, MAC, netmask... We add these values as custom facts (names like fact_*) so we can parse them in Satellite and precreate such interfaces for discovered host when we receive facts from puppet agent. Therefore when users provision discovered host we can display the device in form and they don't have to type MAC and IP, they only specify username and password. They can still decide whether they want to e.g. remove the BMC interface or adjust some other attributes. How to test: 1) let some baremetal host with IPMI be discovered by Satellite 2) find the host in web UI under Host -> Discovered hosts 3) click Provision button for this host 4) select Interfaces tab 5) you should see interface with Type BMC with MAC address of IPMI device Thanks Marek and Lukas. Info in comment 9 and 10 will help to verify bz. Thanks Lukas. I tried steps in comment 16. Created two fake commands and set them first in PATH. Facter cmd gives me o/p like: [root@fdi ~]# FACTERLIB=/usr/share/fdi/facts/ facter | grep ipmi ipmi_enabled => true ipmi_gateway => 10.16.71.254 ipmi_ipaddress => 10.16.66.72 ipmi_ipaddress_source => DHCP Address ipmi_macaddress => 00:23:ae:fb:64:75 ipmi_subnet_mask => 255.255.248.0 [root@fdi ~]# systemctl stop discovery-register [root@fdi ~]# systemctl start discovery-register I stopped the discovery-register service and removed the discovered host from server and later I started the discovery-register and can see the discovered host again on UI but it doesn't show BMC facts and interface under new_host form. Please suggest if I'm missing anything ? Weird, can you try to fake-discover a host: [lzap@lzapx ~]$ cat ~/bin/public/discover-host #!/bin/bash URL=${1:-http://localhost:3000} CREDENTIALS=${2:-admin:admin} MAC=$(echo -n 52:54:00:; openssl rand -hex 3 | sed 's/\(..\)/\1:/g; s/.$//') MAC=${3:-$MAC} IP="192.168.122.$(($RANDOM % 253 + 1))" DEVICE=eth0 TMP_DATA=$(mktemp /tmp/discover-host-XXXXXXXXXX) trap "rm -f $TMP_DATA" EXIT cat <<EOD > $TMP_DATA { "facts": { "discovery_bootif": "$MAC", "macaddress_$DEVICE": "$MAC", "ipaddress": "$IP", "ipaddress_$DEVICE": "$IP", "interfaces": "$DEVICE", "physicalprocessorcount": "3", "memorysize_mb": "900", "blockdevice.sda_size": "1234567890", "blockdevice.sdb_size": "123456700", "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" } } EOD cat $TMP_DATA curl -iku "$CREDENTIALS" \ -H "Content-Type: application/json" \ -d @$TMP_DATA -X POST $URL/api/v2/discovered_hosts/facts echo -e "\n" Yes.. with fake-discover host I can see the BMC interface on UI. Please see the screenshot. Created attachment 1029808 [details]
with fake discover_host I can see the BMC interface
Verifying as per comment19. This bug is slated to be released with Satellite 6.1. 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/RHSA-2015:1592 |