fix bug 4251:nodeset return xnba plugin bug, pid 657 when node mac is not defined

This commit is contained in:
zhaoertao 2014-08-19 00:25:42 -07:00
parent 798623d742
commit 26f2948643

View File

@ -671,9 +671,9 @@ sub kickstartnetwork {
my $line = "network --onboot=yes --bootproto=";
my $hoststab;
my $mactab = xCAT::Table->new('mac',-create=>0);
unless ($mactab) { die "mac table should always exist prior to template processing when doing autoula"; }
unless ($mactab) { $tmplerr ="mac table should always exist prior to template processing when doing autoula"; return;}
my $ent = $mactab->getNodeAttribs($node,['mac'],prefetchcache=>1);
unless ($ent and $ent->{mac}) { die "missing mac data for $node"; }
unless ($ent and $ent->{mac}) { $tmplerr ="missing mac data for $node"; return;}
my $suffix = $ent->{mac};
$suffix = lc($suffix);
if ($::XCATSITEVALS{managedaddressmode} eq "autoula") {