> Scott: Your suggested approach works for me even though I can't find any
> documentation on how this is supposed to work. Everything I read says
> that 127.0.1.1 should be the canonical hostname of the instance. Do you
> happen to have any pointers to the information you are alluding to with
> IPv6 and 127.0.1.2?
No.
I actually tried just adding a 127.0.1.1 at the top, and cloud-init
still found it (i was hoping that it would only update the one preceeded
by it's comment, which would have been nicer). I tried that, it didn't
work.
I don't think this should be "invalid" as I do think we've made things
a bit worse. We were addressing the issue that we saw on openstack where
the ec2metadata's local-hostname did not have a domain portion (bug
854614).
Some other fallout of this change has been in services that try to bind
to the response to `hostname -f`. The service will then end up binding to
localhost only and not be available on a real address. Mark Mimms has
raised this issue, but I'm not certain which services in particular, and
I don't think that is a great solution itself, and those services would
have issues with the mechanism that you're using above for /etc/hosts, but
previously we were not writing a fqdn to /etc/hosts, which would allow a
dns-lookup to get the local-ipv4 address.
I'll talk with some of the people on the foundations team and see if we
can't come up with a final solution for this. I really should have done
some more research before putting this in. Hopefully we can get it right
for 12.04, and possibly SRU for 11.10.
On Tue, 15 Nov 2011, Eric Hammond wrote:
> Scott: Your suggested approach works for me even though I can't find any
> documentation on how this is supposed to work. Everything I read says
> that 127.0.1.1 should be the canonical hostname of the instance. Do you
> happen to have any pointers to the information you are alluding to with
> IPv6 and 127.0.1.2?
No.
I actually tried just adding a 127.0.1.1 at the top, and cloud-init
still found it (i was hoping that it would only update the one preceeded
by it's comment, which would have been nicer). I tried that, it didn't
work.
I don't think this should be "invalid" as I do think we've made things
a bit worse. We were addressing the issue that we saw on openstack where
the ec2metadata's local-hostname did not have a domain portion (bug
854614).
Some other fallout of this change has been in services that try to bind
to the response to `hostname -f`. The service will then end up binding to
localhost only and not be available on a real address. Mark Mimms has
raised this issue, but I'm not certain which services in particular, and
I don't think that is a great solution itself, and those services would
have issues with the mechanism that you're using above for /etc/hosts, but
previously we were not writing a fqdn to /etc/hosts, which would allow a
dns-lookup to get the local-ipv4 address.
I'll talk with some of the people on the foundations team and see if we
can't come up with a final solution for this. I really should have done
some more research before putting this in. Hopefully we can get it right
for 12.04, and possibly SRU for 11.10.