kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ij...@apache.org
Subject kafka git commit: KAFKA-4251: fix test driver not launching in Vagrant 1.8.6
Date Tue, 07 Mar 2017 00:04:48 GMT
Repository: kafka
Updated Branches:
  refs/heads/0.9.0 3619ad393 -> 06a00933a


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/06a00933
Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/06a00933
Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/06a00933

Branch: refs/heads/0.9.0
Commit: 06a00933a2544fcdc985309c6a26c76643b2461c
Parents: 3619ad3
Author: Xavier Léauté <xavier@confluent.io>
Authored: Tue Oct 4 14:45:09 2016 -0700
Committer: Ismael Juma <ismael@juma.me.uk>
Committed: Tue Mar 7 00:04:33 2017 +0000

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


http://git-wip-us.apache.org/repos/asf/kafka/blob/06a00933/Vagrantfile
----------------------------------------------------------------------
diff --git a/Vagrantfile b/Vagrantfile
index 4e38b0c..3240d61 100644
--- a/Vagrantfile
+++ b/Vagrantfile
@@ -96,9 +96,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