fix error msgs
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@13507 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
632e27647c
commit
a5b5cc1c8b
@ -829,22 +829,35 @@ sub nimnodeset
|
||||
push(@nodesfailed, $node);
|
||||
next;
|
||||
}
|
||||
# could be diskful
|
||||
# mask, gateway, cosi, root, dump, paging
|
||||
# TODO - need to fix this check for shared_root
|
||||
if ( !$nethash{$node}{'mask'}
|
||||
|| !$nethash{$node}{'gateway'}
|
||||
|| !$imagehash{$image_name}{spot})
|
||||
{
|
||||
my $rsp;
|
||||
push @{$rsp->{data}},
|
||||
"$Sname: Missing required information for node \'$node\'.\n";
|
||||
|
||||
my $foundneterror;
|
||||
if (!$nethash{$node}{'mask'} )
|
||||
{
|
||||
my $rsp;
|
||||
push @{$rsp->{data}},"$Sname: Missing network mask for node \'$node\'.\n";
|
||||
xCAT::MsgUtils->message("E", $rsp, $callback);
|
||||
$foundneterror++;
|
||||
}
|
||||
if (!$nethash{$node}{'gateway'})
|
||||
{
|
||||
my $rsp;
|
||||
push @{$rsp->{data}},"$Sname: Missing network gateway for node \'$node\'.\n";
|
||||
xCAT::MsgUtils->message("E", $rsp, $callback);
|
||||
$error++;
|
||||
$foundneterror++;
|
||||
}
|
||||
if (!$imagehash{$image_name}{spot})
|
||||
{
|
||||
my $rsp;
|
||||
push @{$rsp->{data}},"$Sname: Missing spot name for osimage \n'$image_name\'.\n";
|
||||
xCAT::MsgUtils->message("E", $rsp, $callback);
|
||||
$foundneterror++;
|
||||
}
|
||||
if ($foundneterror) {
|
||||
$error++;
|
||||
push(@nodesfailed, $node);
|
||||
next;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
# set some default values
|
||||
# overwrite with cmd line values - if any
|
||||
my $speed = "100";
|
||||
@ -9984,22 +9997,34 @@ sub mkdsklsnode
|
||||
# check for required attrs
|
||||
if (($type ne "standalone"))
|
||||
{
|
||||
|
||||
# could be diskless or dataless
|
||||
# mask, gateway, cosi, root, dump, paging
|
||||
# TODO - need to fix this check for shared_root
|
||||
if ( !$nethash{$node}{'mask'}
|
||||
|| !$nethash{$node}{'gateway'}
|
||||
|| !$imagehash{$image_name}{spot})
|
||||
{
|
||||
my $rsp;
|
||||
push @{$rsp->{data}},
|
||||
"$Sname: Missing required information for node \'$node\'.\n";
|
||||
xCAT::MsgUtils->message("E", $rsp, $callback);
|
||||
$error++;
|
||||
push(@nodesfailed, $node);
|
||||
next;
|
||||
}
|
||||
# check for missing info
|
||||
my $foundneterror;
|
||||
if (!$nethash{$node}{'mask'} )
|
||||
{
|
||||
my $rsp;
|
||||
push @{$rsp->{data}},"$Sname: Missing network mask for node \'$node\'.\n";
|
||||
xCAT::MsgUtils->message("E", $rsp, $callback);
|
||||
$foundneterror++;
|
||||
}
|
||||
if (!$nethash{$node}{'gateway'})
|
||||
{
|
||||
my $rsp;
|
||||
push @{$rsp->{data}},"$Sname: Missing network gateway for node \'$node\'.\n";
|
||||
xCAT::MsgUtils->message("E", $rsp, $callback);
|
||||
$foundneterror++;
|
||||
}
|
||||
if (!$imagehash{$image_name}{spot})
|
||||
{
|
||||
my $rsp;
|
||||
push @{$rsp->{data}},"$Sname: Missing spot name for osimage \n'$image_name\'.\n";
|
||||
xCAT::MsgUtils->message("E", $rsp, $callback);
|
||||
$foundneterror++;
|
||||
}
|
||||
if ($foundneterror) {
|
||||
$error++;
|
||||
push(@nodesfailed, $node);
|
||||
next;
|
||||
}
|
||||
}
|
||||
|
||||
# set some default values
|
||||
@ -10114,8 +10139,7 @@ sub mkdsklsnode
|
||||
if (!$imagehash{$image_name}{paging})
|
||||
{
|
||||
my $rsp;
|
||||
push @{$rsp->{data}},
|
||||
"$Sname: Missing required information for node \'$node\'.\n";
|
||||
push @{$rsp->{data}}, "$Sname: Missing paging resource name for osimage \'$image_name\'.\n";
|
||||
xCAT::MsgUtils->message("E", $rsp, $callback);
|
||||
$error++;
|
||||
push(@nodesfailed, $node);
|
||||
|
Loading…
Reference in New Issue
Block a user