Comment 1 for bug 812539

Revision history for this message
Adam Gandelman (gandelman-a) wrote :

Rev 406 ( sanitize hosts file for system hostname (LP: #802637) ) attempts to set the hostname for 127.0.0.1 in /etc/hosts, however:

1. It is using a hard-coded domain of ".localdomain" instead of what is supplied by the cloud provider.
2. It is using platform.node() method to obtain its hostname when it should be using what is provided from cloud-init's data sources.

The following patch fixes this and allows hosts to boot with a valid FQDN as reported by the instance metadata.

Additionally, instances FQDN is included when propagating /etc/hosts from template.