kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ewe...@apache.org
Subject kafka git commit: KAFKA-4251: fix test driver not launching in Vagrant 1.8.6
Date Tue, 04 Oct 2016 21:45:15 GMT
Repository: kafka
Updated Branches:
  refs/heads/trunk b3eef7bc7 -> 305fb59b1


KAFKA-4251: fix test driver not launching in Vagrant 1.8.6

custom ip resolver in test driver makes incorrect assumption when calling vm.communicate.execute,
causing driver to fail launching with Vagrant 1.8.6, due to https://github.com/mitchellh/vagrant/pull/7676

Author: Xavier Léauté <xavier@confluent.io>

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

Closes #1962 from xvrl/fix-vagrant-resolver


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

Branch: refs/heads/trunk
Commit: 305fb59b13da8b0b0a1a657688c0fa5f5916c91f
Parents: b3eef7b
Author: Xavier Léauté <xavier@confluent.io>
Authored: Tue Oct 4 14:45:09 2016 -0700
Committer: Ewen Cheslack-Postava <me@ewencp.org>
Committed: Tue Oct 4 14:45:09 2016 -0700

----------------------------------------------------------------------
 Vagrantfile | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/305fb59b/Vagrantfile
----------------------------------------------------------------------
diff --git a/Vagrantfile b/Vagrantfile
index 0471a7e..09d780c 100644
--- a/Vagrantfile
+++ b/Vagrantfile
@@ -99,9 +99,11 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
       if !cached_addresses.has_key?(vm.name)
         state_id = vm.state.id
         if state_id != :not_created && state_id != :stopped && vm.communicate.ready?
-          vm.communicate.execute("/sbin/ifconfig eth0 | grep 'inet addr' | tail -n 1 | egrep
-o '[0-9\.]+' | head -n 1 2>&1") do |type, contents|
-            cached_addresses[vm.name] = contents.split("\n").first[/(\d+\.\d+\.\d+\.\d+)/,
1]
+          contents = ''
+          vm.communicate.execute("/sbin/ifconfig eth0 | grep 'inet addr' | tail -n 1 | egrep
-o '[0-9\.]+' | head -n 1 2>&1") do |type, data|
+            contents << data
           end
+          cached_addresses[vm.name] = contents.split("\n").first[/(\d+\.\d+\.\d+\.\d+)/,
1]
         else
           cached_addresses[vm.name] = nil
         end


Mime
View raw message