From 7c531590dc07948eaf83f40bf8061b7e57722779 Mon Sep 17 00:00:00 2001 From: wanghuaz Date: Mon, 17 Oct 2011 15:57:44 +0000 Subject: [PATCH] Fixed one problem in nimnodeset that if SN doesnt have nim master setup, nimnodeset cannot read all the NIM resouce types and this leads to several unpected errors. Putting the NIM resource reading code right after nim_master_setup. git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@10799 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/aixinstall.pm | 28 +++++++++++----------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/aixinstall.pm b/xCAT-server/lib/xcat/plugins/aixinstall.pm index fbba569c4..6d27536d8 100644 --- a/xCAT-server/lib/xcat/plugins/aixinstall.pm +++ b/xCAT-server/lib/xcat/plugins/aixinstall.pm @@ -678,20 +678,6 @@ sub nimnodeset # don't fail - maybe just don't have any defined! - # - # Get a list of all nim resource types - # - $cmd = - qq~/usr/sbin/lsnim -P -c resources | /usr/bin/cut -f1 -d' ' 2>/dev/null~; - @nimrestypes = xCAT::Utils->runcmd("$cmd", -1); - if ($::RUNCMD_RC != 0) - { - my $rsp; - push @{$rsp->{data}}, "$Sname: Could not get NIM resource types."; - xCAT::MsgUtils->message("E", $rsp, $callback); - return 1; - } - # # get all the image names needed and make sure they are defined on the # local server @@ -768,6 +754,20 @@ sub nimnodeset } my %resolv_conf_hash = %{$RChash}; + # + # Get a list of all nim resource types + # + $cmd = + qq~/usr/sbin/lsnim -P -c resources | /usr/bin/cut -f1 -d' ' 2>/dev/null~; + @nimrestypes = xCAT::Utils->runcmd("$cmd", -1); + if ($::RUNCMD_RC != 0) + { + my $rsp; + push @{$rsp->{data}}, "$Sname: Could not get NIM resource types."; + xCAT::MsgUtils->message("E", $rsp, $callback); + return 1; + } + $error = 0; foreach my $node (@nodelist) {