|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [OSSTEST PATCH 17/26] await_tcp(): Run check_ip on each loop iteration
From: Robert Ho <robert.hu@xxxxxxxxx>
await_tcp is often invoked after a reboot.
In this situation the target's IP address may change. If this happens
while await_tcp is running, we would continue to poll the old IP address.
Fix this by running target_check_ip on each iteration.
Signed-off-by: Robert Ho <robert.hu@xxxxxxxxx>
Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
v14: Dropped change to selecthost, which was in code which is no
longer present in this version of the series.
Rewritten to use target_check_ip.
Dropped IMO-unnecessary comment.
---
Osstest/TestSupport.pm | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm
index 95b6fda..ad017a4 100644
--- a/Osstest/TestSupport.pm
+++ b/Osstest/TestSupport.pm
@@ -2010,9 +2010,10 @@ sub await_tcp ($$$) {
my ($maxwait,$interval,$ho) = @_;
target_adjust_timeout($ho,\$maxwait);
poll_loop($maxwait,$interval,
- "await tcp $ho->{Name} $ho->{TcpCheckPort}",
+ "await tcp $ho->{Name} $ho->{Ip} $ho->{TcpCheckPort}",
sub {
- return target_tcp_check($ho,$interval);
+ return target_check_ip($ho) //
+ target_tcp_check($ho,$interval);
});
}
--
1.7.10.4
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |