PLM asserts when si-swap of middleware is done two times.

PLM does not remove internal data structures of child EEs when it goes from
quiesced to standby.

Remove the internal child EE info when going from quiesed to standby.
---
 src/plm/common/plms.h     |  1 +
 src/plm/plmd/plms_imm.c   |  3 +++
 src/plm/plmd/plms_virt.cc | 14 ++++++++++++++
 3 files changed, 18 insertions(+)

diff --git a/src/plm/common/plms.h b/src/plm/common/plms.h
index c7f106a..d550ea0 100644
--- a/src/plm/common/plms.h
+++ b/src/plm/common/plms.h
@@ -528,6 +528,7 @@ void plms_modify_vmm_obj(const SaNameT *, 
SaImmAttrModificationT_2 **attrs);
 void plms_modify_vm_obj(const SaNameT *, SaImmAttrModificationT_2 **attrs);
 void plms_delete_vmm_obj(const SaNameT *);
 void plms_delete_vm_obj(const SaNameT *);
+void plms_delete_vms(void);
 SaAisErrorT plms_validate_modify_vmm_obj(SaImmOiCcbIdT, const SaNameT *,
                                          const SaImmAttrModificationT_2 **);
 SaAisErrorT plms_validate_modify_vm_obj(SaImmOiCcbIdT, const SaNameT *,
diff --git a/src/plm/plmd/plms_imm.c b/src/plm/plmd/plms_imm.c
index e3882e4..3a16e57 100644
--- a/src/plm/plmd/plms_imm.c
+++ b/src/plm/plmd/plms_imm.c
@@ -4122,6 +4122,9 @@ void plms_proc_quiesced_standby_role_change()
        }
        TRACE_2("Freed all the HE, EE and Dependency objects");
 
+       /* free the child EEs */
+       plms_delete_vms();
+
        /* remove all the nodes in patricia tree plms_cb->base_he_info */
        while ((he_base_info = (PLMS_HE_BASE_INFO *)ncs_patricia_tree_getnext(
                    &plms_cb->base_he_info, (SaUint8T *)0)) != NULL) {
diff --git a/src/plm/plmd/plms_virt.cc b/src/plm/plmd/plms_virt.cc
index e9f44af..2fd735a 100644
--- a/src/plm/plmd/plms_virt.cc
+++ b/src/plm/plmd/plms_virt.cc
@@ -657,6 +657,20 @@ extern "C" SaUint32T plms_ee_isolate_vm(const PLMS_ENTITY 
*entity) {
   return rc;
 }
 
+extern "C" void plms_delete_vms(void) {
+  TRACE_ENTER();
+
+  for (PlmsVmmMap::iterator it(plmsVmmMap.begin());
+       it != plmsVmmMap.end();
+       ++it) {
+    delete it->second;
+  }
+
+  plmsVmmMap.clear();
+
+  TRACE_LEAVE();
+}
+
 PlmsVmmConfig::PlmsVmmConfig(const std::string &e, const std::string &s)
     : ee(e), session(s) {}
 
-- 
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