Setup name resolution for non long name

Nova is using the hostname returned by python's socket.gethostname()
which is not returning the fqdn. Set up name resolution for that name
instead of the long name so that nova live migrations function properly.

Change-Id: I7ae90999aa92c61dfa88631c0c7daaa18a874c06
This commit is contained in:
Clark Boylan
2015-07-17 14:40:46 -07:00
parent 5a9565c8f7
commit b2645f9a72

View File

@@ -527,10 +527,10 @@ EOF
# set up ssh_known_hosts by IP and /etc/hosts
for NODE in $SUB_NODES; do
ssh-keyscan $NODE >> /tmp/tmp_ssh_known_hosts
echo $NODE `remote_command $NODE hostname -f | tr -d '\r'` >> /tmp/tmp_hosts
echo $NODE `remote_command $NODE hostname | tr -d '\r'` >> /tmp/tmp_hosts
done
ssh-keyscan `cat /etc/nodepool/primary_node_private` >> /tmp/tmp_ssh_known_hosts
echo `cat /etc/nodepool/primary_node_private` `hostname -f` >> /tmp/tmp_hosts
echo `cat /etc/nodepool/primary_node_private` `hostname` >> /tmp/tmp_hosts
cat /tmp/tmp_hosts | sudo tee --append /etc/hosts
# set up ssh_known_host files based on hostname