diff options
-rwxr-xr-x | provisioner/docker/docker-hadoop.sh | 3 | ||||
-rwxr-xr-x | provisioner/utils/setup-env-centos.sh | 4 |
2 files changed, 6 insertions, 1 deletions
diff --git a/provisioner/docker/docker-hadoop.sh b/provisioner/docker/docker-hadoop.sh index 80daf671..12488a13 100755 --- a/provisioner/docker/docker-hadoop.sh +++ b/provisioner/docker/docker-hadoop.sh @@ -77,7 +77,8 @@ generate-hosts() { docker exec ${NODES[0]} bash -c "echo $entry >> /etc/hosts" done wait - + # This must be the last entry in the /etc/hosts + echo "127.0.0.1 localhost" >> ./config/hosts } generate-config() { diff --git a/provisioner/utils/setup-env-centos.sh b/provisioner/utils/setup-env-centos.sh index 86b6a3c2..48bb2f6e 100755 --- a/provisioner/utils/setup-env-centos.sh +++ b/provisioner/utils/setup-env-centos.sh @@ -17,6 +17,10 @@ enable_local_repo=${1:-false} +# This may be crazy, but unless we change this - RHEL will actively +# revert back to localhost.localdomain +sed -ie 's#HOSTNAME=.*$#HOSTNAME='`hostname -f`'#' /etc/sysconfig/network + # Setup rng-tools to improve virtual machine entropy performance. # The poor entropy performance will cause kerberos provisioning failed. yum -y install rng-tools |