From 50ce8489300b191078aebc7281896398d3457917 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Mon, 19 Oct 2015 14:56:30 -0400 Subject: [PATCH] Handle ',,' in nodelist If ',,' is in nodelist, then confluent is told to deal with empty groups. Filter that phenomenon out. --- xCAT-server/lib/xcat/plugins/confluent.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/confluent.pm b/xCAT-server/lib/xcat/plugins/confluent.pm index 07349fbfd..2f2725af2 100644 --- a/xCAT-server/lib/xcat/plugins/confluent.pm +++ b/xCAT-server/lib/xcat/plugins/confluent.pm @@ -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();