diff --git a/perl-xCAT/xCAT/PPCdb.pm b/perl-xCAT/xCAT/PPCdb.pm index f1edc3d75..3611846ec 100644 --- a/perl-xCAT/xCAT/PPCdb.pm +++ b/perl-xCAT/xCAT/PPCdb.pm @@ -731,6 +731,23 @@ sub credentials { $pass = @{$logon{$hwtype}}[1]; } + ########################################### + # find parent for fsp/bpa, use parent's attributes first + ########################################### + my $ntype = xCAT::DBobjUtils->getnodetype($server); + if ($ntype =~ /^(fsp|bpa)$/) { + my $ptab = xCAT::Table->new('ppc'); + if ($ptab) { + my $parent = $ptab->getNodeAttribs($server, ["parent"]); + if ($parent and $parent->{parent}) { + my $ptype = xCAT::DBobjUtils->getnodetype($parent->{parent}); + if (($ptype =~ /^cec$/ and $ntype =~ /^fsp$/) or ($ptype =~ /^frame$/ and $ntype =~ /^bpa$/)) + { + $server = $parent->{parent}; + } + } + } + } ########################################### # Check passwd tab ###########################################