For some reason, we assume that "hostname" and "uname -n" return the FQDN. That is not a proper configuration.
The "hostname" is the short name of the machine. So for a machine designated by foo.example.com, "hostname" (and uname -n) should return "foo" and hostname -f should return foo.example.com.
This is documented in a few places, but just an example:
http://www.debian.org/doc/manuals/debian-reference/ch05.en.html#_the_hos...
We should make sure people configure their /etc/hosts correctly (which we do, i think) and make sure they configure their hostname correctly too (which we don't, and we assume that we set the /etc/hostname to the FQDN, which is wrong).
Comments
Comment #1
anarcat CreditAttribution: anarcat commentedBasically, I think this means changing the INSTALL.txt to read this:
instead of this:
Would that be sufficient? Where else did we cook in that assumption?
Comment #2
Anonymous (not verified) CreditAttribution: Anonymous commentedphp_uname is littered all through install.hostmaster.inc, migrate.hostmaster.inc and provision.inc's provision_is_local_host($host) function
Comment #3
Anonymous (not verified) CreditAttribution: Anonymous commentedThe more I think about it, it should *definitely* use the FQDN. I added a remote web server and because uname -n was 'aegir' on my other host (which resolved to the public IP due to /etc/hosts on Rackspace Cloud servers), it was trying to talk back to the database on the main server as 'aegir' and couldn't, obviously until I fudged the hosts on the remote web server.
If it was the FQDN, it would likely 'just work'.
Comment #4
Anonymous (not verified) CreditAttribution: Anonymous commentedhostname -f ought to work - however the fun won't end there. Slicehost and Rackspace servers, for example, set the fqdn as the name of the server when you create it.
In other words, if I spin up a server called 'aegir-02', the short and fqdn of the server is 'aegir-02'.
Given the popularity of such providers, I think we'd still be obligated to give an example of a hosts fudge to make this work.
Adrian, want to update this ticket on what stuff you were doing with slicehost and puppet around this area?
Comment #5
adrian CreditAttribution: adrian commentedthis could work if we get rid of uname -n
save that to hostname.pp and run
puppet hostname.pp
as root.Comment #6
Anonymous (not verified) CreditAttribution: Anonymous commentedWe just prompt for this now on install, and require a FQDN. So I think we can just close this.