From c2e30cadf2ccabd5d1a6180d5da1add60a0d0702 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Thu, 7 Nov 2013 09:59:07 -0500 Subject: [PATCH 1/2] Fix problem where reventlog would fail against a management module --- xCAT-server/lib/xcat/plugins/blade.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xCAT-server/lib/xcat/plugins/blade.pm b/xCAT-server/lib/xcat/plugins/blade.pm index 4d4d8dc65..0a6e91568 100644 --- a/xCAT-server/lib/xcat/plugins/blade.pm +++ b/xCAT-server/lib/xcat/plugins/blade.pm @@ -450,7 +450,7 @@ sub eventlog { #Tried various optimizations, but MM seems not to do bulk-request } else { foreach (@moreslots) { #$matchstring=sprintf("BLADE_%02d",$_); - $matchstring=sprintf("(NODE_%02d|BLADE_%02d",$_,$_); + $matchstring=sprintf("(NODE_%02d|BLADE_%02d)",$_,$_); if ($source =~ m/$matchstring$/i) { #MM guys changed their minds on capitalization if (defined($order)) { $numentries++; From b91db176cdb8800d6a0583b091b397fc7b715a6c Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Thu, 7 Nov 2013 10:31:15 -0500 Subject: [PATCH 2/2] Add option to xcoll for individual output (-i) --- xCAT-client/bin/xcoll | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/xCAT-client/bin/xcoll b/xCAT-client/bin/xcoll index ef5a47a90..4169edd06 100755 --- a/xCAT-client/bin/xcoll +++ b/xCAT-client/bin/xcoll @@ -10,8 +10,10 @@ my %output; my $option; my $printcount; +my $individual; GetOptions("n"=>\$option, + "i"=>\$individual, "c"=>\$printcount); while () { @@ -27,8 +29,10 @@ while () { $output{$node}.=$output; } my %collated; -foreach (keys %output) { - $collated{$output{$_}}->{$_}=1; +unless ($individual) { + foreach (keys %output) { + $collated{$output{$_}}->{$_}=1; + } } my $nodes; @@ -38,6 +42,16 @@ sub fillerup { $nodes = $response->{data}->[0]; } } +if ($individual) { + foreach my $node (keys %output) { + print "====================================\n"; + print "$node\n"; + print "====================================\n"; + print $output{$node}; + print "\n"; + } + exit(0); +} foreach my $output (keys %collated) { $nodes = join(',',sort (keys %{$collated{$output}})); my $cmdref = {