From 0f45f2e517a000c018aaadd1aa26a015399371e3 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Thu, 9 Nov 2017 09:27:53 -0500 Subject: [PATCH] Fix makeconfluentcfg without arguments There were mistakes in the switch table processing attempt for non noderange makeconfluentcfg. --- xCAT-server/lib/xcat/plugins/confluent.pm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/xCAT-server/lib/xcat/plugins/confluent.pm b/xCAT-server/lib/xcat/plugins/confluent.pm index 34923dc1c..c05c51d6e 100644 --- a/xCAT-server/lib/xcat/plugins/confluent.pm +++ b/xCAT-server/lib/xcat/plugins/confluent.pm @@ -276,7 +276,12 @@ sub makeconfluentcfg { @cfgents1 = $hmtab->getAllNodeAttribs([ 'cons', 'serialport', 'mgt', 'conserver', 'termserver', 'termport', 'consoleondemand' ]); @cfgents2 = $nodepostab->getAllNodeAttribs([ 'rack', 'u', 'chassis', 'slot', 'room' ]); @cfgents3 = $nodepostab->getAllNodeAttribs([ 'mpa', 'id' ]); - @cfgents4 = $nodepostab->getAllNodeAttribs([ 'node', 'switch', 'port', 'interface' ]); + @cfgents4 = $switchtab->getAllNodeAttribs([ 'node', 'switch', 'port', 'interface' ]); + my @switchnodes; + foreach my $ent (@cfgents4) { + if ($ent->{node}) { push @switchnodes, $ent->{node} } + } + @cfgents4 = $switchtab->getNodesAttribs(\@switchnodes, [ 'node', 'switch', 'port', 'interface' ]); }