From 5de62313a99750302284ee86795c4237dfe3d7f6 Mon Sep 17 00:00:00 2001 From: qyin Date: Wed, 21 May 2014 14:39:26 +0800 Subject: [PATCH] fix the nodeset - noupdate initrd issue --- xCAT-server/lib/xcat/plugins/destiny.pm | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/xCAT-server/lib/xcat/plugins/destiny.pm b/xCAT-server/lib/xcat/plugins/destiny.pm index ca1872b37..106adc822 100755 --- a/xCAT-server/lib/xcat/plugins/destiny.pm +++ b/xCAT-server/lib/xcat/plugins/destiny.pm @@ -568,6 +568,7 @@ sub nextdestiny { } my $node; + my $noupdate_flag = 0; $chaintab = xCAT::Table->new('chain'); my $chainents = $chaintab->getNodesAttribs(\@nodes,[qw(currstate currchain chain)]); foreach $node (@nodes) { @@ -599,14 +600,24 @@ sub nextdestiny { { my @items = split /[:]/,$ref->{currstate}; $requ{arg}= \@items; + $noupdate_flag = 1; } setdestiny(\%requ, $flag+1); } if ($callnodeset) { + my $args; + if($noupdate_flag) + { + $args = ['enact']; + } + else + { + $args = ['enact', '--noupdateinitrd']; + } $subreq->({command=>['nodeset'], node=> \@nodes, - arg=>['enact', '--noupdateinitrd']}); + arg=>$args}); } }