fix bug 4014: updatenodegroups routine always add all group to the node
This commit is contained in:
		@@ -1999,7 +1999,7 @@ sub updatenodegroups {
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    my ($ent) = $tabhd->getNodeAttribs($node, ['groups']);
 | 
			
		||||
    my @list = qw(all);
 | 
			
		||||
    my @list = ();
 | 
			
		||||
    if (defined($ent) and $ent->{groups}) {
 | 
			
		||||
        push @list, split(/,/,$ent->{groups});
 | 
			
		||||
    }   
 | 
			
		||||
 
 | 
			
		||||
@@ -4423,7 +4423,7 @@ sub process_request {
 | 
			
		||||
    if ($request->{mtm} and $request->{mtm} =~ /^(\w{4})/) {
 | 
			
		||||
        my $group = xCAT::data::ibmhwtypes::parse_group($request->{mtm});
 | 
			
		||||
        if (defined($group)) {
 | 
			
		||||
            xCAT::TableUtils->updatenodegroups($node, $group); 
 | 
			
		||||
            xCAT::TableUtils->updatenodegroups($node, $group.",all"); 
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    if ($mac) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user