2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-06-13 09:50:19 +00:00

Handle ',,' in nodelist

If ',,' is in nodelist, then confluent is
told to deal with empty groups.  Filter
that phenomenon out.
This commit is contained in:
Jarrod Johnson
2015-10-19 14:56:30 -04:00
parent 1bb0e692bd
commit 50ce848930

View File

@ -362,7 +362,7 @@ sub donodeent {
}
my @cfgroups;
foreach (keys %$groupdata) {
push @cfgroups, split /,/,$groupdata->{$_}->[0]->{groups};
push @cfgroups, grep {defined && length} split /,/,$groupdata->{$_}->[0]->{groups};
}
$confluent->read('/nodegroups/');
my $currgroup = $confluent->next_result();
@ -419,7 +419,7 @@ foreach my $node (sort keys %$cfgenthash) {
} elsif ($::XCATSITEVALS{'consoleondemand'} and $::XCATSITEVALS{'consoleondemand'} !~ m/^n/) {
$parameters{'console.logging'} = 'none';
}
$parameters{'groups'} = [split /,/,$groupdata->{$node}->[0]->{'groups'}];
$parameters{'groups'} = [grep {defined && length} split /,/,$groupdata->{$node}->[0]->{'groups'}];
if (exists $currnodes{$node}) {
$confluent->update('/nodes/'.$node.'/attributes/current', parameters=>\%parameters);
my $rsp = $confluent->next_result();