From 24c9ddd1bee66cc8bc0b4a7223a6e94c009b60e2 Mon Sep 17 00:00:00 2001 From: nott Date: Tue, 14 Aug 2012 15:32:31 +0000 Subject: [PATCH] fix error msgs git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@13508 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/aixinstall.pm | 82 ++++++++++++++-------- 1 file changed, 53 insertions(+), 29 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/aixinstall.pm b/xCAT-server/lib/xcat/plugins/aixinstall.pm index 96cb9c906..8434bd397 100644 --- a/xCAT-server/lib/xcat/plugins/aixinstall.pm +++ b/xCAT-server/lib/xcat/plugins/aixinstall.pm @@ -835,21 +835,34 @@ 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 @@ -10013,22 +10026,33 @@ 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; - } + 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 @@ -10144,7 +10168,7 @@ sub mkdsklsnode { my $rsp; push @{$rsp->{data}}, - "$Sname: Missing required information for node \'$node\'.\n"; + "$Sname: Missing paging resource name for osimage \'$image_name\'.\n"; xCAT::MsgUtils->message("E", $rsp, $callback); $error++; push(@nodesfailed, $node);