diff --git a/xCAT-server/lib/xcat/plugins/aixinstall.pm b/xCAT-server/lib/xcat/plugins/aixinstall.pm index 745545c8c..f02b2e20b 100644 --- a/xCAT-server/lib/xcat/plugins/aixinstall.pm +++ b/xCAT-server/lib/xcat/plugins/aixinstall.pm @@ -639,7 +639,13 @@ sub nimnodeset $subreq->({command=>['runbeginpre'], node=>\@nodelist, arg=>["standalone", '-l']},\&pass_along); - if ($errored) { return; } + if ($errored) { + my $rsp; + $rsp->{errorcode}->[0]=1; + $rsp->{error}->[0]="Failed in running begin prescripts.\n"; + $callback->($rsp); + return 1; + } # @@ -1126,7 +1132,13 @@ sub nimnodeset node=>\@nodelist, arg=>["standalone", '-l']},\&pass_along); } - if ($errored) { $retcode = 1; } + if ($errored) { + my $rsp; + $rsp->{errorcode}->[0]=1; + $rsp->{error}->[0]="Failed in running end prescripts.\n"; + $callback->($rsp); + return 1; + } return $retcode; } @@ -8128,7 +8140,13 @@ sub mkdsklsnode $subreq->({command=>['runbeginpre'], node=>\@nodelist, arg=>["diskless", '-l']},\&pass_along); - if ($errored) { return; } + if ($errored) { + my $rsp; + $rsp->{errorcode}->[0]=1; + $rsp->{error}->[0]="Failed in running begin prescripts.\n"; + $callback->($rsp); + return 1; + } # @@ -9033,7 +9051,13 @@ sub mkdsklsnode node=>\@nodelist, arg=>["diskless", '-l']},\&pass_along); } - if ($errored) { $retcode = 1; } + if ($errored) { + my $rsp; + $rsp->{errorcode}->[0]=1; + $rsp->{error}->[0]="Failed in running end prescripts.\n"; + $callback->($rsp); + return 1; + } return $retcode; @@ -10100,7 +10124,13 @@ sub rmdsklsnode # to handles my own children $errored=0; $subreq->({command=>['runbeginpre'], node=>\@nodelist, arg=>["remove", '-l']},\&pass_along); - if ($errored) { return; } + if ($errored) { + my $rsp; + $rsp->{errorcode}->[0]=1; + $rsp->{error}->[0]="Failed in running begin prescripts.\n"; + $callback->($rsp); + return 1; + } # for each node my @nodesfailed; @@ -10275,7 +10305,13 @@ sub rmdsklsnode node=>\@nodelist, arg=>["remove", '-l']},\&pass_along); } - if ($errored) { $retcode = 1; } + if ($errored) { + my $rsp; + $rsp->{errorcode}->[0]=1; + $rsp->{error}->[0]="Failed in running end prescripts.\n"; + $callback->($rsp); + return 1; + } return $retcode; diff --git a/xCAT-server/lib/xcat/plugins/pxe.pm b/xCAT-server/lib/xcat/plugins/pxe.pm index 01fad97f5..a776b2a51 100644 --- a/xCAT-server/lib/xcat/plugins/pxe.pm +++ b/xCAT-server/lib/xcat/plugins/pxe.pm @@ -412,7 +412,13 @@ sub process_request { node=>\@rnodes, arg=>[$args[0]]},\&pass_along); } - if ($errored) { return; } + if ($errored) { + my $rsp; + $rsp->{errorcode}->[0]=1; + $rsp->{error}->[0]="Failed in running begin prescripts\n"; + $callback->($rsp); + return; + } } #end prescripts code @@ -552,7 +558,13 @@ sub process_request { node=>\@rnodes, arg=>[$args[0]]},\&pass_along); } - if ($errored) { return; } + if ($errored) { + my $rsp; + $rsp->{errorcode}->[0]=1; + $rsp->{error}->[0]="Failed in running end prescripts\n"; + $callback->($rsp); + return; + } } diff --git a/xCAT-server/lib/xcat/plugins/vsmppxe.pm b/xCAT-server/lib/xcat/plugins/vsmppxe.pm index eff512d3a..f23eadb6f 100644 --- a/xCAT-server/lib/xcat/plugins/vsmppxe.pm +++ b/xCAT-server/lib/xcat/plugins/vsmppxe.pm @@ -309,7 +309,13 @@ sub process_request { node=>\@rnodes, arg=>[$args[0]]},\&pass_along); } - if ($errored) { return; } + if ($errored) { + my $rsp; + $rsp->{errorcode}->[0]=1; + $rsp->{error}->[0]="Failed in running begin prescripts\n"; + $callback->($rsp); + return; + } } #end prescripts code @@ -418,7 +424,13 @@ sub process_request { node=>\@rnodes, arg=>[$args[0]]},\&pass_along); } - if ($errored) { return; } + if ($errored) { + my $rsp; + $rsp->{errorcode}->[0]=1; + $rsp->{error}->[0]="Failed in running end prescripts\n"; + $callback->($rsp); + return; + } } } diff --git a/xCAT-server/lib/xcat/plugins/xnba.pm b/xCAT-server/lib/xcat/plugins/xnba.pm index e5e0f0cb1..85338cb98 100644 --- a/xCAT-server/lib/xcat/plugins/xnba.pm +++ b/xCAT-server/lib/xcat/plugins/xnba.pm @@ -453,7 +453,13 @@ sub process_request { node=>\@rnodes, arg=>[$args[0]]},\&pass_along); } - if ($errored) { return; } + if ($errored) { + my $rsp; + $rsp->{errorcode}->[0]=1; + $rsp->{error}->[0]="Failed in running begin prescripts.\n"; + $callback->($rsp); + return; + } } #back to normal business @@ -551,7 +557,13 @@ sub process_request { node=>\@rnodes, arg=>[$args[0]]},\&pass_along); } - if ($errored) { return; } + if ($errored) { + my $rsp; + $rsp->{errorcode}->[0]=1; + $rsp->{error}->[0]="Failed in running end prescripts.\n"; + $callback->($rsp); + return; + } } } diff --git a/xCAT-server/lib/xcat/plugins/yaboot.pm b/xCAT-server/lib/xcat/plugins/yaboot.pm index ed581592f..e4c5579a6 100644 --- a/xCAT-server/lib/xcat/plugins/yaboot.pm +++ b/xCAT-server/lib/xcat/plugins/yaboot.pm @@ -412,7 +412,13 @@ sub process_request { node=>\@rnodes, arg=>[$args[0]]},\&pass_along); } - if ($errored) { return; } + if ($errored) { + my $rsp; + $rsp->{errorcode}->[0]=1; + $rsp->{error}->[0]="Failed in running begin prescripts.\n"; + $callback->($rsp); + return; + } } #back to normal business @@ -501,7 +507,13 @@ sub process_request { node=>\@rnodes, arg=>[$args[0]]},\&pass_along); } - if ($errored) { return; } + if ($errored) { + my $rsp; + $rsp->{errorcode}->[0]=1; + $rsp->{error}->[0]="Failed in running end prescripts\n"; + $callback->($rsp); + return; + } } }