smfd crashes after cluster reboot when campaign has completed but not
been committed

When the cluster is coming back up, and smfd gets active assignment,
it will immediately start executing the campaign. If the other SC is
not up yet, and PBE is enabled, then writes to IMM will fail with
NO_RESOURCES, and smfd will crash in updateImmAttr.

Don't re-execute a campaign that has already completed.
---
 src/smf/smfd/SmfCampaign.cc | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/smf/smfd/SmfCampaign.cc b/src/smf/smfd/SmfCampaign.cc
index 6f51483..e3019dc 100644
--- a/src/smf/smfd/SmfCampaign.cc
+++ b/src/smf/smfd/SmfCampaign.cc
@@ -580,6 +580,10 @@ SaAisErrorT SmfCampaign::adminOpVerify(void) {
  * initializes the execution
  */
 SaAisErrorT SmfCampaign::initExecution(void) {
+  // if the campaign has already completed no need to re-execute
+  if (m_cmpgState == SA_SMF_CMPG_EXECUTION_COMPLETED)
+    return SA_AIS_OK;
+
   // reset the object counter of upgrade procedures (used for procedure OI
   // naming)
   SmfUpgradeProcedure::resetProcCounter();
-- 
2.9.5


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Opensaf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to