diff --git a/xCAT-server/lib/perl/xCAT/Template.pm b/xCAT-server/lib/perl/xCAT/Template.pm index 7613131fc..698e0296e 100644 --- a/xCAT-server/lib/perl/xCAT/Template.pm +++ b/xCAT-server/lib/perl/xCAT/Template.pm @@ -26,6 +26,7 @@ sub subvars { my $self = shift; my $inf = shift; my $outf = shift; + $tmplerr=undef; #clear tmplerr since we are starting fresh $node = shift; my $pkglistfile=shift; diff --git a/xCAT-server/lib/xcat/plugins/destiny.pm b/xCAT-server/lib/xcat/plugins/destiny.pm index 8e207f863..800d32340 100644 --- a/xCAT-server/lib/xcat/plugins/destiny.pm +++ b/xCAT-server/lib/xcat/plugins/destiny.pm @@ -197,7 +197,9 @@ sub setdestiny { $errored=0; $subreq->({command=>["mk$state"], node=>$req->{node}}, \&relay_response); - if ($errored) { return; } + if ($errored) { + $callback->({error=>"Some nodes failed to set up $state resources, aborting"}); + return; } my $ntents = $nodetypetable->getNodesAttribs($req->{node},[qw(os arch profile)]); foreach (@{$req->{node}}) {