diff --git a/perl-xCAT/xCAT/Utils.pm b/perl-xCAT/xCAT/Utils.pm index 8221d42ac..a906d6b78 100644 --- a/perl-xCAT/xCAT/Utils.pm +++ b/perl-xCAT/xCAT/Utils.pm @@ -2916,6 +2916,7 @@ sub getIPaddress my $parent; my $ppctab = xCAT::Table->new( 'ppc' ); my $vpdtab = xCAT::Table->new( 'vpd' ); + my $mptab = xCAT::Table->new( 'mp'); if ($type eq "bpa" or $type eq "fsp") { my $tmp_p = $ppctab->getNodeAttribs($nodetocheck, ['parent']); if ($tmp_p and $tmp_p->{parent}) { @@ -2923,6 +2924,17 @@ sub getIPaddress } else { return undef; } + if ($mptab) { + my $tmp_p_type = $mptab->getNodeAttribs($parent, ['nodetype']); + if ($tmp_p_type && $tmp_p_type->{nodetype} =~ /^(cmm|mp)$/) { + return getNodeIPaddress($nodetocheck); + } else { + my $p_type = xCAT::DBobjUtils->getnodetype($parent); + if ($p_type && $p_type =~ /^(cmm|mp)$/) { + return getNodeIPaddress($nodetocheck); + } + } + } my $tmp_s = $vpdtab->getNodeAttribs($nodetocheck, ['side']); if ($tmp_s->{side} and ($tmp_s->{side} =~ /(A|B)-\d/i)) { $side = $1; # get side for the fsp, in order to get its brothers