Backport fix for rmigrate -f error reporting

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@9936 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
jbjohnso
2011-06-24 18:36:49 +00:00
parent 8216370a21
commit 51ec31d4d9
+13 -2
View File
@@ -487,11 +487,14 @@ sub process_request {
if (grep { $_ == -1 } values %hypready) {
foreach (keys %hypready) {
if ($hypready{$_} == -1) {
unless ($hyphash{$_}->{offline}) {
push @badhypes,$_;
}
my @relevant_nodes = sort (keys %{$hyphash{$_}->{nodes}});
foreach (@relevant_nodes) {
if ($command eq "rmigrate" and grep /-f/,@exargs) { $limbonodes{$_}=1; } else {
xCAT::SvrUtils::sendmsg([1,": hypervisor unreachable"], $output_handler,$_);
if ($command eq "rmigrate" and grep /-f/,@exargs) { $limbonodes{$_}=1; }
}
}
delete $hyphash{$_};
}
@@ -3190,14 +3193,22 @@ sub validate_vcenter_prereqs { #Communicate with vCenter and ensure this host is
# $running_tasks{$task}->{data} = { depfun => $depfun, depargs => $depargs, conn=> $hyphash{$hyp}->{vcenter}->{conn}, connspec=>$connspec,hostview=>$hview,hypname=>$hyp,vcenter=>$vcenter };
#ADDHOST
} else {
if ($hyphash{$hyp}->{offline}) {
xCAT::SvrUtils::sendmsg(": Failed to communicate with $hyp, vCenter reports it as in inventory but not connected and xCAT is set to not autojoin", $output_handler);
} else {
xCAT::SvrUtils::sendmsg([1,": Failed to communicate with $hyp, vCenter reports it as in inventory but not connected and xCAT is set to not autojoin"], $output_handler);
}
$hyphash{$hyp}->{conn} = undef;
return "failed";
}
}
}
unless ($vcenterautojoin) {
xCAT::SvrUtils::sendmsg([1,": Failed to communicate with $hyp, vCenter does not have it in inventory and xCAT is set to not autojoin"], $output_handler);
if ($hyphash{$hyp}->{offline}) {
xCAT::SvrUtils::sendmsg(": Failed to communicate with $hyp, vCenter does not have it in inventory and xCAT is set to not autojoin", $output_handler);
} else {
xCAT::SvrUtils::sendmsg([1,": Failed to communicate with $hyp, vCenter does not have it in inventory and xCAT is set to not autojoin"], $output_handler);
}
$hyphash{$hyp}->{conn} = undef;
return "failed";
}