When object is in a critical CCB and has no admo,
ERR_TRY_AGAIN will be returned if setting a new admo name to the object.
If setting a different admo name, ERR_EXIST will be returned as stated in IMM
specification.
---
src/imm/immnd/ImmModel.cc | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/imm/immnd/ImmModel.cc b/src/imm/immnd/ImmModel.cc
index 2a53ed4..275883b 100644
--- a/src/imm/immnd/ImmModel.cc
+++ b/src/imm/immnd/ImmModel.cc
@@ -5164,7 +5164,7 @@ SaAisErrorT ImmModel::adminOwnerChange(const struct
immsv_a2nd_admown_set* req,
CcbVector::iterator i2;
ObjectInfo* objectInfo = i1->second;
ccbIdOfObj = objectInfo->mCcbId;
- if (!doIt && ccbIdOfObj && release) {
+ if (!doIt && ccbIdOfObj) {
// check for ccb interference
// Note: interference only possible fore release.
// For set the adminowner is either same == noop;
@@ -5177,7 +5177,13 @@ SaAisErrorT ImmModel::adminOwnerChange(const struct
immsv_a2nd_admown_set* req,
if (!release && (adm->mAdminOwnerName == oldOwner)) {
TRACE("Idempotent adminOwner set for %s on %s",
oldOwner.c_str(), objectName.c_str());
- } else {
+ } else if (!release && oldOwner.empty()
+ && (*i2)->mState == IMM_CCB_CRITICAL) {
+ TRACE_7("ERR_TRY_AGAIN: Object '%s' is in a critical CCB (%d)",
+ objectName.c_str(), (*i2)->mId);
+ TRACE_LEAVE();
+ return SA_AIS_ERR_TRY_AGAIN;
+ } else if (release) {
LOG_IN("ERR_BUSY: ccb id %u active on object %s", ccbIdOfObj,
objectName.c_str());
TRACE_LEAVE();
--
2.7.4
------------------------------------------------------------------------------
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