osaf/services/saf/immsv/immnd/ImmModel.cc | 26 +++++++++++++++-----------
osaf/services/saf/immsv/immnd/ImmModel.hh | 2 +-
osaf/services/saf/immsv/immnd/immnd_evt.c | 4 ++--
osaf/services/saf/immsv/immnd/immnd_init.h | 2 +-
osaf/services/saf/immsv/immnd/immnd_proc.c | 2 +-
5 files changed, 20 insertions(+), 16 deletions(-)
When a 2PE system is up and running with ccbs being generated, if one SC is
rebooted, then after the SC has synced imm-ram, the slave pbe typically has
trouble in being allowed to generate its imm.db.xxxxx file. It keeps getting
rejected due to active ccbs. There realy should not be any active ccbs allowed
here because the sync of the returned SC would only have started when there
are no active ccbs and once sync is finished the imm should still not be
persistent writable. THe only problem hewre is that empty CCBs are allowed
to be created. Thus the condiftion for allowing the slave to generate its
imm.db.xxxx file needs to be relaxed to allow empty CCBs.
diff --git a/osaf/services/saf/immsv/immnd/ImmModel.cc
b/osaf/services/saf/immsv/immnd/ImmModel.cc
--- a/osaf/services/saf/immsv/immnd/ImmModel.cc
+++ b/osaf/services/saf/immsv/immnd/ImmModel.cc
@@ -1597,9 +1597,9 @@ immModel_syncComplete(IMMND_CB *cb)
}
SaBoolT
-immModel_ccbsTerminated(IMMND_CB *cb)
-{
- return (SaBoolT) ImmModel::instance(&cb->immModel)->ccbsTerminated();
+immModel_ccbsTerminated(IMMND_CB *cb, bool allowEmpty)
+{
+ return (SaBoolT)
ImmModel::instance(&cb->immModel)->ccbsTerminated(allowEmpty);
}
SaBoolT
@@ -1849,13 +1849,13 @@ ImmModel::immNotPbeWritable(bool isPrtoC
if(pbeBSlaveHasExisted() && !getPbeBSlave(&dummyCon, &dummyNode)) {
/* Pbe slave SHOULD be present but is NOT. Normally this
- means immNotPbeWritable() returns true. But if oneSafe2PBEAllowed()
- is true, (indicating SC repair or similar) then the unavailability
- of the slave is accepted, otherwise not. By default
- oneSafePBEAllowed() is false. So normally we will exit with
- reject (true) here.
- */
- if(!oneSafe2PBEAllowed()) {return true;}
+ means immNotPbeWritable() returns true. But if oneSafe2PBEAllowed()
+ is true, (indicating SC repair or similar) then the unavailability
+ of the slave is accepted, otherwise not. By default
+ oneSafePBEAllowed() is false. So normally we will exit with
+ reject (true) here.
+ */
+ if(!oneSafe2PBEAllowed()) {return true;}
}
/* Pbe is present but Check also for backlog. */
@@ -9706,7 +9706,7 @@ ImmModel::getCcbIdsForOrigCon(SaUint32T
/* Are all ccbs terminated ? */
bool
-ImmModel::ccbsTerminated()
+ImmModel::ccbsTerminated(bool allowEmpty)
{
CcbVector::iterator i;
@@ -9714,6 +9714,10 @@ ImmModel::ccbsTerminated()
for(i=sCcbVector.begin(); i!=sCcbVector.end(); ++i) {
if((*i)->mState < IMM_CCB_COMMITTED) {
+ if(allowEmpty && (*i)->mMutations.empty()) {
+ osafassert((*i)->mImplementers.empty());
+ continue;
+ }
TRACE("Waiting for CCB:%u in state %u",
(*i)->mId, (*i)->mState);
return false;
diff --git a/osaf/services/saf/immsv/immnd/ImmModel.hh
b/osaf/services/saf/immsv/immnd/ImmModel.hh
--- a/osaf/services/saf/immsv/immnd/ImmModel.hh
+++ b/osaf/services/saf/immsv/immnd/ImmModel.hh
@@ -476,7 +476,7 @@ public:
void pbePrtoPurgeMutations(unsigned int nodeId, ConnVector&
connVector);
SaAisErrorT ccbResult(SaUint32T ccbId);
ImmsvAttrNameList * ccbGrabErrStrings(SaUint32T ccbId);
- bool ccbsTerminated();
+ bool ccbsTerminated(bool allowEmpty);
bool pbeIsInSync(bool checkCriticalCcbs);
SaUint32T getIdForLargeAdmo();
void getNonCriticalCcbs(IdVector& cv);
diff --git a/osaf/services/saf/immsv/immnd/immnd_evt.c
b/osaf/services/saf/immsv/immnd/immnd_evt.c
--- a/osaf/services/saf/immsv/immnd/immnd_evt.c
+++ b/osaf/services/saf/immsv/immnd/immnd_evt.c
@@ -849,7 +849,7 @@ static uint32_t immnd_evt_proc_search_in
if (cb->m2Pbe) {
if(cb->mIsOtherScUp && immModel_oneSafe2PBEAllowed(cb))
{
- LOG_WA("ERR_NO_RESOURCES: Cannot allow official
dump/backup "
+ LOG_ER("ERR_NO_RESOURCES: Cannot allow official
dump/backup "
"when 1-safe2PBE is allowed!!");
/* This is simply a guard. Only reason it is
not an assert is
that this does not signify imm-ram
inconsistency, but a grave
@@ -860,7 +860,7 @@ static uint32_t immnd_evt_proc_search_in
}
if((!cb->mIsCoord) && immModel_pbeNotWritable(cb) &&
- !immModel_ccbsTerminated(cb)) {
+ !immModel_ccbsTerminated(cb, true)) {
LOG_WA("ERR_NO_RESOURCES: Active Ccbs still
exist in the system");
/*Not sure this is a problem though. These ccbs
are dommed.
They will not be allowed to apply untill we
are 2-safe.
diff --git a/osaf/services/saf/immsv/immnd/immnd_init.h
b/osaf/services/saf/immsv/immnd/immnd_init.h
--- a/osaf/services/saf/immsv/immnd/immnd_init.h
+++ b/osaf/services/saf/immsv/immnd/immnd_init.h
@@ -299,7 +299,7 @@ extern "C" {
SaBoolT immModel_syncComplete(IMMND_CB *cb);
- SaBoolT immModel_ccbsTerminated(IMMND_CB *cb);
+ SaBoolT immModel_ccbsTerminated(IMMND_CB *cb, bool allowEmpty);
void immModel_prepareForSync(IMMND_CB *cb, SaBoolT isJoining);
diff --git a/osaf/services/saf/immsv/immnd/immnd_proc.c
b/osaf/services/saf/immsv/immnd/immnd_proc.c
--- a/osaf/services/saf/immsv/immnd/immnd_proc.c
+++ b/osaf/services/saf/immsv/immnd/immnd_proc.c
@@ -1295,7 +1295,7 @@ static SaBoolT immnd_ccbsTerminated(IMMN
return SA_TRUE;
}
- SaBoolT ccbsTerminated = immModel_ccbsTerminated(cb);
+ SaBoolT ccbsTerminated = immModel_ccbsTerminated(cb, false);
SaBoolT pbeIsInSync = immModel_pbeIsInSync(cb, false);
SaUint32T largeAdmoId = immModel_getIdForLargeAdmo(cb);
------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
Opensaf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel