Hi Hung,
Reviewed the patch.
Ack with the following comments:
Comments:
Resending of IMMD_EVT_ND2D_ADMO_HARD_FINALIZE, should be avoided.
But, the changes to immnd_restricted_ok at the end of the release is not
a good option.
I recommend to open an enhancement to add
IMMD_EVT_ND2D_ADMO_HARD_FINALIZE to immnd_restricted_ok.
And remove the resending of IMMD_EVT_ND2D_ADMO_HARD_FINALIZE at
syncFinalize which is present in current patch.
Thanks,
Neel.
On Friday 13 May 2016 06:04 PM, Hung Nguyen wrote:
> osaf/services/saf/immsv/immnd/ImmModel.cc | 30
> +++++++++---------------------
> osaf/services/saf/immsv/immnd/immnd_evt.c | 18 ++++++++++++++++++
> 2 files changed, 27 insertions(+), 21 deletions(-)
>
>
> Dont verify mDying on veterans when finalizing sync.
> Also if we receive ADMO_HARD_FINALIZE msg when mSyncFinalizing==true,
> we have to finalize that admo on the sync-client.
> If not there will be inconsistency between IMMNDs.
>
> 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
> @@ -18674,23 +18674,10 @@ ImmModel::finalizeSync(ImmsvOmFinalizeSy
>
> //verify currently existing AdminOwners.
>
> + /* We can't remove the dying ROF==FALSE admo before verifying.
> + * There may be ROF=FALSE admo marked as dying when coord is
> + * generating the sync-finalize message. */
> AdminOwnerVector::iterator i2;
> - for(i2=sOwnerVector.begin(); i2!=sOwnerVector.end();) {
> - if((*i2)->mDying && !((*i2)->mReleaseOnFinalize)) {
> - LOG_WA("Removing admin owner %u %s (ROF==FALSE) which is
> in demise, "
> - "BEFORE receiving sync/verify message",
> - (*i2)->mId,
> - (*i2)->mAdminOwnerName.c_str());
> - osafassert(adminOwnerDelete((*i2)->mId, true) ==
> SA_AIS_OK);
> - //lookup of admin owner again.
> -
> - //restart of iteration again.
> - i2=sOwnerVector.begin();
> - } else {
> - ++i2;
> - }
> - }
> -
> ImmsvAdmoList* ai = req->adminOwners;
> for(; ai!=NULL; ai=ai->next) {
> int nrofTouchedObjs=0;
> @@ -18717,11 +18704,12 @@ ImmModel::finalizeSync(ImmsvOmFinalizeSy
> }
>
> if(info->mDying != ai->isDying) {
> - LOG_ER("Sync-verify: Established node has "
> + LOG_WA("Sync-verify: Established node has "
> "different isDying flag (%u) for AdminOwner "
> "%s, should be %u.", info->mDying,
> ownerName.c_str(), ai->isDying);
> - abort();
> + /* We don't abort here because mDying can be set on
> veterans
> + * when coord is generating sync-finalize message. */
> }
> if(info->mReleaseOnFinalize != ai->releaseOnFinalize) {
> LOG_ER("Sync-verify: Established node has "
> @@ -18754,11 +18742,11 @@ ImmModel::finalizeSync(ImmsvOmFinalizeSy
> }
> }
>
> + /* Removing all dying admo, both ROF=TRUE and ROF=FALSE */
> for(i2=sOwnerVector.begin(); i2!=sOwnerVector.end();) {
> if((*i2)->mDying) {
> - osafassert((*i2)->mReleaseOnFinalize);
> - LOG_WA("Removing admin owner %u %s (ROF==TRUE) which is
> in demise, "
> - "AFTER receiving sync/verify message",
> + LOG_WA("Removing admin owner %u %s which is in demise, "
> + "AFTER receiving sync/verify message",
> (*i2)->mId,
> (*i2)->mAdminOwnerName.c_str());
> osafassert(adminOwnerDelete((*i2)->mId, true) ==
> SA_AIS_OK);
> 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
> @@ -9817,6 +9817,24 @@ void immnd_evt_proc_admo_hard_finalize(I
> TRACE("Failed in hard remove of admin owner %u.
> Preload?", evt->info.admFinReq.adm_owner_id);
> }
> }
> +
> + /* If we receive admo hard finalize in the gap between sending
> sync-finalize message and
> + * receiving it back from fevs (mSyncFinalizing == true), we need to
> re-broadcast the message again.
> + * The sync-clients need this re-broadcasted message because
> + * the dead admo are included in sync-finalize message.
> + * The coord (this) and veterans will also recevie this as duplicated
> message
> + * but they will just drop it as the admo id can't be found. */
> + if (cb->mSyncFinalizing) {
> + IMMSV_EVT send_evt;
> + memset(&send_evt, '\0', sizeof(IMMSV_EVT));
> + send_evt.type = IMMSV_EVT_TYPE_IMMD;
> + send_evt.info.immd.type = IMMD_EVT_ND2D_ADMO_HARD_FINALIZE;
> + send_evt.info.immd.info.admoId =
> evt->info.admFinReq.adm_owner_id;
> + if(immnd_mds_msg_send(cb, NCSMDS_SVC_ID_IMMD,
> cb->immd_mdest_id, &send_evt) != NCSCC_RC_SUCCESS) {
> + LOG_ER("Failure to broadcast discard admo id:%u ",
> evt->info.admFinReq.adm_owner_id);
> + }
> + }
> +
> TRACE_LEAVE();
> }
>
------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
Opensaf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel