kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject kafka git commit: MINOR: Vagrant provisioning fixes
Date Thu, 30 Mar 2017 21:41:40 GMT
Repository: kafka
Updated Branches:
  refs/heads/trunk dd71e4a8d -> 4e92fd5f7


MINOR: Vagrant provisioning fixes

Author: Magnus Edenhill <magnus@edenhill.se>

Reviewers: Jason Gustafson <jason@confluent.io>

Closes #2767 from edenhill/harden_provision


Project: http://git-wip-us.apache.org/repos/asf/kafka/repo
Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/4e92fd5f
Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/4e92fd5f
Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/4e92fd5f

Branch: refs/heads/trunk
Commit: 4e92fd5f7411da155aeec166901f5f6f89ca7ba2
Parents: dd71e4a
Author: Magnus Edenhill <magnus@edenhill.se>
Authored: Thu Mar 30 14:40:54 2017 -0700
Committer: Jason Gustafson <jason@confluent.io>
Committed: Thu Mar 30 14:41:27 2017 -0700

----------------------------------------------------------------------
 vagrant/base.sh | 22 +++++++++++++++++++++-
 1 file changed, 21 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/4e92fd5f/vagrant/base.sh
----------------------------------------------------------------------
diff --git a/vagrant/base.sh b/vagrant/base.sh
index 448c640..12aa9e0 100755
--- a/vagrant/base.sh
+++ b/vagrant/base.sh
@@ -29,7 +29,17 @@ if [ -z `which javac` ]; then
     fi
 
     /bin/echo debconf shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections
-    apt-get -y install oracle-java7-installer oracle-java7-set-default
+
+    # oracle-javaX-installer runs wget with a dot progress indicator which ends up
+    # as one line per dot in the build logs.
+    # To avoid this noise we redirect all output to a file that we only show if apt-get fails.
+    echo "Installing JDK..."
+    if ! apt-get -y install oracle-java7-installer oracle-java7-set-default >/tmp/jdk_install.log
2>&1 ; then
+        cat /tmp/jdk_install.log
+        echo "ERROR: JDK install failed"
+        exit 1
+    fi
+    echo "JDK installed: $(javac -version 2>&1)"
 
     if [ -e "/tmp/oracle-jdk7-installer-cache/" ]; then
         cp -R /var/cache/oracle-jdk7-installer/* /tmp/oracle-jdk7-installer-cache
@@ -43,6 +53,16 @@ if [ -h /opt/kafka-dev ]; then
 fi
 ln -s /vagrant /opt/kafka-dev
 
+# Verification to catch provisioning errors.
+if [[ ! -x /opt/kafka-dev/bin/kafka-run-class.sh ]]; then
+    echo "ERROR: kafka-run-class.sh not found/executable in /opt/kafka-dev/bin"
+    find /opt/kafka-dev
+    ls -la /opt/kafka-dev/bin/kafka-run-class.sh || true
+    exit 1
+fi
+
+
+
 get_kafka() {
     version=$1
 


Mime
View raw message