Hi Rafael,
The problem has been observed at delete operation also, the try again
loop to be added at DeleteOperation also.
# As previous analysis, SMFD failed at SmfImmDeleteOperation execution
due to it has not supported retry in case of SA_AIS_ERR_EXIST from
saImmOmAdminOwnerSet (Current patch fix)
Feb 15 14:57:29.885066 osafsmfd
[13892:../../../../../../../opensaf/osaf/services/saf/smfsv/smfd/SmfUpgradeStep.cc:3169]
TR becomeAdminOwnerOfAmfClusterObj: calling adminOwnerSet
Feb 15 14:57:29.887656 osafsmfd
[13892:../../../../../../../opensaf/osaf/services/saf/smfsv/smfd/SmfImmOperation.cc:0670]
TR SmfImmDeleteOperation::execute, saImmOmAdminOwnerSet failed
rc=SA_AIS_ERR_EXIST (14)
Feb 15 14:57:29.887668 osafsmfd
[13892:../../../../../../../opensaf/osaf/services/saf/smfsv/smfd/SmfImmOperation.cc:0671]
<< execute
Feb 15 14:57:29.887678 osafsmfd
[13892:../../../../../../../opensaf/osaf/services/saf/smfsv/smfd/SmfUtils.cc:0657]
TR SmfImmUtils::doImmOperations: Check if create operation
Feb 15 14:57:29.887727 osafsmfd
[13892:../../../../../../../opensaf/osaf/services/saf/smfsv/smfd/SmfUtils.cc:0676]
NO Execution of IMM operation failed, rc=SA_AIS_ERR_EXIST (14)
Feb 15 14:57:29.887742 osafsmfd
[13892:../../../../../../../opensaf/osaf/services/saf/smfsv/smfd/SmfUpgradeStep.cc:1180]
<< deleteOneSaAmfNodeSwBundle
Feb 15 14:57:29.886724 osafimmnd
[11570:../../../../../../../opensaf/osaf/services/saf/immsv/immnd/ImmModel.cc:5200]
T5 Set admin owner 'SMFSERVICE'
Feb 15 14:57:29.886783 osafimmnd
[11570:../../../../../../../opensaf/osaf/services/saf/immsv/immnd/ImmModel.cc:15539]
T7 ERR_EXIST: Object
'safInstalledSwBundle=safSmfBundle=01,safAmfNode=PL-9,safAmfCluster=myAmfCluster'
has different administative owner smfSetAdminStateOwner != SMFSERVICE\
Thanks,
Neel.
On 2017/02/08 06:58 PM, Neelakanta Reddy wrote:
> Hi Rafael,
>
> Reviewed and tested the patch.
> Ack.
>
> minor comments inline.
>
> On 2017/02/06 08:27 PM, Rafael Odzakow wrote:
>> src/smf/smfd/SmfImmOperation.cc | 22 +++++++++++++++++++++-
>> src/smf/smfd/SmfUpgradeStep.cc | 23 +++++++++++++++++++++--
>> 2 files changed, 42 insertions(+), 3 deletions(-)
>>
>>
>> Create a campaign containing several single step procedures that install
>> several bundles. If the procedures are on the same saSmfExecLevel the
>> campaign
>> will sometimes fail because of conflicting admin owner on IMM object.
>>
>> trace message:
>> SmfImmCreateOperation::execute:saImmOmAdminOwnerSet failed SA_AIS_ERR_EXIST
>>
>> diff --git a/src/smf/smfd/SmfImmOperation.cc
>> b/src/smf/smfd/SmfImmOperation.cc
>> --- a/src/smf/smfd/SmfImmOperation.cc
>> +++ b/src/smf/smfd/SmfImmOperation.cc
>> @@ -34,6 +34,7 @@
>> #include "imm/saf/saImm.h"
>> #include "base/saf_error.h"
>> #include "base/osaf_extended_name.h"
>> +#include "base/osaf_time.h"
>> #include "smf/smfd/smfd_long_dn.h"
>>
>> /*
>> ========================================================================
>> @@ -440,7 +441,26 @@ SmfImmCreateOperation::execute(SmfRollba
>> const SaNameT *objectNames[2];
>> objectNames[0] = &objectName;
>> objectNames[1] = NULL;
>> - result = immutil_saImmOmAdminOwnerSet(m_immOwnerHandle,
>> objectNames, SA_IMM_ONE);
>> +
>> + // We are taking admin owner on the parent DN of this
>> object.
>> + // This can be conflicting with other threads which also
>> want
>> + // to create objects. Specifically SmfUpgradeStep takes
>> admin
>> + // owner when creating node groups. Retry if object has
>> admin
>> + // owner already.
>> + int timeout_try_cnt = 6;
>> + while (timeout_try_cnt > 0) {
>> + TRACE("%s: calling adminOwnerSet", __FUNCTION__);
>> + result =
>> immutil_saImmOmAdminOwnerSet(m_immOwnerHandle,
>> + objectNames,
>> + SA_IMM_ONE);
>> + if (result != SA_AIS_ERR_EXIST)
>> + break;
>> +
>> + timeout_try_cnt--;
>> + TRACE("%s: adminOwnerSet returned SA_AIS_ERR_EXIST,
>> " +
> The "+" at end of the line needs to be removed
>
>> + "sleep 1 second and retry", __FUNCTION__);
>> + osaf_nanosleep(&kOneSecond);
>> + }
>> if (result != SA_AIS_OK) {
>>
>> TRACE("SmfImmCreateOperation::execute:saImmOmAdminOwnerSet failed %s\n",
>> saf_error(result));
>> TRACE_LEAVE();
>> diff --git a/src/smf/smfd/SmfUpgradeStep.cc b/src/smf/smfd/SmfUpgradeStep.cc
>> --- a/src/smf/smfd/SmfUpgradeStep.cc
>> +++ b/src/smf/smfd/SmfUpgradeStep.cc
>> @@ -3172,8 +3172,27 @@ bool SmfAdminOperation::becomeAdminOwner
>> SaNameT nodeGroupParentDn;
>> saAisNameLend(m_nodeGroupParentDn.c_str(), &nodeGroupParentDn);
>> const SaNameT *objectNames[2] = {&nodeGroupParentDn, NULL};
>> - SaAisErrorT ais_rc = immutil_saImmOmAdminOwnerSet(m_ownerHandle,
>> - objectNames, SA_IMM_SUBTREE);
>> +
>> + // We are taking admin owner on the parent DN of this object. This
>> can
>> + // be conflicting with other threads which also want to create
>> objects.
>> + // Specifically SmfImmOperation takes admin owner when creating IMM
>> + // objects. Retry if object has admin owner already.
>> + int timeout_try_cnt = 6;
>> + SaAisErrorT ais_rc = SA_AIS_OK;
>> + while (timeout_try_cnt > 0) {
>> + TRACE("%s: calling adminOwnerSet", __FUNCTION__);
>> + ais_rc = immutil_saImmOmAdminOwnerSet(m_ownerHandle,
>> + objectNames,
>> + SA_IMM_SUBTREE);
>> + if (ais_rc != SA_AIS_ERR_EXIST)
>> + break;
>> +
>> + timeout_try_cnt--;
>> + TRACE("%s: adminOwnerSet returned SA_AIS_ERR_EXIST, " +
> The "+" at end of the line needs to be removed
>
> /Neel.
>> + "sleep 1 second and retry", __FUNCTION__);
>> + osaf_nanosleep(&kOneSecond);
>> + }
>> +
>> bool rc = true;
>> if (ais_rc != SA_AIS_OK) {
>> LOG_NO("%s: saImmOmAdminOwnerSet owner name '%s' Fail '%s'",
>
> ------------------------------------------------------------------------------
> 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
------------------------------------------------------------------------------
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