2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-07-27 23:01:12 +00:00

fix issue:rinstall plugin bug when setup SN on sles12.2 ppc64le #3466;fix issue [FVT] rinstall will hung when it failed to terminate sub process with SIGKILL #3094 (#3507)

This commit is contained in:
yangsong
2017-07-19 04:41:06 -05:00
committed by Bin Xu
parent 8e6fdfde3d
commit 970be4a7dd

View File

@@ -3153,7 +3153,12 @@ sub power {
$allnodestatus{$node} = $::STATUS_POWERING_ON;
}
} elsif (not $dom->is_active()) {
$dom->create();
eval{
$dom->create();
};
if($@){
return (1, "Error: $@");
}
$allnodestatus{$node} = $::STATUS_POWERING_ON;
} else {
$retstring .= "$status_noop";
@@ -3163,7 +3168,12 @@ sub power {
my $newxml = $dom->get_xml_description();
$updatetable->{kvm_nodedata}->{$node}->{xml} = $newxml;
if ($dom->is_active()) {
$dom->destroy();
eval{
$dom->destroy();
};
if($@){
return (1, "Error: $@");
}
$allnodestatus{$node} = $::STATUS_POWERING_OFF;
}
undef $dom;
@@ -3185,7 +3195,10 @@ sub power {
if ($newxml) { #need to destroy and repower..
$updatetable->{kvm_nodedata}->{$node}->{xml} = $newxml;
my $persist = $dom->is_persistent();
$dom->destroy();
eval {$dom->destroy();};
if($@){
return (1, "Error: $@");
}
$allnodestatus{$node} = $::STATUS_POWERING_OFF;
if ($persist) { $dom->undefine(); }
undef $dom;
@@ -4176,7 +4189,9 @@ sub dohyp {
$desc =~ s/^\s+//;
$desc =~ s/\s+$//;
if ($desc) {
$output{node}->[0]->{data}->[0]->{desc}->[0] = $desc;
if($rc == 0){
$output{node}->[0]->{data}->[0]->{desc}->[0] = $desc;
}
}
}
$text =~ s/^\s+//;
@@ -4186,7 +4201,7 @@ sub dohyp {
if ($rc == 0) {
$output{node}->[0]->{data}->[0]->{contents}->[0] = $text;
} else {
$output{node}->[0]->{error} = $text;
$output{node}->[0]->{error}->[0] = $text;
}
if ($command eq 'rpower') {