From 07519a5eaddd5b7a02bf73fa3a46f9c2319fcd30 Mon Sep 17 00:00:00 2001 From: Patrick Williams Date: Tue, 4 Mar 2014 13:22:31 -0600 Subject: Prevent error log deletion of non-istep error logs. While looking at another issue, I noticed that we were assuming that all error logs returned to istep dispatcher were the generic 'istep failed' logs, but that is not the case. Ensure we do not delete an important log when we call an istep that does not use the generic wrapper log, such as the MDIA/PRD isteps. Change-Id: Ibab8ba57c09f76f83ab811d7f563fb0977e0a43b Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/9292 Tested-by: Jenkins Server Reviewed-by: Brian H. Horton Reviewed-by: WILLIAM G. HOFFA Reviewed-by: MIKE J. JONES Reviewed-by: A. Patrick Williams III --- .../initservice/istepdispatcher/istepdispatcher.C | 24 ++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) (limited to 'src/usr/initservice') diff --git a/src/usr/initservice/istepdispatcher/istepdispatcher.C b/src/usr/initservice/istepdispatcher/istepdispatcher.C index 1f9fc1099..86968b996 100644 --- a/src/usr/initservice/istepdispatcher/istepdispatcher.C +++ b/src/usr/initservice/istepdispatcher/istepdispatcher.C @@ -311,15 +311,23 @@ errlHndl_t IStepDispatcher::executeAllISteps() } else { - // The IStep returned an error, This is the generic - // 'IStep failed' from the IStepError class, real - // errors detailing the failure have already been - // committed. Record the PLID and delete it. This - // will be replaced by the checkMinimumHardware - // error with the same plid that matches the real - // errors + // The IStep returned an error and this is likely + // the generic 'IStep failed' from the + // IStepError class; real errors detailing the + // failure have already been committed. Record the + // PLID and delete it if 'Istep failed' or + // commit it otherwised. This will be replaced by + // the checkMinimumHardware error with the same + // plid that matches the real errors const uint32_t l_plid = err->plid(); - delete err; + if (ISTEP::ISTEP_FAILURE == err->reasonCode()) + { + delete err; + } + else + { + errlCommit(err, INITSVC_COMP_ID); + } err = l_errl; l_errl = NULL; err->plid(l_plid); -- cgit v1.2.1