diff --git a/xCAT-server/lib/xcat/plugins/updatenode.pm b/xCAT-server/lib/xcat/plugins/updatenode.pm index 564b0a265..2b26bbd9a 100644 --- a/xCAT-server/lib/xcat/plugins/updatenode.pm +++ b/xCAT-server/lib/xcat/plugins/updatenode.pm @@ -1369,6 +1369,7 @@ sub doAIXcopy my $images = $nodetab->getNodesAttribs(\@nodelist, ['node', 'provmethod', 'profile']); my @imagenames; + my @noimage; foreach my $node (@nodelist) { my $imgname; @@ -1380,7 +1381,10 @@ sub doAIXcopy { $imgname = $images->{$node}->[0]->{profile}; } - if (!grep(/^$imgname$/, @imagenames)) + + if(!$imgname) { + push @noimage, $node; + } elsif (!grep(/^$imgname$/, @imagenames)) { push @imagenames, $imgname; } @@ -1388,6 +1392,14 @@ sub doAIXcopy } $nodetab->close; + if (@noimage) { + my $rsp; + my $allnodes = join(',', @noimage); + push @{$rsp->{data}}, "No osimage specified for the following nodes: $allnodes. You can try to run the nimnodeset command or set the profile|provmethod attributes manually."; + xCAT::MsgUtils->message("E", $rsp, $callback); + return 1; + } + my $osimageonly = 0; if ((!$attrvals{installp_bundle} && !$attrvals{otherpkgs}) && !$::CMDLINE) {