While imm is synchronizing, the function to delete admin owner only changes the state of admin owner to dying instead of deleting it. If imm synchronizes successful, those admin owners will be removed. If the synchronization is aborted, those admin owner won't be deleted until next synchronization. Solution is to delete all dead admin owners after aborting a synchronization. --- src/imm/immnd/ImmModel.cc | 20 ++++++++++++++++++++ src/imm/immnd/ImmModel.h | 2 ++ 2 files changed, 22 insertions(+)
diff --git a/src/imm/immnd/ImmModel.cc b/src/imm/immnd/ImmModel.cc index 4ce43d848..8b43111dc 100644 --- a/src/imm/immnd/ImmModel.cc +++ b/src/imm/immnd/ImmModel.cc @@ -2341,6 +2341,9 @@ void ImmModel::sendSyncAbortAt(timespec& time) { void ImmModel::getSyncAbortRsp() { sSyncAbortSentAt.tv_sec = 0; sSyncAbortSentAt.tv_nsec = 0; + if (!immNotWritable()) { + removeDeadAdminOwners(); + } } static bool is_sync_aborting() { @@ -2828,6 +2831,7 @@ void ImmModel::abortSync() { LOG_ER("Impossible node state, will terminate"); abort(); } + removeDeadAdminOwners(); } /** @@ -20339,3 +20343,19 @@ void ImmModel::isolateThisNode(unsigned int thisNode, bool isAtCoord) { immnd_proc_imma_discard_connection() */ } + +void ImmModel::removeDeadAdminOwners() { + TRACE_ENTER(); + std::vector<AdminOwnerInfo*> dead_admin_owners; + for (auto admin_owner : sOwnerVector) { + if (admin_owner->mDying) { + dead_admin_owners.push_back(admin_owner); + } + } + for (auto admin_owner : dead_admin_owners) { + LOG_WA("Removing admin owner %u %s which is in demise.", + admin_owner->mId, admin_owner->mAdminOwnerName.c_str()); + osafassert(adminOwnerDelete(admin_owner->mId, true) == SA_AIS_OK); + } + TRACE_LEAVE(); +} diff --git a/src/imm/immnd/ImmModel.h b/src/imm/immnd/ImmModel.h index 44da47038..9940330f6 100644 --- a/src/imm/immnd/ImmModel.h +++ b/src/imm/immnd/ImmModel.h @@ -534,6 +534,8 @@ class ImmModel { SaUint32T attrType, SaImmAttrFlagsT attrFlags = 0, bool* hasLongDn = NULL); + + void removeDeadAdminOwners(); }; #endif // IMM_IMMND_IMMMODEL_H_ -- 2.25.1 _______________________________________________ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel