defect 4047

This commit is contained in:
lissav 2014-04-07 10:54:06 -04:00
parent 066be36003
commit 8a7857f57f

View File

@ -154,6 +154,13 @@ sub preprocess_request
# - either the NIMprime attr of the site table or the management node
my $nimprime = xCAT::InstUtils->getnimprime();
chomp $nimprime;
if (!defined($nimprime))
{
my $rsp={};
$rsp->{error}->[0] = "Could not determine nimprime. Check if nimprime defined in site table or site table master is not resolvable to the MN name.";
xCAT::MsgUtils->message("E", $rsp, $cb,1);
return undef;
}
my $nimprimeip = xCAT::NetworkUtils->getipaddr($nimprime);
if ($nimprimeip =~ /:/) #IPv6
{
@ -4233,7 +4240,7 @@ sub mk_spot
if ($::RUNCMD_RC != 0)
{
my $rsp;
push @{$rsp->{data}}, " The cpcosi command failed. \n$output\n";
push @{$rsp->{data}}, " The cpcosi command failed. \n$output\n";
push @{$rsp->{data}},
"Could not create a NIM definition for \'$spot_name\'.\n";
xCAT::MsgUtils->message("E", $rsp, $callback);