Version-Release number of selected component (if applicable): 24.0 pre-release How reproducible: easily I think Steps to Reproduce: 1. Run a RHEL5 recipe in OpenStack 2. Look at the serial console Actual results: Note that hostname -I errors out, and then install_done fails because the FQDN is empty string (we need to fix both those problems): ++ find_fqdn ++ local fqdn= +++ hostname -f ++ fqdn=host-192-168-11-5 ++ [[ host-192-168-11-5 == *.* ]] +++ cat /etc/hostname cat: /etc/hostname: No such file or directory ++ fqdn= ++ [[ '' == *.* ]] +++ grep '^HOSTNAME=' /etc/sysconfig/network +++ cut -f2- -d= ++ fqdn=host-192-168-11-5 ++ [[ host-192-168-11-5 == *.* ]] ++ hostname -I hostname: invalid option -- I Usage: hostname [-v] {hostname|-F file} set hostname (from file) domainname [-v] {nisdomain|-F file} set NIS domainname (from file) hostname [-v] [-d|-f|-s|-a|-i|-y|-n] display formatted name hostname [-v] display hostname hostname -V|--version|-h|--help print info and exit dnsdomainname=hostname -d, {yp,nis,}domainname=hostname -y -s, --short short host name -a, --alias alias names -i, --ip-address addresses for the hostname -f, --fqdn, --long long host name (FQDN) -d, --domain DNS domain name -y, --yp, --nis NIS/YP domainname -F, --file read hostname or NIS domainname from given file This command can read or set the hostname or the NIS domainname. You can also read the DNS domain or the FQDN (fully qualified domain name). Unless you are using bind or NIS for host lookups you can change the FQDN (Fully Qualified Domain Name) and the DNS domain name (which is part of the FQDN) in the /etc/hosts file. ++ cut '-d ' -f1 + REPORTED_FQDN= + fetch - http://lab-devel-02.rhts.eng.bos.redhat.com:8000/install_done/17874/ + curl --retry 20 --remote-time -o - http://lab-devel-02.rhts.eng.bos.redhat.com:8000/install_done/17874/ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <title>404 Not Found</title> <h1>Not Found</h1> <p>The requested URL was not found on the server.</p><p>If you entered the URL manually please check your spelling and try again.</p> + echo 17874
Going to delay this one more milestone. Don't feel confident that I can thoroughly test this.
Ideally we would just use hostname -i, which already prints the first IP address, and exists back to RHEL3. Unfortunately on RHEL5 and earlier, it just always prints 127.0.0.1 which is of no help.
As a last resort on RHEL5 and earlier we can use a hack like this: ip addr show | grep -v ' lo' | grep -Po '(?<=inet )[0-9.]+' tested on RHEL3, RHEL4, and RHEL5.
https://gerrit.beaker-project.org/5761 hostname -I option does not exist on older RHELs https://gerrit.beaker-project.org/5762 accept install_done call with missing fqdn
Beaker 24.4 has been released.