Graham Gear created WHIRR-634:
---------------------------------
Summary: Update private IP host file entry when required by
AUTO_HOSTNAME_SUFFIX
Key: WHIRR-634
URL: https://issues.apache.org/jira/browse/WHIRR-634
Project: Whirr
Issue Type: Improvement
Components: core
Affects Versions: 0.7.1
Reporter: Graham Gear
Priority: Minor
Currently, configure_hostnames.sh ensures that the public IP host file entry is
written if required by the AUTO_HOSTNAME_SUFFIX variable. It does not however
touch the internal IP host file entry, which is likely to retain an entry for
the initial (and generally unresolvable) hostname. It is suggested that
configure_hostname.sh also update the private IP host file entry, with a
'private.' prefix to ensure there is no ambiguity in reverse lookups, since the
order of the host file entries cannot be relied on (eg the order varies host to
host, IP to IP on Rackspace Cloud). This keeps the public/private host file
entries in sync and allows them to be used interchangably depending on the
visibility requirements of the node.
Eg, on Rackspace cloud, if provisioning a node with a whirr.cluster-name
'cdh-cluster' on Rackspace Cloud UK, the pre configure_hostnames.sh on a
particular node looks as so:
-bash-4.1$ cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
10.177.7.48 cdh-cluster-74f
31.222.177.80 cdh-cluster-74f
after current trunk configure_hostnames.sh:
-bash-4.1$ cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
10.177.7.48 cdh-cluster-74f
31.222.177.80 31-222-177-80.static.cloud-ips.co.uk
and after the suggested updates in this JIRA it would look like:
-bash-4.1$ cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
10.177.7.48 private.31-222-177-80.static.cloud-ips.co.uk
31.222.177.80 31-222-177-80.static.cloud-ips.co.uk
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira