From b8314fb4901ec7dd47d4b9f3e61f466ca04541ae Mon Sep 17 00:00:00 2001 From: Stefan Seifried Date: Mon, 4 Jan 2021 21:47:28 +0100 Subject: [PATCH] fix for waiting indefinitely for an ip when deploying on ovirt 4.4 --- lib/vagrant-ovirt4/action/wait_till_up.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/vagrant-ovirt4/action/wait_till_up.rb b/lib/vagrant-ovirt4/action/wait_till_up.rb index 45891d9..8305b36 100644 --- a/lib/vagrant-ovirt4/action/wait_till_up.rb +++ b/lib/vagrant-ovirt4/action/wait_till_up.rb @@ -57,7 +57,7 @@ def call(env) nics_service = server.nics_service nics = nics_service.list - ip_addr = nics.collect { |nic_attachment| env[:connection].follow_link(nic_attachment).reported_devices.collect { |dev| dev.ips.collect { |ip| ip.address if ip.version == 'v4' } unless dev.ips.nil? } }.flatten.reject { |ip| ip.nil? }.first rescue nil + ip_addr = nics.collect { |nic_attachment| env[:connection].follow_link(nic_attachment.reported_devices).collect { |dev| dev.ips.collect { |ip| ip.address if ip.version == 'v4' } unless dev.ips.nil? } }.flatten.reject { |ip| ip.nil? }.first rescue nil unless ip_addr.nil? env[:ui].info("Got IP: #{ip_addr}") # Check if SSH-Server is up