Hi Neel,

I have an idea how to fix the problem (2.).
I will create an addition to your patch and test if it solves the problem. I 
will send it to you if it works with our test

/Lennart
 
> -----Original Message-----
> From: Neelakanta Reddy [mailto:[email protected]]
> Sent: den 24 april 2017 10:20
> To: Lennart Lund <[email protected]>; Rafael Odzakow
> <[email protected]>
> Cc: [email protected]
> Subject: Re: [PATCH 1/1] smf: updated the imm API vesrion to latest
> supported [#2431]
> 
> Hi Lennart,
> 
> comments inline.
> 
> On 2017/04/24 01:17 PM, Lennart Lund wrote:
> > Hi Neel
> >
> > I have found two things:
> > 1.
> > You have changed SMF to use IMM minor version 17 but the IMM PR
> document says that version 18 is the latest. Also the ticket says that SMF 
> shall
> be upgraded to use version 18.
> The latest A.2.18 is for CLM integration, with IMM( as CLM Integration
> is not happened in OpenSAF Fully).
> so, used A,2,17 and will change to A.2.17 in ticket description.
> > 2.
> > I have a test that during campaign init state changes "longDnsAllowed"
> setting to ON and then creates an object with a long name. With this patch
> applied this is no longer working. SMF uses an IMM Applier to surveil the
> "longDnsAllowed" attribute. With the patch applied it seems as if it takes
> longer time for IMM to activate the applier callback that makes SMF aware of
> that the setting has changed resulting in a "too long name" fail when SMF
> tries to create the object. I will do some more investigations
> changing IMM version to A.2.17 should not cause any delays, I will also
> test the longdn related cases.
> 
> Thanks,
> Neel.
> > Thanks
> > Lennart
> >
> >> -----Original Message-----
> >> From: Neelakanta Reddy [mailto:[email protected]]
> >> Sent: den 20 april 2017 12:59
> >> To: Rafael Odzakow <[email protected]>; Lennart Lund
> >> <[email protected]>
> >> Cc: [email protected]; Neelakanta Reddy
> >> <[email protected]>
> >> Subject: [PATCH 1/1] smf: updated the imm API vesrion to latest
> supported
> >> [#2431]
> >>
> >> ---
> >>   src/smf/smfd/SmfCampaignThread.cc  |  2 +-
> >>   src/smf/smfd/SmfExecControlHdl.h   |  2 +-
> >>   src/smf/smfd/SmfImmApplierHdl.h    |  2 +-
> >>   src/smf/smfd/SmfImmOperation.cc    | 15 +++++++++------
> >>   src/smf/smfd/SmfProcedureThread.cc |  2 +-
> >>   src/smf/smfd/SmfUpgradeCampaign.cc |  2 ++
> >>   src/smf/smfd/SmfUpgradeStep.h      |  2 +-
> >>   src/smf/smfd/SmfUtils.cc           |  7 ++++---
> >>   src/smf/smfd/smfd_campaign_oi.cc   |  2 +-
> >>   src/smf/smfd/smfd_main.cc          |  2 +-
> >>   10 files changed, 22 insertions(+), 16 deletions(-)
> >>
> >> diff --git a/src/smf/smfd/SmfCampaignThread.cc
> >> b/src/smf/smfd/SmfCampaignThread.cc
> >> index 413beb0..8f3d257 100644
> >> --- a/src/smf/smfd/SmfCampaignThread.cc
> >> +++ b/src/smf/smfd/SmfCampaignThread.cc
> >> @@ -521,7 +521,7 @@ SaAisErrorT
> >> SmfCampaignThread::createImmHandle(SmfCampaign *i_campaign) {
> >>     TRACE_ENTER();
> >>     SaAisErrorT rc = SA_AIS_OK;
> >>     int existCnt = 0;
> >> -  SaVersionT immVersion = {'A', 2, 1};
> >> +  SaVersionT immVersion = {'A', 2, 17};
> >>     SmfImmUtils immutil;
> >>     SaImmAttrValuesT_2 **attributes;
> >>     const char *campOiName = NULL;
> >> diff --git a/src/smf/smfd/SmfExecControlHdl.h
> >> b/src/smf/smfd/SmfExecControlHdl.h
> >> index 3c3e8bc..8ba30a4 100644
> >> --- a/src/smf/smfd/SmfExecControlHdl.h
> >> +++ b/src/smf/smfd/SmfExecControlHdl.h
> >> @@ -108,7 +108,7 @@ class SmfExecControlObjHandler {
> >>     SaImmAttrValuesT_2 *m_nodesForSingleStep_ad;
> >>
> >>     // For storing IMM handles
> >> -  const SaVersionT m_immVersion{'A', 2, 1};
> >> +  const SaVersionT m_immVersion{'A', 2, 17};
> >>     SaImmHandleT m_omHandle;
> >>     SaImmAdminOwnerHandleT m_ownerHandle;
> >>     SaImmCcbHandleT m_ccbHandle;
> >> diff --git a/src/smf/smfd/SmfImmApplierHdl.h
> >> b/src/smf/smfd/SmfImmApplierHdl.h
> >> index 68ffa1c..7bd037c 100644
> >> --- a/src/smf/smfd/SmfImmApplierHdl.h
> >> +++ b/src/smf/smfd/SmfImmApplierHdl.h
> >> @@ -98,7 +98,7 @@ class SmfImmApplierHdl {
> >>     ExecuteImmCallbackReply ExecuteImmCallback(void);
> >>
> >>    private:
> >> -  const SaVersionT kImmVersion = {'A', 2, 11};
> >> +  const SaVersionT kImmVersion = {'A', 2, 17};
> >>     static std::atomic<unsigned int> instance_number_;
> >>     bool isCreated_;
> >>     std::string applier_name_;
> >> diff --git a/src/smf/smfd/SmfImmOperation.cc
> >> b/src/smf/smfd/SmfImmOperation.cc
> >> index 1dd44df..445455f 100644
> >> --- a/src/smf/smfd/SmfImmOperation.cc
> >> +++ b/src/smf/smfd/SmfImmOperation.cc
> >> @@ -414,8 +414,9 @@ SaAisErrorT
> >> SmfImmCreateOperation::execute(SmfRollbackData *o_rollbackData) {
> >>         m_ccbHandle, (SaImmClassNameT)className, &objectName,
> >>         (const SaImmAttrValuesT_2 **)m_immAttrValues);
> >>     if (result != SA_AIS_OK && result == SA_AIS_ERR_FAILED_OPERATION)
> {
> >> -    result = saImmOmCcbGetErrorStrings(m_ccbHandle, &errStrings);
> >> -    if (errStrings) {
> >> +    SaAisErrorT result1 = SA_AIS_OK;
> >> +    result1 = saImmOmCcbGetErrorStrings(m_ccbHandle, &errStrings);
> >> +    if (result1 == SA_AIS_OK && errStrings) {
> >>         TRACE("Received error string is %s", errStrings[0]);
> >>         char *type = NULL;
> >>         type = strstr(errStrings[0], "IMM: Resource abort: ");
> >> @@ -651,8 +652,9 @@ SaAisErrorT
> >> SmfImmDeleteOperation::execute(SmfRollbackData *o_rollbackData) {
> >>     const SaStringT *errStrings = NULL;
> >>     result = immutil_saImmOmCcbObjectDelete(m_ccbHandle,
> &objectName);
> >>     if (result != SA_AIS_OK && result == SA_AIS_ERR_FAILED_OPERATION)
> {
> >> -    result = saImmOmCcbGetErrorStrings(m_ccbHandle, &errStrings);
> >> -    if (errStrings) {
> >> +    SaAisErrorT result1 = SA_AIS_OK;
> >> +    result1 = saImmOmCcbGetErrorStrings(m_ccbHandle, &errStrings);
> >> +    if (result1 == SA_AIS_OK && errStrings) {
> >>         TRACE("Received error string is %s", errStrings[0]);
> >>         char *type = NULL;
> >>         type = strstr(errStrings[0], "IMM: Resource abort: ");
> >> @@ -1030,8 +1032,9 @@ SaAisErrorT
> >> SmfImmModifyOperation::execute(SmfRollbackData *o_rollbackData) {
> >>         m_ccbHandle, &objectName,
> >>         (const SaImmAttrModificationT_2 **)m_immAttrMods);
> >>     if (result != SA_AIS_OK && result == SA_AIS_ERR_FAILED_OPERATION)
> {
> >> -    result = saImmOmCcbGetErrorStrings(m_ccbHandle, &errStrings);
> >> -    if (errStrings) {
> >> +    SaAisErrorT result1 = SA_AIS_OK;
> >> +    result1 = saImmOmCcbGetErrorStrings(m_ccbHandle, &errStrings);
> >> +    if (result1 == SA_AIS_OK && errStrings) {
> >>         TRACE("Received error string is %s", errStrings[0]);
> >>         char *type = strstr(errStrings[0], "IMM: Resource abort: ");
> >>         if (type != NULL) {
> >> diff --git a/src/smf/smfd/SmfProcedureThread.cc
> >> b/src/smf/smfd/SmfProcedureThread.cc
> >> index 269820b..023dc8e 100644
> >> --- a/src/smf/smfd/SmfProcedureThread.cc
> >> +++ b/src/smf/smfd/SmfProcedureThread.cc
> >> @@ -179,7 +179,7 @@ SaAisErrorT
> >> SmfProcedureThread::createImmHandle(void) {
> >>     TRACE_ENTER();
> >>     SaAisErrorT rc = SA_AIS_OK;
> >>     int existCnt = 0;
> >> -  SaVersionT immVersion = {'A', 2, 1};
> >> +  SaVersionT immVersion = {'A', 2, 17};
> >>
> >>     // DN of the procedure
> >>     const char *procName = m_procedure->getProcName().c_str();
> >> diff --git a/src/smf/smfd/SmfUpgradeCampaign.cc
> >> b/src/smf/smfd/SmfUpgradeCampaign.cc
> >> index 396bf10..aa03eba 100644
> >> --- a/src/smf/smfd/SmfUpgradeCampaign.cc
> >> +++ b/src/smf/smfd/SmfUpgradeCampaign.cc
> >> @@ -1040,6 +1040,8 @@ void
> >> SmfUpgradeCampaign::resetMaintenanceState() {
> >>          * with Resource abort in error string.
> >>          */
> >>         continue;
> >> +    } else {
> >> +       break;
> >>       }
> >>     }
> >>     if (rc != SA_AIS_OK) {
> >> diff --git a/src/smf/smfd/SmfUpgradeStep.h
> >> b/src/smf/smfd/SmfUpgradeStep.h
> >> index 4e741b7..72e5d97 100644
> >> --- a/src/smf/smfd/SmfUpgradeStep.h
> >> +++ b/src/smf/smfd/SmfUpgradeStep.h
> >> @@ -895,7 +895,7 @@ class SmfAdminOperation {
> >>     std::list<unitNameAndState> m_suList;
> >>     std::list<unitNameAndState> m_nodeList;
> >>
> >> -  const SaVersionT m_immVersion{'A', 2, 1};
> >> +  const SaVersionT m_immVersion{'A', 2, 17};
> >>
> >>     std::string m_nodeGroupParentDn;
> >>
> >> diff --git a/src/smf/smfd/SmfUtils.cc b/src/smf/smfd/SmfUtils.cc
> >> index 7277fde..d2b4734 100644
> >> --- a/src/smf/smfd/SmfUtils.cc
> >> +++ b/src/smf/smfd/SmfUtils.cc
> >> @@ -58,7 +58,7 @@
> >>    *
> >>
> ==========================================================
> >> ==============
> >>    */
> >>
> >> -SaVersionT SmfImmUtils::s_immVersion = {'A', 2, 1};
> >> +SaVersionT SmfImmUtils::s_immVersion = {'A', 2, 17};
> >>
> >>   /*
> >>
> ==========================================================
> >> ==============
> >>    *   FUNCTION PROTOTYPES
> >> @@ -703,8 +703,9 @@ SaAisErrorT SmfImmUtils::doImmOperations(
> >>     /* Apply the CCB */
> >>     result = immutil_saImmOmCcbApply(immCcbHandle);
> >>     if (result != SA_AIS_OK && result == SA_AIS_ERR_FAILED_OPERATION)
> {
> >> -    result = saImmOmCcbGetErrorStrings(immCcbHandle, &errStrings);
> >> -    if (errStrings) {
> >> +    SaAisErrorT result1 = SA_AIS_OK;
> >> +    result1 = saImmOmCcbGetErrorStrings(immCcbHandle, &errStrings);
> >> +    if (result1 == SA_AIS_OK && errStrings) {
> >>         TRACE("Received error string is %s", errStrings[0]);
> >>         char *type = NULL;
> >>         type = strstr(errStrings[0], "IMM: Resource abort: ");
> >> diff --git a/src/smf/smfd/smfd_campaign_oi.cc
> >> b/src/smf/smfd/smfd_campaign_oi.cc
> >> index f37f8ca..e559730 100644
> >> --- a/src/smf/smfd/smfd_campaign_oi.cc
> >> +++ b/src/smf/smfd/smfd_campaign_oi.cc
> >> @@ -42,7 +42,7 @@
> >>   #include "smf/smfd/SmfCbkUtil.h"
> >>   #include "base/osaf_extended_name.h"
> >>
> >> -static SaVersionT immVersion = {'A', 2, 1};
> >> +static SaVersionT immVersion = {'A', 2, 17};
> >>   static const SaImmOiImplementerNameT implementerName =
> >>       (SaImmOiImplementerNameT) "safSmfService";
> >>
> >> diff --git a/src/smf/smfd/smfd_main.cc b/src/smf/smfd/smfd_main.cc
> >> index 2d66c1e..35b16ee 100644
> >> --- a/src/smf/smfd/smfd_main.cc
> >> +++ b/src/smf/smfd/smfd_main.cc
> >> @@ -334,7 +334,7 @@ static void main_process(void) {
> >>       initialized.
> >>     */
> >>     SaImmHandleT omHandle = 0;
> >> -  SaVersionT immVersion = {'A', 2, 1};
> >> +  SaVersionT immVersion = {'A', 2, 17};
> >>     SaAisErrorT rc = immutil_saImmOmInitialize(&omHandle, NULL,
> >> &immVersion);
> >>     if (rc != SA_AIS_OK) {
> >>       LOG_ER("immutil_saImmOmInitialize faild, rc=%s", saf_error(rc));
> >> --
> >> 1.9.1


------------------------------------------------------------------------------
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

Reply via email to