Work around hpcloud hostname issue.
The hostname needs to be in /etc/hosts, we can't rely on the dns server that hpcloud is using now; it breaks during nova network reconfiguration, and that breaks sudo. Change-Id: I4f0a39f5d629f1eeaf47af66528db3c63692810b
This commit is contained in:
@@ -43,6 +43,16 @@ if [ "$DEVSTACK_GATE_TEMPEST" -eq "1" ]; then
|
||||
PROJECTS="openstack/tempest $PROJECTS"
|
||||
fi
|
||||
|
||||
# HPcloud stopped adding the hostname to /etc/hosts with their
|
||||
# precise images.
|
||||
|
||||
HOSTNAME=`/bin/hostname`
|
||||
if ! grep $HOSTNAME /etc/hosts >/dev/null
|
||||
then
|
||||
echo "Need to add hostname to /etc/hosts"
|
||||
sudo bash -c 'echo "127.0.1.1 $HOSTNAME" >>/etc/hosts'
|
||||
fi
|
||||
|
||||
cd $WORKSPACE
|
||||
|
||||
ORIGINAL_GERRIT_PROJECT=GERRIT_PROJECT
|
||||
|
||||
Reference in New Issue
Block a user