diff --git a/xCAT-server-2.0/lib/xcat/plugins/nodediscover.pm b/xCAT-server-2.0/lib/xcat/plugins/nodediscover.pm index a277388e3..14d3dd49b 100644 --- a/xCAT-server-2.0/lib/xcat/plugins/nodediscover.pm +++ b/xCAT-server-2.0/lib/xcat/plugins/nodediscover.pm @@ -142,10 +142,13 @@ sub process_request { my $netn = inet_ntoa(pack("N",$ipn & $mask)); my $hosttag = gethosttag($node,$netn,@ifinfo[1],\%usednames); if ($hosttag) { - (my $rent) = $nrtab->getNodeAttribs($node,'primarynic'); + (my $rent) = $nrtab->getNodeAttribs($node,'primarynic','nfsserver'); unless ($rent and $rent->{primarynic}) { #if primarynic not set, set it to this nic $nrtab->setNodeAttribs($node,{primarynic=>@ifinfo[1]}); } + unless ($rent and $rent->{primarynic}) { + $nrtab->setNodeAttribs($node,{nfsserver=>xCAT::Utils->my_ip_facing($hosttag)}); + } $usednames{$hosttag}=1; $macstring .= $ifinfo[2]."!".$hosttag."|"; } else {