osaf/services/saf/smfsv/smfd/SmfCampState.cc | 19 +++++++++++++------ osaf/services/saf/smfsv/smfd/SmfUpgradeCampaign.cc | 2 +- 2 files changed, 14 insertions(+), 7 deletions(-)
To avoid the need of restore in case of cluster reboot, SMF turn on PBE in completed and rollbackCompleted 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 @@ -989,6 +989,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)"); @@ -1144,6 +1148,12 @@ 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"; @@ -1207,9 +1217,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)"); @@ -1891,6 +1898,9 @@ SmfCampRollingBack::rollbackInit(SmfUpgr return SMF_CAMP_FAILED; } + //Activate IMM BPE if active when campaign was started. + i_camp->restorePbe(); + changeState(i_camp, SmfCampRollbackCompleted::instance()); LOG_NO("CAMP: Upgrade campaign rollback completed %s", i_camp->getCampaignName().c_str()); TRACE_LEAVE(); @@ -2256,9 +2266,6 @@ SmfCampRollbackCompleted::commit(SmfUpgr changeState(i_camp, SmfCampRollbackCommitted::instance()); LOG_NO("CAMP: Upgrade campaign rollback 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