diff --git a/perl-xCAT-2.0/xCAT/Postage.pm b/perl-xCAT-2.0/xCAT/Postage.pm index a3575b9f6..d908d0fcc 100644 --- a/perl-xCAT-2.0/xCAT/Postage.pm +++ b/perl-xCAT-2.0/xCAT/Postage.pm @@ -36,6 +36,10 @@ sub writescript { if ($et and $et->{value}) { $master = $et->{value}; } + $et = $noderestab->getNodeAttribs($node,['servicenode']); + if ($et and $et->{'servicenode'}) { + $master = $et->{'servicenode'}; + } $et = $noderestab->getNodeAttribs($node,['xcatmaster']); if ($et and $et->{'xcatmaster'}) { $master = $et->{'xcatmaster'}; diff --git a/perl-xCAT-2.0/xCAT/Template.pm b/perl-xCAT-2.0/xCAT/Template.pm index 759b39c86..8d8ce1da0 100755 --- a/perl-xCAT-2.0/xCAT/Template.pm +++ b/perl-xCAT-2.0/xCAT/Template.pm @@ -45,6 +45,10 @@ sub subvars { if ($et and $et->{value}) { $master = $et->{value}; } + $et = $noderestab->getNodeAttribs($node,['servicenode']); + if ($et and $et->{'servicenode'}) { + $master = $et->{'servicenode'}; + } $et = $noderestab->getNodeAttribs($node,['xcatmaster']); if ($et and $et->{'xcatmaster'}) { $master = $et->{'xcatmaster'}; diff --git a/xCAT-server-2.0/sbin/xcatd b/xCAT-server-2.0/sbin/xcatd index 88a8a7386..6cc21c518 100755 --- a/xCAT-server-2.0/sbin/xcatd +++ b/xCAT-server-2.0/sbin/xcatd @@ -158,11 +158,12 @@ if (xCAT::Utils->isLinux()) { arg => [ 'next' ], ); close($conn); - my $pid=xCAT::Utils->xfork(); - unless ($pid) { #fork off the nodeset and potential slowness + #node should be blocked, race condition may occur otherwise + #my $pid=xCAT::Utils->xfork(); + #unless ($pid) { #fork off the nodeset and potential slowness plugin_command(\%request,undef,\&convey_response); - exit(0); - } + # exit(0); + #} } elsif ($text =~ /^unlocktftpdir/) { #TODO: only nodes in install state should be allowed close($conn); mkpath("$tftpdir/xcat/$node"); @@ -579,6 +580,9 @@ my $dispatch_cb; my $dispatch_parentfd; sub dispatch_callback { my $rspo = shift; + unless ($rspo) { + return; + } my $rsp = {%$rspo}; # deep copy delete $rsp->{serverdone}; unless (%$rsp) { return; }