kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ewe...@apache.org
Subject kafka git commit: MINOR: Apply extra serialized rsync step to both parallel and serial paths
Date Thu, 20 Jul 2017 17:49:36 GMT
Repository: kafka
Updated Branches:
  refs/heads/0.10.1 9b7af79a1 -> bafdc980a


MINOR: Apply extra serialized rsync step to both parallel and serial paths

Author: Ewen Cheslack-Postava <ewen@confluent.io>

Reviewers: Ismael Juma <ismael@juma.me.uk>, Eno Thereska <eno.thereska@gmail.com>

Closes #3546 from ewencp/fix-rsync

(cherry picked from commit 9b7a6ee2a9eabbeca2000c2d1831bc11fcc4a41f)
Signed-off-by: Ewen Cheslack-Postava <me@ewencp.org>


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

Branch: refs/heads/0.10.1
Commit: bafdc980a091f9435df90240475b1245bc5d3d5d
Parents: 9b7af79
Author: Ewen Cheslack-Postava <ewen@confluent.io>
Authored: Thu Jul 20 10:49:06 2017 -0700
Committer: Ewen Cheslack-Postava <me@ewencp.org>
Committed: Thu Jul 20 10:49:33 2017 -0700

----------------------------------------------------------------------
 vagrant/vagrant-up.sh | 32 +++++++++++++++++---------------
 1 file changed, 17 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/bafdc980/vagrant/vagrant-up.sh
----------------------------------------------------------------------
diff --git a/vagrant/vagrant-up.sh b/vagrant/vagrant-up.sh
index b7fb88a..fa320f4 100755
--- a/vagrant/vagrant-up.sh
+++ b/vagrant/vagrant-up.sh
@@ -215,31 +215,33 @@ function bring_up_aws {
 
         if [[ ! -z "$worker_machines" ]]; then
             echo "Bringing up test worker machines in parallel"
-            # Currently it seems that the AWS provider will always run
-            # rsync as part of vagrant up. However,
-            # https://github.com/mitchellh/vagrant/issues/7531 means
-            # it is not safe to do so. Since the bug doesn't seem to
-            # cause any direct errors, just missing data on some
-            # nodes, follow up with serial rsyncing to ensure we're in
-            # a clean state. Use custom TMPDIR values to ensure we're
-            # isolated from any other instances of this script that
-            # are running/ran recently and may cause different
-            # instances to sync to the wrong nodes
+	    # Try to isolate this job in its own /tmp space. See note
+	    # below about vagrant issue
             local vagrant_rsync_temp_dir=$(mktemp -d);
             TMPDIR=$vagrant_rsync_temp_dir vagrant_batch_command "vagrant up --provider=aws"
"$worker_machines" "$max_parallel"
             rm -rf $vagrant_rsync_temp_dir
             vagrant hostmanager
-            for worker in $worker_machines; do
-                local vagrant_rsync_temp_dir=$(mktemp -d);
-                TMPDIR=$vagrant_rsync_temp_dir vagrant rsync $worker;
-                rm -rf $vagrant_rsync_temp_dir
-            done
         fi
     else
         vagrant up --provider=aws --no-parallel --no-provision
         vagrant hostmanager
         vagrant provision
     fi
+
+    # Currently it seems that the AWS provider will always run rsync
+    # as part of vagrant up. However,
+    # https://github.com/mitchellh/vagrant/issues/7531 means it is not
+    # safe to do so. Since the bug doesn't seem to cause any direct
+    # errors, just missing data on some nodes, follow up with serial
+    # rsyncing to ensure we're in a clean state. Use custom TMPDIR
+    # values to ensure we're isolated from any other instances of this
+    # script that are running/ran recently and may cause different
+    # instances to sync to the wrong nodes
+    for worker in $worker_machines; do
+        local vagrant_rsync_temp_dir=$(mktemp -d);
+        TMPDIR=$vagrant_rsync_temp_dir vagrant rsync $worker;
+        rm -rf $vagrant_rsync_temp_dir
+    done
 }
 
 function main {


Mime
View raw message