Hi Khanh, I have not done a thorough review or tested but the reasoning and the solution seems ok. Not contradicting anything in AIS and not NBC, also the new rules are documented (sort of). Let's trust the other reviewers!
Thanks Lennart -----Original Message----- From: khanh.h.dang <khanh.h.d...@dektech.com.au> Sent: den 23 augusti 2019 13:04 To: Lennart Lund <lennart.l...@ericsson.com>; Thuan Tran <thuan.t...@dektech.com.au> Cc: opensaf-devel@lists.sourceforge.net; Khanh Hoang Dang <khanh.h.d...@dektech.com.au> Subject: [PATCH 1/1] smf: allow to commit merged camp after a manual cluster reboot [#3063] Return OK to immSteps if step is already completed in order to continue executing after a manual cluster reboot. --- src/smf/smfd/SmfUpgradeCampaign.cc | 1 + src/smf/smfd/SmfUpgradeProcedure.cc | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/src/smf/smfd/SmfUpgradeCampaign.cc b/src/smf/smfd/SmfUpgradeCampaign.cc index 3c50bf7..a50f4da 100644 --- a/src/smf/smfd/SmfUpgradeCampaign.cc +++ b/src/smf/smfd/SmfUpgradeCampaign.cc @@ -903,6 +903,7 @@ void SmfUpgradeCampaign::procResult(SmfUpgradeProcedure *i_procedure, void SmfUpgradeCampaign::continueExec() { TRACE_ENTER(); SaSmfCmpgStateT currentState = m_state->getState(); + SmfCampaignThread::instance()->campaign()->setError(""); // Check if the campaign execution continues after a campaign restart // resulting from a SMF ordered cluster reboot or SI_SWAP diff --git a/src/smf/smfd/SmfUpgradeProcedure.cc b/src/smf/smfd/SmfUpgradeProcedure.cc index fd99e88..92ae35d 100644 --- a/src/smf/smfd/SmfUpgradeProcedure.cc +++ b/src/smf/smfd/SmfUpgradeProcedure.cc @@ -3382,6 +3382,13 @@ SaAisErrorT SmfUpgradeProcedure::getImmStepsMergedSingleStep() { return SA_AIS_ERR_INIT; } + if (newStep->getState() == SA_SMF_STEP_COMPLETED) { + LOG_NO("SmfUpgradeProcedure::getImmStepsMergedSingleStep: state %d", + SA_SMF_STEP_COMPLETED); + TRACE_LEAVE(); + return SA_AIS_OK; + } + if ((newStep->getState() != SA_SMF_STEP_INITIAL) && (newStep->getState() != SA_SMF_STEP_EXECUTING)) { LOG_NO("SmfUpgradeProcedure::getImmStepsMergedSingleStep: Invalid state %d", -- 2.7.4 _______________________________________________ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel