-Fix esx problem where network_prereqs would not successfully acquire data about

newly created host bridges, it may take 1 to 2 seconds


git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@6986 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
jbjohnso 2010-08-05 14:49:21 +00:00
parent 4279cdb5de
commit 3cb5d4e4aa

View File

@ -2404,15 +2404,17 @@ sub validate_network_prereqs {
}
$netsys->AddPortGroup(portgrp=>$hostgroupdef);
#$hyphash{$hyp}->{nets}->{$netname}=1;
$hostview->update_view_data(); #pull in changes induced by previous activity
if (defined $hostview->{network}) { #We load the new object references
foreach (@{$hostview->network}) {
my $nvw = $hypconn->get_view(mo_ref=>$_);
if (defined $nvw->name) {
$hyphash{$hyp}->{nets}->{$nvw->name}=$_;
while ((not defined $hyphash{$hyp}->{nets}->{$pgname}) and sleep 1) { #we will only sleep if we know something will be waiting for
$hostview->update_view_data(); #pull in changes induced by previous activity
if (defined $hostview->{network}) { #We load the new object references
foreach (@{$hostview->network}) {
my $nvw = $hypconn->get_view(mo_ref=>$_);
if (defined $nvw->name) {
$hyphash{$hyp}->{nets}->{$nvw->name}=$_;
}
}
}
}
} #end while loop
}
}
}