From acaa73631f1c5f707ca123ab537e6f66693e2333 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Wed, 7 May 2008 20:45:48 +0000 Subject: [PATCH] -Fix problem where destiny/pxe/yaboot kept trying to go even when errors have indicated to bail out git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@1326 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server-2.0/lib/xcat/plugins/destiny.pm | 9 +++++++-- xCAT-server-2.0/lib/xcat/plugins/pxe.pm | 7 ++++++- xCAT-server-2.0/lib/xcat/plugins/yaboot.pm | 7 ++++++- 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/xCAT-server-2.0/lib/xcat/plugins/destiny.pm b/xCAT-server-2.0/lib/xcat/plugins/destiny.pm index 2cf65cb9b..6a057ff61 100644 --- a/xCAT-server-2.0/lib/xcat/plugins/destiny.pm +++ b/xCAT-server-2.0/lib/xcat/plugins/destiny.pm @@ -36,8 +36,13 @@ sub process_request { sub relay_response { my $resp = shift; $callback->($resp); - if ($resp and $resp->{errorcode} and $resp->{errorcode}->[0]) { - $errored = 1; + if ($resp and ($resp->{errorcode} and $resp->{errorcode}->[0]) or ($resp->{error} and $resp->{error}->[0])) { + $errored=1; + } + foreach (@{$resp->{node}}) { + if ($_->{error} or $_->{errorcode}) { + $errored=1; + } } } diff --git a/xCAT-server-2.0/lib/xcat/plugins/pxe.pm b/xCAT-server-2.0/lib/xcat/plugins/pxe.pm index c794d90d6..643ef2048 100644 --- a/xCAT-server-2.0/lib/xcat/plugins/pxe.pm +++ b/xCAT-server-2.0/lib/xcat/plugins/pxe.pm @@ -136,9 +136,14 @@ my $errored = 0; sub pass_along { my $resp = shift; $callback->($resp); - if ($resp and $resp->{errorcode} and $resp->{errorcode}->[0]) { + if ($resp and ($resp->{errorcode} and $resp->{errorcode}->[0]) or ($resp->{error} and $resp->{error}->[0])) { $errored=1; } + foreach (@{$resp->{node}}) { + if ($_->{error} or $_->{errorcode}) { + $errored=1; + } + } } diff --git a/xCAT-server-2.0/lib/xcat/plugins/yaboot.pm b/xCAT-server-2.0/lib/xcat/plugins/yaboot.pm index e8c10a8f6..64441046b 100644 --- a/xCAT-server-2.0/lib/xcat/plugins/yaboot.pm +++ b/xCAT-server-2.0/lib/xcat/plugins/yaboot.pm @@ -142,9 +142,14 @@ my $errored = 0; sub pass_along { my $resp = shift; $callback->($resp); - if ($resp and $resp->{errorcode} and $resp->{errorcode}->[0]) { + if ($resp and ($resp->{errorcode} and $resp->{errorcode}->[0]) or ($resp->{error} and $resp->{error}->[0])) { $errored=1; } + foreach (@{$resp->{node}}) { + if ($_->{error} or $_->{errorcode}) { + $errored=1; + } + } }