You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bigtop.apache.org by rv...@apache.org on 2017/03/22 23:35:10 UTC

bigtop git commit: BIGTOP-2707. localhost is missing in docker provisioner instances

Repository: bigtop
Updated Branches:
  refs/heads/master 61718f27b -> 2a5a62e30


BIGTOP-2707. localhost is missing in docker provisioner instances


Project: http://git-wip-us.apache.org/repos/asf/bigtop/repo
Commit: http://git-wip-us.apache.org/repos/asf/bigtop/commit/2a5a62e3
Tree: http://git-wip-us.apache.org/repos/asf/bigtop/tree/2a5a62e3
Diff: http://git-wip-us.apache.org/repos/asf/bigtop/diff/2a5a62e3

Branch: refs/heads/master
Commit: 2a5a62e30fe49db7f9c43608595b6e963b6b0453
Parents: 61718f2
Author: Roman Shaposhnik <rv...@apache.org>
Authored: Wed Mar 22 03:57:23 2017 +0000
Committer: Roman Shaposhnik <rv...@apache.org>
Committed: Wed Mar 22 16:34:48 2017 -0700

----------------------------------------------------------------------
 provisioner/docker/docker-hadoop.sh   | 3 ++-
 provisioner/utils/setup-env-centos.sh | 4 ++++
 2 files changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/bigtop/blob/2a5a62e3/provisioner/docker/docker-hadoop.sh
----------------------------------------------------------------------
diff --git a/provisioner/docker/docker-hadoop.sh b/provisioner/docker/docker-hadoop.sh
index 80daf67..12488a1 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() {

http://git-wip-us.apache.org/repos/asf/bigtop/blob/2a5a62e3/provisioner/utils/setup-env-centos.sh
----------------------------------------------------------------------
diff --git a/provisioner/utils/setup-env-centos.sh b/provisioner/utils/setup-env-centos.sh
index 86b6a3c..48bb2f6 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