osaf/services/saf/smfsv/smfd/SmfCampState.cc | 14 +++++++++++--- osaf/services/saf/smfsv/smfd/SmfUpgradeCampaign.cc | 2 +- 2 files changed, 12 insertions(+), 4 deletions(-)
To avoid the need of restore in case of cluster reboot, SMF turn on PBE in completed state. diff --git a/osaf/services/saf/smfsv/smfd/SmfCampState.cc b/osaf/services/saf/smfsv/smfd/SmfCampState.cc --- a/osaf/services/saf/smfsv/smfd/SmfCampState.cc +++ b/osaf/services/saf/smfsv/smfd/SmfCampState.cc @@ -837,6 +837,10 @@ SmfCampStateExecuting::executeWrapup(Smf changeState(i_camp, SmfCampStateExecFailed::instance()); return SMF_CAMP_FAILED; } + + //Activate IMM BPE if active when campaign was started. + i_camp->restorePbe(); + // TODO Start wait to complete timer LOG_NO("CAMP: Start wait to complete timer (not implemented yet)"); @@ -992,7 +996,14 @@ SmfCampStateExecCompleted::rollback(SmfU { TRACE_ENTER(); LOG_NO("CAMP: Start rolling back completed campaign %s", i_camp->getCampaignName().c_str()); + + //Disable IMM PBE + if (i_camp->disablePbe() != SA_AIS_OK) { + LOG_NO("CAMP: Fail to disable IMM PBE at rollback, continue"); + } + changeState(i_camp, SmfCampRollingBack::instance()); + if (i_camp->m_campInit.executeCallbackAtRollback() == false) { std::string error = "Campaign rollback callback failed"; LOG_ER("%s", error.c_str()); @@ -1055,9 +1066,6 @@ SmfCampStateExecCompleted::commit(SmfUpg changeState(i_camp, SmfCampStateCommitted::instance()); LOG_NO("CAMP: Upgrade campaign committed %s", i_camp->getCampaignName().c_str()); - //Activate IMM BPE if active when campaign was started. - i_camp->restorePbe(); - // TODO Start wait to allow new campaign timer LOG_NO("CAMP: Start wait to allow new campaign timer (not implemented yet)"); diff --git a/osaf/services/saf/smfsv/smfd/SmfUpgradeCampaign.cc b/osaf/services/saf/smfsv/smfd/SmfUpgradeCampaign.cc --- a/osaf/services/saf/smfsv/smfd/SmfUpgradeCampaign.cc +++ b/osaf/services/saf/smfsv/smfd/SmfUpgradeCampaign.cc @@ -657,7 +657,7 @@ SmfUpgradeCampaign::restorePbe() //Note: When introducing SMF PBE on/off functionality (upgrade), the smfPbeIndicator will not be found and // no action will be taken. if (immUtil.getObject("safRdn=smfPbeIndicator,safApp=safSmfService", &attributes) == false) { - LOG_NO("IMM PBE was not turned off at campaign start and will not be turned on at commit."); + LOG_NO("IMM PBE was not turned off at campaign start and was not turned on at PBE restore."); TRACE_LEAVE(); return SA_AIS_ERR_ACCESS; } ------------------------------------------------------------------------------ Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk _______________________________________________ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel