Ruby193 - SCL "facter fqdn" not displaying FQDN - displaying null value
Installing a Foreman 1.6.2 host on CentOS 6.4 x86_64 I hit a problem with the database seed process.
after invetigation within the #theforeman IRC channel on freenode it was identified that ruby193 provided by SCL was not detecting the FQDN with the command "facter fqdn"
Rather than displaying hostname.fqdn the output was null.
The hostname is set as just a hostname (in this example set in /etc/sysconfig/network) and relies on the FQDN being appended from the resolver.
In this example I had an entry in /etc/hosts for "buildhost.iso" and in my local DNS which was confirmed correct with the domain "iso" and search "iso" in the resolv.conf and could be queried using nslookup, and hostname -f.
Both options returned the hostname.fqdn (in this example buildhost.iso)
the command "scl enable ruby193 'facter fqdn'" returned null.
The only way around this was to set the hostname to the FQDN host in either /etc/sysconfig/network or via the hostname command.
This allowed the install to complete sucessfully.
The version of Ruby being supplied by SCL is as follows
#1 Updated by Dominic Cleal over 5 years ago
- Status changed from New to Closed
- Assignee set to Dominic Cleal
- Target version set to 1.7.2
- % Done changed from 0 to 100
- Legacy Backlogs Release (now unused) set to 21
ruby193-facter-2.2.0 has been built into nightlies for Foreman 1.7. It should have much better hostname resolution.