From 6892d8858277aa493b5b00766cc9b504ebd70451 Mon Sep 17 00:00:00 2001 From: cxhong Date: Mon, 16 Oct 2017 23:02:41 -0400 Subject: [PATCH] xcatprob switch_macmap command does not support IB switches (#4109) --- perl-xCAT/xCAT/MacMap.pm | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/perl-xCAT/xCAT/MacMap.pm b/perl-xCAT/xCAT/MacMap.pm index 31879965b..e5cd444c6 100644 --- a/perl-xCAT/xCAT/MacMap.pm +++ b/perl-xCAT/xCAT/MacMap.pm @@ -810,6 +810,18 @@ sub refresh_switch { return; } + #check if it is Mellanox IB switch + foreach (keys %{$namemap}) { + my $ifname = $namemap->{$_}; + if ($self->{collect_mac_info}) { + if ( ($ifname =~ /IB/) || ($ifname =~ /ib/) ) { + $self->{macinfo}->{$switch}->{ErrorStr} = "This command does not support Mellanox IB Switch"; + return; + } + } + last; + } + # get mtu my $iftomtumap = walkoid($session, '.1.3.6.1.2.1.2.2.1.4', silentfail => 1, verbose => $self->{show_verbose_info}, switch => $switch, callback => $self->{callback}); unless (defined($iftomtumap)) {