Repository: kafka
Updated Branches:
  refs/heads/trunk b04bed022 -> 9b7a6ee2a


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

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

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

Closes #3546 from ewencp/fix-rsync


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

Branch: refs/heads/trunk
Commit: 9b7a6ee2a9eabbeca2000c2d1831bc11fcc4a41f
Parents: b04bed0
Author: Ewen Cheslack-Postava <e...@confluent.io>
Authored: Thu Jul 20 10:49:06 2017 -0700
Committer: Ewen Cheslack-Postava <m...@ewencp.org>
Committed: Thu Jul 20 10:49:06 2017 -0700

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


http://git-wip-us.apache.org/repos/asf/kafka/blob/9b7a6ee2/vagrant/vagrant-up.sh
----------------------------------------------------------------------
diff --git a/vagrant/vagrant-up.sh b/vagrant/vagrant-up.sh
index 5b88144..6a4ef95 100755
--- a/vagrant/vagrant-up.sh
+++ b/vagrant/vagrant-up.sh
@@ -226,31 +226,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 
$debug --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 $debug
         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 {

Reply via email to