src/imm/immnd/ImmModel.cc | 31 ++++++++++++++++++-------------
1 files changed, 18 insertions(+), 13 deletions(-)
If a client is down right before headless, chances are the implementers and
admowners will be orphaned because IMMD fails to broadcast global discard
messages.
This patch cleans those orphaned implementers and admowners up.
diff --git a/src/imm/immnd/ImmModel.cc b/src/imm/immnd/ImmModel.cc
--- a/src/imm/immnd/ImmModel.cc
+++ b/src/imm/immnd/ImmModel.cc
@@ -19373,16 +19373,21 @@ ImmModel::isolateThisNode(unsigned int t
IdVector cv, gv;
ImplementerInfo* info = (*i);
otherNode = info->mNodeId;
- if(otherNode == thisNode || otherNode == 0) {
- ++i;
+ if (otherNode == 0) {
+ /* The implementer was already discarded */
+ } else if (otherNode == thisNode) {
+ LOG_WA("Local implementer %u <%u, %x> (%s) was not globally
discarded, discarding it...",
+ info->mId, info->mConn, info->mNodeId,
info->mImplementerName.c_str());
+ ConnVector cv;
+ this->discardImplementer(info->mId, true, cv, isAtCoord);
} else {
info = NULL;
this->discardNode(otherNode, cv, gv, isAtCoord, true);
LOG_NO("Impl Discarded node %x", otherNode);
- /* Discard ccbs. */
-
- i = sImplementerVector.begin(); /* restart iteration. */
- }
+ }
+ /* Discarding implementer doesn't remove the implementer from
sImplementerVector,
+ * so we don't have to restart the iteration */
+ ++i;
}
i2 = sOwnerVector.begin();
@@ -19390,17 +19395,17 @@ ImmModel::isolateThisNode(unsigned int t
IdVector cv, gv;
AdminOwnerInfo* ainfo = (*i2);
otherNode = ainfo->mNodeId;
- if(otherNode == thisNode || otherNode == 0) {
- /* ??? (otherNode == 0) is that really correct ??? */
- ++i2;
+ osafassert(otherNode);
+ if (otherNode == thisNode) {
+ LOG_WA("Local admin owner %u (%s) was not hard finalized,
finalizing it...",
+ ainfo->mId, ainfo->mAdminOwnerName.c_str());
+ this->adminOwnerDelete(ainfo->mId, true, false);
} else {
ainfo = NULL;
this->discardNode(otherNode, cv, gv, isAtCoord, true);
LOG_NO("Admo Discarded node %x", otherNode);
- /* Discard ccbs */
-
- i2 = sOwnerVector.begin(); /* restart iteration. */
- }
+ }
+ i2 = sOwnerVector.begin(); /* restart iteration. */
}
/* Verify that all noncritical CCBs are aborted.
------------------------------------------------------------------------------
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