From 2a96709a238e5083284751b269372246b3cfb8a5 Mon Sep 17 00:00:00 2001 From: daniceexi Date: Mon, 20 Dec 2010 09:16:29 +0000 Subject: [PATCH] defect 3138573: output the following error message when no profile or provmethod was set when running the updatenode -S. Error: No osimage specified for the following nodes: hv32s38p02. You can try to run the nimnodeset command or set the profile|provmethod attributes manually. git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@8474 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/updatenode.pm | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) 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) {