From ead4611db402158e318656f44d6010dc581df0ce Mon Sep 17 00:00:00 2001 From: mellor Date: Mon, 27 Sep 2010 21:23:41 +0000 Subject: [PATCH] changes to accommadate new reservation_resources support from LL git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@7683 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/rollupdate.pm | 13 ++++++++++--- xCAT-server/share/xcat/rollupdate/ll.tmpl | 2 +- xCAT-server/share/xcat/rollupdate/llall.tmpl | 2 +- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/rollupdate.pm b/xCAT-server/lib/xcat/plugins/rollupdate.pm index 427d95849..3645e2837 100644 --- a/xCAT-server/lib/xcat/plugins/rollupdate.pm +++ b/xCAT-server/lib/xcat/plugins/rollupdate.pm @@ -764,6 +764,14 @@ sub ll_jobs { next ugloop; } } + if ( ($machinecount == 0) && ($::updateall) ) { + my $rsp; + push @{ $rsp->{data} }, +"\"updateall=yes\" and \"update_if_down=no\", but there are no nodes specifed in the updateall noderange that are currently active in LoadLeveler. Update for updategroup $ugname is canceled."; + xCAT::MsgUtils->message( "E", $rsp, $::CALLBACK ); + ++$rc; + next ugloop; + } if ( defined($nodelist) ) { $nodelist =~ s/^\,//; } # Build updategroup data file @@ -813,12 +821,11 @@ sub ll_jobs { close($UGDFFILE); chown( $uid, $gid, $ugdf_file ); - if ( defined($machinelist) || $::updateall ) { + if ($machinecount > 0) { my $llhl_file; if ( !$::updateall ) { - $machinelist =~ s/^\s+//; - # Build LL hostlist file + $machinelist =~ s/^\s+//; my $hllines = $machinelist; $hllines =~ s/"//g; $hllines =~ s/\s+/\n/g; diff --git a/xCAT-server/share/xcat/rollupdate/ll.tmpl b/xCAT-server/share/xcat/rollupdate/ll.tmpl index 94667fa5c..fd9be981a 100644 --- a/xCAT-server/share/xcat/rollupdate/ll.tmpl +++ b/xCAT-server/share/xcat/rollupdate/ll.tmpl @@ -19,6 +19,6 @@ # @ error = [[JOBDIR]]/rollupdate_[[NODESET]].$(Host).$(Cluster).$(Process).err # @ output = [[JOBDIR]]/rollupdate_[[NODESET]].$(Host).$(Cluster).$(Process).out # @ host_file = [[LLHOSTFILE]] -# @ resources = [[MUTEXRESOURCES]] +# @ reservation_resources = [[MUTEXRESOURCES]] # @ queue diff --git a/xCAT-server/share/xcat/rollupdate/llall.tmpl b/xCAT-server/share/xcat/rollupdate/llall.tmpl index a3a4b3e96..2ad757bfb 100644 --- a/xCAT-server/share/xcat/rollupdate/llall.tmpl +++ b/xCAT-server/share/xcat/rollupdate/llall.tmpl @@ -21,6 +21,6 @@ # @ output = [[JOBDIR]]/rollupdate_[[NODESET]].$(Host).$(Cluster).$(Process).out # @ node = [[LLCOUNT]] # @ requirements = (Feature == "[[UPDATEALLFEATURE]]") -# @ resources = [[MUTEXRESOURCES]] +# @ reservation_resources = [[MUTEXRESOURCES]] # @ queue