aboutsummaryrefslogtreecommitdiff
path: root/provisioner
diff options
context:
space:
mode:
authorRoman Shaposhnik <rvs@apache.org>2017-03-22 03:57:23 +0000
committerRoman Shaposhnik <rvs@apache.org>2017-03-22 16:34:48 -0700
commit2a5a62e30fe49db7f9c43608595b6e963b6b0453 (patch)
treeed59ca963164f6bde53ba974c0cfff932f1fd69c /provisioner
parent61718f27b59a0bc51e9235fc2de0ffd1fd4d1d65 (diff)
BIGTOP-2707. localhost is missing in docker provisioner instances
Diffstat (limited to 'provisioner')
-rwxr-xr-xprovisioner/docker/docker-hadoop.sh3
-rwxr-xr-xprovisioner/utils/setup-env-centos.sh4
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