defect 3660: display the correct message when run nodediscoverdef command defines a request a node which has not correct IP.

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@16855 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
daniceexi 2013-07-01 09:11:24 +00:00
parent 17d195449a
commit 171c5a189f
2 changed files with 12 additions and 2 deletions

View File

@ -324,6 +324,12 @@ sub process_request {
}
}
}
# make sure the node has the correct ip configured
unless ($clientip) {
$callback->({error=> ["The node [$node] should have a correct IP address which belongs to the management network."], errorcode=>["1"]});
return;
}
my $restartstring = "restart";
if (scalar @forcenics > 0) {

View File

@ -1060,8 +1060,12 @@ Usage:
$request->{node} = [$node];
$request->{discoverymethod} = ['manual'];
$request->{updateswitch} = ['yes'];
$subreq->($request);
xCAT::MsgUtils->message("I", {data=>["Defined [$uuid] to node $node."]}, $callback);
my $rsp = $subreq->($request);
if (defined ($rsp->{errorcode}->[0])) {
xCAT::MsgUtils->message("E", $rsp, $callback);
} else {
xCAT::MsgUtils->message("I", {data=>["Defined [$uuid] to node $node."]}, $callback);
}
} else {
$usage->($callback);
return;