support returning nodestatus
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@14044 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
13e17590b2
commit
fbba9e8a1f
@ -236,7 +236,7 @@ sub execute_dcp
|
||||
push @targets_finished, $user_target;
|
||||
}
|
||||
|
||||
# return list of bad nodes and good ones
|
||||
# return list of badnodes and goodnodes
|
||||
if ($$options{'monitor'}) {
|
||||
foreach my $badnode (@targets_failed) {
|
||||
my $rsp={};
|
||||
@ -251,6 +251,22 @@ sub execute_dcp
|
||||
xCAT::MsgUtils->message("I", $rsp, $::CALLBACK);
|
||||
}
|
||||
}
|
||||
# return node status, note must be using runxcmd to
|
||||
# process this field
|
||||
if ($$options{'nodestatus'}) {
|
||||
foreach my $badnode (@targets_failed) {
|
||||
my $rsp={};
|
||||
$rsp->{data}->[0] =
|
||||
"$badnode: Remote_command_failed";
|
||||
xCAT::MsgUtils->message("I", $rsp, $::CALLBACK);
|
||||
}
|
||||
foreach my $goodnode (@targets_finished) {
|
||||
my $rsp={};
|
||||
$rsp->{data}->[0] =
|
||||
"$goodnode: Remote_command_successful";
|
||||
xCAT::MsgUtils->message("I", $rsp, $::CALLBACK);
|
||||
}
|
||||
}
|
||||
delete $targets_buffered{$user_target};
|
||||
}
|
||||
|
||||
@ -3674,6 +3690,7 @@ sub parse_and_run_dsh
|
||||
'V|version' => \$options{'version'},
|
||||
|
||||
'devicetype|devicetype=s' => \$options{'devicetype'},
|
||||
'nodestatus|nodestatus' => \$options{'nodestatus'},
|
||||
'command-name|commandName=s' => \$options{'command-name'},
|
||||
'command-description|commandDescription=s' =>
|
||||
\$options{'command-description'},
|
||||
@ -4109,6 +4126,7 @@ sub parse_and_run_dcp
|
||||
'T|trace' => \$options{'trace'},
|
||||
'V|version' => \$options{'version'},
|
||||
'devicetype=s' => \$options{'devicetype'},
|
||||
'nodestatus|nodestatus' => \$options{'nodestatus'},
|
||||
'X:s' => \$options{'ignore_env'}
|
||||
)
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user