diff --git a/xCAT-server/lib/xcat/plugins/rollupdate.pm b/xCAT-server/lib/xcat/plugins/rollupdate.pm index 4bde5add8..926e84f05 100644 --- a/xCAT-server/lib/xcat/plugins/rollupdate.pm +++ b/xCAT-server/lib/xcat/plugins/rollupdate.pm @@ -457,9 +457,14 @@ sub rollupdate { # Build updategroup nodelists # my %updategroup; + + # Check for updateall and required stanzas + $::updateall=0; + $::updateall_nodecount=1; if ( defined($::FILEATTRS{updateall}[0]) && ( ($::FILEATTRS{updateall}[0] eq 'yes') || ($::FILEATTRS{updateall}[0] eq 'y' ) ) ) { + $::updateall=1; if ( defined($::FILEATTRS{updateall_nodes}[0])){ my $ugname = "UPDATEALL".time(); my $ugval = $::FILEATTRS{updateall_nodes}[0]; @@ -471,7 +476,17 @@ sub rollupdate { xCAT::MsgUtils->message( "E", $rsp, $::CALLBACK ); return 1; } + if ( defined($::FILEATTRS{updateall_nodecount}[0]) ) { + $::updateall_nodecount=$::FILEATTRS{updateall_nodecount}[0]; + } else { + my $rsp; + push @{ $rsp->{data} }, +"Error processing stanza input: updateall=yes but no updateall_nodecount specified. "; + xCAT::MsgUtils->message( "E", $rsp, $::CALLBACK ); + return 1; + } } else { + # Standard update (NOT updateall) foreach my $ugline ( @{ $::FILEATTRS{'updategroup'} } ) { my ( $ugname, $ugval ) = split( /\(/, $ugline ); $ugval =~ s/\)$//; # remove trailing ')' @@ -590,17 +605,6 @@ sub ll_jobs { close (RULOG); } - $::updateall=0; - $::updateall_nodecount=1; - if ( defined($::FILEATTRS{updateall}[0]) && - ( ($::FILEATTRS{updateall}[0] eq 'yes') || - ($::FILEATTRS{updateall}[0] eq 'y' ) ) ) { - $::updateall=1; - if ( defined($::FILEATTRS{updateall_nodecount}[0]) ) { - $::updateall_nodecount=$::FILEATTRS{updateall_nodecount}[0]; - } - } - # Create LL floating resources for mutual exclusion support # and max_updates