Re: [devel] [PATCH 1/1] amfnd: retry on ERR_NOT_EXIST [#2490]

2017-06-27 Thread Gary Lee
Hi

I would like to push this patch on Friday if there are no objections.

For the medium term, we should consider making AMFND an applier to avoid these 
issues?

Thanks
Gary

On 15/6/17, 5:41 pm, "Gary Lee"  wrote:

On a congested network, sometimes a newly created IMM object can take some
time to be available on other nodes.

In our test, a new SU is created on SC-1 and unlocked. But sometimes
it fails on a remote node due to:

2017-05-19 13:55:19 SC-2 osafamfnd[258]: ER amf_saImmOmSearchInitialize_o2 
failed: 12

To get around this, we will retry on SA_AIS_ERR_NOT_EXIST a few times.
---
 src/amf/amfnd/util.cc | 15 +++
 1 file changed, 15 insertions(+)

diff --git a/src/amf/amfnd/util.cc b/src/amf/amfnd/util.cc
index ed0905ce2..bca642eac 100644
--- a/src/amf/amfnd/util.cc
+++ b/src/amf/amfnd/util.cc
@@ -38,6 +38,9 @@
 #include 
 #include "osaf/configmake.h"
 #include "amf/amfnd/avnd.h"
+#include "base/osaf_time.h"
+
+extern struct ImmutilWrapperProfile immutilWrapperProfile;
 
 const char *presence_state[] = {
 "OUT_OF_RANGE", "UNINSTANTIATED", "INSTANTIATING",
@@ -335,6 +338,18 @@ SaAisErrorT amf_saImmOmSearchInitialize_o2(
   scope, searchOptions, 
searchParam,
   attributeNames, 
);
 }
+  } else if (rc == SA_AIS_ERR_NOT_EXIST) {
+// it is possible for 'rootName' to be not yet available
+// at the local immnd. Retry a few times to allow CCB to be propagated.
+unsigned int nTries = 1;
+while (rc == SA_AIS_ERR_NOT_EXIST &&
+  nTries < immutilWrapperProfile.nTries) {
+  osaf_nanosleep();
+  rc = immutil_saImmOmSearchInitialize_o2(immHandle, rootName.c_str(),
+scope, searchOptions, searchParam,
+attributeNames, );
+  nTries++;
+}
   }
   return rc;
 }
-- 
2.11.0





--
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
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel


Re: [devel] [PATCH 1/1] amfnd: retry on ERR_NOT_EXIST [#2490]

2017-06-22 Thread Gary Lee
Hi

I’m not sure why AMFND isn’t an applier. Perhaps because the AMF implementation 
was done before IMM. Praveen/Nagu?

Thanks
Gary

-Original Message-
From: A V Mahesh <mahesh.va...@oracle.com>
Organization: Oracle Corporation
Date: Thursday, 22 June 2017 at 6:58 pm
To: <anders.bjornerst...@telia.com>, gary <gary@dektech.com.au>
Cc: <opensaf-devel@lists.sourceforge.net>, <minh.c...@dektech.com.au>
Subject: Re: [devel] [PATCH 1/1] amfnd: retry on ERR_NOT_EXIST [#2490]

Hi Gary,

I am also in sync with Anders, based on my previous understanding of IMM 
implementation (when I was IMM maintainer )
we have a concept called multiple applier, so multiple IMMA can register 
for  a class , so it will easy for AMFND to get notification by 
registering as applier.
In general, it is  application (AMFND) responsibility to make sure that 
object existence before doing Admin operation as if you are triggering a 
requests two different amfnd node.

For now you can take help from Zoran/Hung,  they can provide you quick 
solution , in future (once I sync up with latest IMM code) you can 
expect solution form me as well :)

-AVM

On 6/22/2017 12:18 PM, and...@acm.org wrote:
> Hi,
>
> The imm "can guarantee" that a CCB than has been ack'ed as commited to 
the OM ccb-client (or an OI-applier), has been committed in fevs order  over 
all nodes.
> In particular it means that it has been commited at the node where the 
reply was provided.
> If you send messages between nodes based on that commit, then to ensure 
that a receiver at a remote node receives that mesage in fevs
> order, then you need to use a fevs ordered messaging service, e.g. 
admin-operation.
> Note an admin-operaton request goes over fevs, but the reply does not.
> This means that the receiver of the request will receive the request in 
fevs order.
> But the receiver of the reply is only guaranteed  that a reply is 
returned after the request has ben procesd in fevs order.
>
> /AndersBj
>
>
>> Ursprungligt meddelande
>> Från : gary@dektech.com.au
>> Datum : 2017-06-22 - 07:24 (WEST)
>> Till : mahesh.va...@oracle.com
    >> Kopia : minh.c...@dektech.com.au, opensaf-devel@lists.sourceforge.net
>> Ämne : Re: [devel] [PATCH 1/1] amfnd: retry on ERR_NOT_EXIST [#2490]
>>
>> Hi Mahesh
>>
>> I don’t know of another way to fixing this issue other than what is 
already proposed in this ticket, unless IMM can guarantee that a commit has 
been applied to all nodes.
>>
>> As discussed, the object create and admin op are done on the same node. 
But that may trigger a request to amfnd on another node, where that object may 
not yet exist.
>>
>> Thanks
>> Gary
>>
>> -Original Message-
>> From: A V Mahesh <mahesh.va...@oracle.com>
>> Organization: Oracle Corporation
>> Date: Thursday, 22 June 2017 at 12:32 pm
>> To: gary <gary@dektech.com.au>
>> Cc: praveen malviya <praveen.malv...@oracle.com>, 
<hans.nordeb...@ericsson.com>, Nagendra Kumar <nagendr...@oracle.com>, minh 
chau <minh.c...@dektech.com.au>, <opensaf-devel@lists.sourceforge.net>
>> Subject: Re: [devel] [PATCH 1/1] amfnd: retry on ERR_NOT_EXIST [#2490]
>>
>> Hi Gary,
>> 
>> 
>> On 6/21/2017 2:32 PM, Gary Lee wrote:
>> > Hi
>> >
>> > I should have written that amfd acts on the admin op by sending a 
msg to a remote amfnd.
>> Sorry ,I didn't get that  either you asked me question or  you 
informed
>> me alternatively how you are planning to fix,
>> if you asked me a question  can you please elaborate.
>> 
>> -AVM
>> 
>> >
>> > Gary
>> >
>> >> On 21 Jun 2017, at 6:55 pm, A V Mahesh <mahesh.va...@oracle.com> 
wrote:
>> >>
>> >> Hi Gary,
>> >>
>> >>> On 6/21/2017 12:47 PM, Gary Lee wrote:
>> >>> Hi Mahesh
>> >>>
>> >>> The IMM objects and admin op are issued on the same node.
>> >>> AMFD will ‘forward’ the admin op to AMFND on *another* node, 
where sometimes the object is not yet available.
>> >> This explains ,  their is a possibility AMFND on *another* node 
can initiated admin op earlier than the IMM object sync
>> >> why b

Re: [devel] [PATCH 1/1] amfnd: retry on ERR_NOT_EXIST [#2490]

2017-06-22 Thread A V Mahesh

Hi Gary,

I am also in sync with Anders, based on my previous understanding of IMM 
implementation (when I was IMM maintainer )
we have a concept called multiple applier, so multiple IMMA can register 
for  a class , so it will easy for AMFND to get notification by 
registering as applier.
In general, it is  application (AMFND) responsibility to make sure that 
object existence before doing Admin operation as if you are triggering a 
requests two different amfnd node.


For now you can take help from Zoran/Hung,  they can provide you quick 
solution , in future (once I sync up with latest IMM code) you can 
expect solution form me as well :)


-AVM

On 6/22/2017 12:18 PM, and...@acm.org wrote:

Hi,

The imm "can guarantee" that a CCB than has been ack'ed as commited to the OM 
ccb-client (or an OI-applier), has been committed in fevs order  over all nodes.
In particular it means that it has been commited at the node where the reply 
was provided.
If you send messages between nodes based on that commit, then to ensure that a 
receiver at a remote node receives that mesage in fevs
order, then you need to use a fevs ordered messaging service, e.g. 
admin-operation.
Note an admin-operaton request goes over fevs, but the reply does not.
This means that the receiver of the request will receive the request in fevs 
order.
But the receiver of the reply is only guaranteed  that a reply is returned 
after the request has ben procesd in fevs order.

/AndersBj



Ursprungligt meddelande
Från : gary@dektech.com.au
Datum : 2017-06-22 - 07:24 (WEST)
Till : mahesh.va...@oracle.com
Kopia : minh.c...@dektech.com.au, opensaf-devel@lists.sourceforge.net
Ämne : Re: [devel] [PATCH 1/1] amfnd: retry on ERR_NOT_EXIST [#2490]

Hi Mahesh

I don’t know of another way to fixing this issue other than what is already 
proposed in this ticket, unless IMM can guarantee that a commit has been 
applied to all nodes.

As discussed, the object create and admin op are done on the same node. But 
that may trigger a request to amfnd on another node, where that object may not 
yet exist.

Thanks
Gary

-Original Message-
From: A V Mahesh <mahesh.va...@oracle.com>
Organization: Oracle Corporation
Date: Thursday, 22 June 2017 at 12:32 pm
To: gary <gary@dektech.com.au>
Cc: praveen malviya <praveen.malv...@oracle.com>, <hans.nordeb...@ericsson.com>, Nagendra Kumar 
<nagendr...@oracle.com>, minh chau <minh.c...@dektech.com.au>, 
<opensaf-devel@lists.sourceforge.net>
Subject: Re: [devel] [PATCH 1/1] amfnd: retry on ERR_NOT_EXIST [#2490]

Hi Gary,


On 6/21/2017 2:32 PM, Gary Lee wrote:

> Hi
>
> I should have written that amfd acts on the admin op by sending a msg to 
a remote amfnd.
Sorry ,I didn't get that  either you asked me question or  you informed
me alternatively how you are planning to fix,
if you asked me a question  can you please elaborate.

-AVM

>

> Gary
>
>> On 21 Jun 2017, at 6:55 pm, A V Mahesh <mahesh.va...@oracle.com> wrote:
>>
>> Hi Gary,
>>
>>> On 6/21/2017 12:47 PM, Gary Lee wrote:
>>> Hi Mahesh
>>>
>>> The IMM objects and admin op are issued on the same node.
>>> AMFD will ‘forward’ the admin op to AMFND on *another* node, where 
sometimes the object is not yet available.
>> This explains ,  their is a possibility AMFND on *another* node can 
initiated admin op earlier than the IMM object sync
>> why because AMF messages are having higher priority (MDS).
>>
>> Can you please explore option of both object create & admin operation 
can occur on same AMFND node ( not ‘forwarding’ )
>>
>> -AVM
>>> Thanks
>>> Gary
>>>
>>> On 21/6/17, 5:14 pm, "A V Mahesh" <mahesh.va...@oracle.com> wrote:
>>>
>>>  Hi Pravee/Gary,
>>>On 6/21/2017 12:13 PM, praveen malviya wrote:
>>>  > Hi Gary,
>>>  >
>>>  > Is there any ticket in IMM for any related issue?
>>>  > Both creation of SU and admin operation on it will go through 
IMM only.
>>>  > I do not know how IMM handles it and how IMM spec talks about it.
>>>   [AVM] Even we have problem of newly created IMM object is 
taking some
>>>  time to be available on other nodes
>>>   it will be a implementation problem and it is not 
related
>>>  to IMM specification .
>>>   > Does IMM spec allow admin operation on a entity for which 
all synced
>>>  > IMMNDS (leaving non synced IMMNDS on the nodes joining the 
cl

Re: [devel] [PATCH 1/1] amfnd: retry on ERR_NOT_EXIST [#2490]

2017-06-22 Thread Gary Lee
Hi Mahesh

I don’t know of another way to fixing this issue other than what is already 
proposed in this ticket, unless IMM can guarantee that a commit has been 
applied to all nodes.

As discussed, the object create and admin op are done on the same node. But 
that may trigger a request to amfnd on another node, where that object may not 
yet exist.

Thanks
Gary

-Original Message-
From: A V Mahesh <mahesh.va...@oracle.com>
Organization: Oracle Corporation
Date: Thursday, 22 June 2017 at 12:32 pm
To: gary <gary@dektech.com.au>
Cc: praveen malviya <praveen.malv...@oracle.com>, 
<hans.nordeb...@ericsson.com>, Nagendra Kumar <nagendr...@oracle.com>, minh 
chau <minh.c...@dektech.com.au>, <opensaf-devel@lists.sourceforge.net>
Subject: Re: [devel] [PATCH 1/1] amfnd: retry on ERR_NOT_EXIST [#2490]

Hi Gary,


On 6/21/2017 2:32 PM, Gary Lee wrote:
> Hi
>
> I should have written that amfd acts on the admin op by sending a msg to 
a remote amfnd.
Sorry ,I didn't get that  either you asked me question or  you informed  
me alternatively how you are planning to fix,
if you asked me a question  can you please elaborate.

-AVM

>
> Gary
>
>> On 21 Jun 2017, at 6:55 pm, A V Mahesh <mahesh.va...@oracle.com> wrote:
>>
>> Hi Gary,
>>
>>> On 6/21/2017 12:47 PM, Gary Lee wrote:
>>> Hi Mahesh
>>>
>>> The IMM objects and admin op are issued on the same node.
>>> AMFD will ‘forward’ the admin op to AMFND on *another* node, where 
sometimes the object is not yet available.
>> This explains ,  their is a possibility AMFND on *another* node can 
initiated admin op earlier than the IMM object sync
>> why because AMF messages are having higher priority (MDS).
>>
>> Can you please explore option of both object create & admin operation 
can occur on same AMFND node ( not ‘forwarding’ )
>>
>> -AVM
>>> Thanks
>>> Gary
>>>
>>> On 21/6/17, 5:14 pm, "A V Mahesh" <mahesh.va...@oracle.com> wrote:
>>>
>>>  Hi Pravee/Gary,
>>>On 6/21/2017 12:13 PM, praveen malviya wrote:
>>>  > Hi Gary,
>>>  >
>>>  > Is there any ticket in IMM for any related issue?
>>>  > Both creation of SU and admin operation on it will go through 
IMM only.
>>>  > I do not know how IMM handles it and how IMM spec talks about it.
>>>   [AVM] Even we have problem of newly created IMM object is 
taking some
>>>  time to be available on other nodes
>>>   it will be a implementation problem and it is not 
related
>>>  to IMM specification .
>>>   > Does IMM spec allow admin operation on a entity for which 
all synced
>>>  > IMMNDS (leaving non synced IMMNDS on the nodes joining the 
cluster)
>>>  > are not updated?
>>>   [AVM] Again, this is also not related to  IMM specification , 
 if we
>>>  resolve above this  issue will not rise .
>>>   Gary, Is this issue you are facing in case where you are 
creating object
>>>  on one node and   admin operation performed on different node ?
>>>  or on same same node ?
>>>   -AVM
>>>   On 6/21/2017 12:30 PM, Gary Lee wrote:
>>>  > Hi Praveen
>>>  >
>>>  >  From talking with Zoran/Hung, the IMM behaviour is expected and 
correct.
>>>  > I’m not sure about the last question.
>>>  >
>>>  > As you know, in AMFND, the trigger to read from IMM is from an 
AMFD message.
>>>  > The CCB could be committed on the node where active AMFD 
resides, so I guess the admin op would be accepted regardless of the answer to 
your question.
>>>  >
>>>  > Gary
>>>  >
>>>  > On 21/6/17, 4:43 pm, "praveen malviya" 
<praveen.malv...@oracle.com> wrote:
>>>  >
>>>  >  Hi Gary,
>>>  >
>>>  >  Is there any ticket in IMM for any related issue?
>>>  >  Both creation of SU and admin operation on it will go 
through IMM only.
>>>  >  I do not know how IMM handles it and how IMM spec talks 
about it.
>>>  >  Does IMM spec allow admin operation on a entity for which 
all synce

Re: [devel] [PATCH 1/1] amfnd: retry on ERR_NOT_EXIST [#2490]

2017-06-21 Thread Gary Lee
Hi Mahesh

“ Can you please explore option of both object create & admin operation 
can occur on same AMFND node ( not ‘forwarding’ )”

While this is possible, the typical use case for us is users issue commands 
(manipulate IMM objects or admin ops) on an SC.

Gary

-Original Message-
From: A V Mahesh <mahesh.va...@oracle.com>
Organization: Oracle Corporation
Date: Wednesday, 21 June 2017 at 6:55 pm
To: gary <gary@dektech.com.au>, praveen malviya 
<praveen.malv...@oracle.com>, <hans.nordeb...@ericsson.com>, Nagendra Kumar 
<nagendr...@oracle.com>, minh chau <minh.c...@dektech.com.au>
Cc: <opensaf-devel@lists.sourceforge.net>
Subject: Re: [devel] [PATCH 1/1] amfnd: retry on ERR_NOT_EXIST [#2490]

Hi Gary,

On 6/21/2017 12:47 PM, Gary Lee wrote:
> Hi Mahesh
>
> The IMM objects and admin op are issued on the same node.
> AMFD will ‘forward’ the admin op to AMFND on *another* node, where 
sometimes the object is not yet available.

This explains ,  their is a possibility AMFND on *another* node can 
initiated admin op earlier than the IMM object sync
why because AMF messages are having higher priority (MDS).

Can you please explore option of both object create & admin operation 
can occur on same AMFND node ( not ‘forwarding’ )

-AVM
>
> Thanks
> Gary
>
> On 21/6/17, 5:14 pm, "A V Mahesh" <mahesh.va...@oracle.com> wrote:
>
>  Hi Pravee/Gary,
>  
>  
>  On 6/21/2017 12:13 PM, praveen malviya wrote:
>  > Hi Gary,
>  >
>  > Is there any ticket in IMM for any related issue?
>  > Both creation of SU and admin operation on it will go through IMM 
only.
>  > I do not know how IMM handles it and how IMM spec talks about it.
>  
>  [AVM] Even we have problem of newly created IMM object is taking some
>  time to be available on other nodes
>   it will be a implementation problem and it is not 
related
>  to IMM specification .
>  
>  > Does IMM spec allow admin operation on a entity for which all 
synced
>  > IMMNDS (leaving non synced IMMNDS on the nodes joining the cluster)
>  > are not updated?
>  
>  [AVM] Again, this is also not related to  IMM specification ,  if we
>  resolve above this  issue will not rise .
>  
>  Gary, Is this issue you are facing in case where you are creating 
object
>  on one node and   admin operation performed on different node ?
>  or on same same node ?
>  
>  -AVM
>  
>  On 6/21/2017 12:30 PM, Gary Lee wrote:
>  > Hi Praveen
>  >
>  >  From talking with Zoran/Hung, the IMM behaviour is expected and 
correct.
>  > I’m not sure about the last question.
>  >
>  > As you know, in AMFND, the trigger to read from IMM is from an 
AMFD message.
>  > The CCB could be committed on the node where active AMFD resides, 
so I guess the admin op would be accepted regardless of the answer to your 
question.
>  >
>  > Gary
>  >
>  > On 21/6/17, 4:43 pm, "praveen malviya" 
<praveen.malv...@oracle.com> wrote:
>  >
>  >  Hi Gary,
>  >
>  >  Is there any ticket in IMM for any related issue?
>  >  Both creation of SU and admin operation on it will go through 
IMM only.
>  >  I do not know how IMM handles it and how IMM spec talks about 
it.
>  >  Does IMM spec allow admin operation on a entity for which all 
synced
>  >  IMMNDS (leaving non synced IMMNDS on the nodes joining the 
cluster) are
>  >  not updated?
>  >
>  >  Thanks,
>  >  Praveen
>  >
>  >  On 15-Jun-17 1:11 PM, Gary Lee wrote:
>  >  > On a congested network, sometimes a newly created IMM 
object can take some
>  >  > time to be available on other nodes.
>  >  >
>  >  > In our test, a new SU is created on SC-1 and unlocked. But 
sometimes
>  >  > it fails on a remote node due to:
>  >  >
>  >  > 2017-05-19 13:55:19 SC-2 osafamfnd[258]: ER 
amf_saImmOmSearchInitialize_o2 failed: 12
>  >  >
>  >  > To get around this, we will retry on SA_AIS_ERR_NOT_EXIST a 
few times.
>  >  > ---
>

Re: [devel] [PATCH 1/1] amfnd: retry on ERR_NOT_EXIST [#2490]

2017-06-21 Thread Gary Lee
Hi

I should have written that amfd acts on the admin op by sending a msg to a 
remote amfnd.

Gary

> On 21 Jun 2017, at 6:55 pm, A V Mahesh  wrote:
> 
> Hi Gary,
> 
>> On 6/21/2017 12:47 PM, Gary Lee wrote:
>> Hi Mahesh
>> 
>> The IMM objects and admin op are issued on the same node.
>> AMFD will ‘forward’ the admin op to AMFND on *another* node, where sometimes 
>> the object is not yet available.
> 
> This explains ,  their is a possibility AMFND on *another* node can initiated 
> admin op earlier than the IMM object sync
> why because AMF messages are having higher priority (MDS).
> 
> Can you please explore option of both object create & admin operation can 
> occur on same AMFND node ( not ‘forwarding’ )
> 
> -AVM
>> 
>> Thanks
>> Gary
>> 
>> On 21/6/17, 5:14 pm, "A V Mahesh"  wrote:
>> 
>> Hi Pravee/Gary,
>>   On 6/21/2017 12:13 PM, praveen malviya wrote:
>> > Hi Gary,
>> >
>> > Is there any ticket in IMM for any related issue?
>> > Both creation of SU and admin operation on it will go through IMM only.
>> > I do not know how IMM handles it and how IMM spec talks about it.
>>  [AVM] Even we have problem of newly created IMM object is taking 
>> some
>> time to be available on other nodes
>>  it will be a implementation problem and it is not related
>> to IMM specification .
>>  > Does IMM spec allow admin operation on a entity for which all 
>> synced
>> > IMMNDS (leaving non synced IMMNDS on the nodes joining the cluster)
>> > are not updated?
>>  [AVM] Again, this is also not related to  IMM specification ,  if we
>> resolve above this  issue will not rise .
>>  Gary, Is this issue you are facing in case where you are creating 
>> object
>> on one node and   admin operation performed on different node ?
>> or on same same node ?
>>  -AVM
>>  On 6/21/2017 12:30 PM, Gary Lee wrote:
>> > Hi Praveen
>> >
>> >  From talking with Zoran/Hung, the IMM behaviour is expected and 
>> correct.
>> > I’m not sure about the last question.
>> >
>> > As you know, in AMFND, the trigger to read from IMM is from an AMFD 
>> message.
>> > The CCB could be committed on the node where active AMFD resides, so I 
>> guess the admin op would be accepted regardless of the answer to your 
>> question.
>> >
>> > Gary
>> >
>> > On 21/6/17, 4:43 pm, "praveen malviya"  
>> wrote:
>> >
>> >  Hi Gary,
>> >
>> >  Is there any ticket in IMM for any related issue?
>> >  Both creation of SU and admin operation on it will go through IMM 
>> only.
>> >  I do not know how IMM handles it and how IMM spec talks about it.
>> >  Does IMM spec allow admin operation on a entity for which all 
>> synced
>> >  IMMNDS (leaving non synced IMMNDS on the nodes joining the 
>> cluster) are
>> >  not updated?
>> >
>> >  Thanks,
>> >  Praveen
>> >
>> >  On 15-Jun-17 1:11 PM, Gary Lee wrote:
>> >  > On a congested network, sometimes a newly created IMM object 
>> can take some
>> >  > time to be available on other nodes.
>> >  >
>> >  > In our test, a new SU is created on SC-1 and unlocked. But 
>> sometimes
>> >  > it fails on a remote node due to:
>> >  >
>> >  > 2017-05-19 13:55:19 SC-2 osafamfnd[258]: ER 
>> amf_saImmOmSearchInitialize_o2 failed: 12
>> >  >
>> >  > To get around this, we will retry on SA_AIS_ERR_NOT_EXIST a few 
>> times.
>> >  > ---
>> >  >   src/amf/amfnd/util.cc | 15 +++
>> >  >   1 file changed, 15 insertions(+)
>> >  >
>> >  > diff --git a/src/amf/amfnd/util.cc b/src/amf/amfnd/util.cc
>> >  > index ed0905ce2..bca642eac 100644
>> >  > --- a/src/amf/amfnd/util.cc
>> >  > +++ b/src/amf/amfnd/util.cc
>> >  > @@ -38,6 +38,9 @@
>> >  >   #include 
>> >  >   #include "osaf/configmake.h"
>> >  >   #include "amf/amfnd/avnd.h"
>> >  > +#include "base/osaf_time.h"
>> >  > +
>> >  > +extern struct ImmutilWrapperProfile immutilWrapperProfile;
>> >  >
>> >  >   const char *presence_state[] = {
>> >  >   "OUT_OF_RANGE", "UNINSTANTIATED", 
>> "INSTANTIATING",
>> >  > @@ -335,6 +338,18 @@ SaAisErrorT amf_saImmOmSearchInitialize_o2(
>> >  > scope, 
>> searchOptions, searchParam,
>> >  > attributeNames, 
>> );
>> >  >   }
>> >  > +  } else if (rc == SA_AIS_ERR_NOT_EXIST) {
>> >  > +// it is possible for 'rootName' to be not yet available
>> >  > +// at the local immnd. Retry a few times to allow CCB to 

Re: [devel] [PATCH 1/1] amfnd: retry on ERR_NOT_EXIST [#2490]

2017-06-21 Thread A V Mahesh

Hi Gary,

On 6/21/2017 12:47 PM, Gary Lee wrote:

Hi Mahesh

The IMM objects and admin op are issued on the same node.
AMFD will ‘forward’ the admin op to AMFND on *another* node, where sometimes 
the object is not yet available.


This explains ,  their is a possibility AMFND on *another* node can 
initiated admin op earlier than the IMM object sync

why because AMF messages are having higher priority (MDS).

Can you please explore option of both object create & admin operation 
can occur on same AMFND node ( not ‘forwarding’ )


-AVM


Thanks
Gary

On 21/6/17, 5:14 pm, "A V Mahesh"  wrote:

 Hi Pravee/Gary,
 
 
 On 6/21/2017 12:13 PM, praveen malviya wrote:

 > Hi Gary,
 >
 > Is there any ticket in IMM for any related issue?
 > Both creation of SU and admin operation on it will go through IMM only.
 > I do not know how IMM handles it and how IMM spec talks about it.
 
 [AVM] Even we have problem of newly created IMM object is taking some

 time to be available on other nodes
  it will be a implementation problem and it is not related
 to IMM specification .
 
 > Does IMM spec allow admin operation on a entity for which all synced

 > IMMNDS (leaving non synced IMMNDS on the nodes joining the cluster)
 > are not updated?
 
 [AVM] Again, this is also not related to  IMM specification ,  if we

 resolve above this  issue will not rise .
 
 Gary, Is this issue you are facing in case where you are creating object

 on one node and   admin operation performed on different node ?
 or on same same node ?
 
 -AVM
 
 On 6/21/2017 12:30 PM, Gary Lee wrote:

 > Hi Praveen
 >
 >  From talking with Zoran/Hung, the IMM behaviour is expected and correct.
 > I’m not sure about the last question.
 >
 > As you know, in AMFND, the trigger to read from IMM is from an AMFD 
message.
 > The CCB could be committed on the node where active AMFD resides, so I 
guess the admin op would be accepted regardless of the answer to your question.
 >
 > Gary
 >
 > On 21/6/17, 4:43 pm, "praveen malviya"  
wrote:
 >
 >  Hi Gary,
 >
 >  Is there any ticket in IMM for any related issue?
 >  Both creation of SU and admin operation on it will go through IMM 
only.
 >  I do not know how IMM handles it and how IMM spec talks about it.
 >  Does IMM spec allow admin operation on a entity for which all synced
 >  IMMNDS (leaving non synced IMMNDS on the nodes joining the cluster) 
are
 >  not updated?
 >
 >  Thanks,
 >  Praveen
 >
 >  On 15-Jun-17 1:11 PM, Gary Lee wrote:
 >  > On a congested network, sometimes a newly created IMM object can 
take some
 >  > time to be available on other nodes.
 >  >
 >  > In our test, a new SU is created on SC-1 and unlocked. But 
sometimes
 >  > it fails on a remote node due to:
 >  >
 >  > 2017-05-19 13:55:19 SC-2 osafamfnd[258]: ER 
amf_saImmOmSearchInitialize_o2 failed: 12
 >  >
 >  > To get around this, we will retry on SA_AIS_ERR_NOT_EXIST a few 
times.
 >  > ---
 >  >   src/amf/amfnd/util.cc | 15 +++
 >  >   1 file changed, 15 insertions(+)
 >  >
 >  > diff --git a/src/amf/amfnd/util.cc b/src/amf/amfnd/util.cc
 >  > index ed0905ce2..bca642eac 100644
 >  > --- a/src/amf/amfnd/util.cc
 >  > +++ b/src/amf/amfnd/util.cc
 >  > @@ -38,6 +38,9 @@
 >  >   #include 
 >  >   #include "osaf/configmake.h"
 >  >   #include "amf/amfnd/avnd.h"
 >  > +#include "base/osaf_time.h"
 >  > +
 >  > +extern struct ImmutilWrapperProfile immutilWrapperProfile;
 >  >
 >  >   const char *presence_state[] = {
 >  >   "OUT_OF_RANGE", "UNINSTANTIATED", 
"INSTANTIATING",
 >  > @@ -335,6 +338,18 @@ SaAisErrorT amf_saImmOmSearchInitialize_o2(
 >  > scope, 
searchOptions, searchParam,
 >  > attributeNames, 
);
 >  >   }
 >  > +  } else if (rc == SA_AIS_ERR_NOT_EXIST) {
 >  > +// it is possible for 'rootName' to be not yet available
 >  > +// at the local immnd. Retry a few times to allow CCB to be 
propagated.
 >  > +unsigned int nTries = 1;
 >  > +while (rc == SA_AIS_ERR_NOT_EXIST &&
 >  > +  nTries < immutilWrapperProfile.nTries) {
 >  > +  osaf_nanosleep();
 >  > +  rc = immutil_saImmOmSearchInitialize_o2(immHandle, 
rootName.c_str(),
 >  > +scope, searchOptions, searchParam,
 >  > +attributeNames, );
 >  > +  nTries++;

Re: [devel] [PATCH 1/1] amfnd: retry on ERR_NOT_EXIST [#2490]

2017-06-21 Thread Gary Lee
Hi Mahesh

The IMM objects and admin op are issued on the same node.
AMFD will ‘forward’ the admin op to AMFND on *another* node, where sometimes 
the object is not yet available.

Thanks
Gary

On 21/6/17, 5:14 pm, "A V Mahesh"  wrote:

Hi Pravee/Gary,


On 6/21/2017 12:13 PM, praveen malviya wrote:
> Hi Gary,
>
> Is there any ticket in IMM for any related issue?
> Both creation of SU and admin operation on it will go through IMM only.
> I do not know how IMM handles it and how IMM spec talks about it.

[AVM] Even we have problem of newly created IMM object is taking some 
time to be available on other nodes
 it will be a implementation problem and it is not related 
to IMM specification .

> Does IMM spec allow admin operation on a entity for which all synced 
> IMMNDS (leaving non synced IMMNDS on the nodes joining the cluster) 
> are not updated?

[AVM] Again, this is also not related to  IMM specification ,  if we 
resolve above this  issue will not rise .

Gary, Is this issue you are facing in case where you are creating object 
on one node and   admin operation performed on different node ?
or on same same node ?

-AVM

On 6/21/2017 12:30 PM, Gary Lee wrote:
> Hi Praveen
>
>  From talking with Zoran/Hung, the IMM behaviour is expected and correct.
> I’m not sure about the last question.
>
> As you know, in AMFND, the trigger to read from IMM is from an AMFD 
message.
> The CCB could be committed on the node where active AMFD resides, so I 
guess the admin op would be accepted regardless of the answer to your question.
>
> Gary
>
> On 21/6/17, 4:43 pm, "praveen malviya"  wrote:
>
>  Hi Gary,
>  
>  Is there any ticket in IMM for any related issue?
>  Both creation of SU and admin operation on it will go through IMM 
only.
>  I do not know how IMM handles it and how IMM spec talks about it.
>  Does IMM spec allow admin operation on a entity for which all synced
>  IMMNDS (leaving non synced IMMNDS on the nodes joining the cluster) 
are
>  not updated?
>  
>  Thanks,
>  Praveen
>  
>  On 15-Jun-17 1:11 PM, Gary Lee wrote:
>  > On a congested network, sometimes a newly created IMM object can 
take some
>  > time to be available on other nodes.
>  >
>  > In our test, a new SU is created on SC-1 and unlocked. But 
sometimes
>  > it fails on a remote node due to:
>  >
>  > 2017-05-19 13:55:19 SC-2 osafamfnd[258]: ER 
amf_saImmOmSearchInitialize_o2 failed: 12
>  >
>  > To get around this, we will retry on SA_AIS_ERR_NOT_EXIST a few 
times.
>  > ---
>  >   src/amf/amfnd/util.cc | 15 +++
>  >   1 file changed, 15 insertions(+)
>  >
>  > diff --git a/src/amf/amfnd/util.cc b/src/amf/amfnd/util.cc
>  > index ed0905ce2..bca642eac 100644
>  > --- a/src/amf/amfnd/util.cc
>  > +++ b/src/amf/amfnd/util.cc
>  > @@ -38,6 +38,9 @@
>  >   #include 
>  >   #include "osaf/configmake.h"
>  >   #include "amf/amfnd/avnd.h"
>  > +#include "base/osaf_time.h"
>  > +
>  > +extern struct ImmutilWrapperProfile immutilWrapperProfile;
>  >
>  >   const char *presence_state[] = {
>  >   "OUT_OF_RANGE", "UNINSTANTIATED", 
"INSTANTIATING",
>  > @@ -335,6 +338,18 @@ SaAisErrorT amf_saImmOmSearchInitialize_o2(
>  > scope, 
searchOptions, searchParam,
>  > attributeNames, 
);
>  >   }
>  > +  } else if (rc == SA_AIS_ERR_NOT_EXIST) {
>  > +// it is possible for 'rootName' to be not yet available
>  > +// at the local immnd. Retry a few times to allow CCB to be 
propagated.
>  > +unsigned int nTries = 1;
>  > +while (rc == SA_AIS_ERR_NOT_EXIST &&
>  > +  nTries < immutilWrapperProfile.nTries) {
>  > +  osaf_nanosleep();
>  > +  rc = immutil_saImmOmSearchInitialize_o2(immHandle, 
rootName.c_str(),
>  > +scope, searchOptions, searchParam,
>  > +attributeNames, );
>  > +  nTries++;
>  > +}
>  > }
>  > return rc;
>  >   }
>  >
>  
>
>
>
> 
--
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! 

Re: [devel] [PATCH 1/1] amfnd: retry on ERR_NOT_EXIST [#2490]

2017-06-21 Thread A V Mahesh

Hi Pravee/Gary,


On 6/21/2017 12:13 PM, praveen malviya wrote:

Hi Gary,

Is there any ticket in IMM for any related issue?
Both creation of SU and admin operation on it will go through IMM only.
I do not know how IMM handles it and how IMM spec talks about it.


[AVM] Even we have problem of newly created IMM object is taking some 
time to be available on other nodes
it will be a implementation problem and it is not related 
to IMM specification .


Does IMM spec allow admin operation on a entity for which all synced 
IMMNDS (leaving non synced IMMNDS on the nodes joining the cluster) 
are not updated?


[AVM] Again, this is also not related to  IMM specification ,  if we 
resolve above this  issue will not rise .


Gary, Is this issue you are facing in case where you are creating object 
on one node and   admin operation performed on different node ?

or on same same node ?

-AVM

On 6/21/2017 12:30 PM, Gary Lee wrote:

Hi Praveen

 From talking with Zoran/Hung, the IMM behaviour is expected and correct.
I’m not sure about the last question.

As you know, in AMFND, the trigger to read from IMM is from an AMFD message.
The CCB could be committed on the node where active AMFD resides, so I guess 
the admin op would be accepted regardless of the answer to your question.

Gary

On 21/6/17, 4:43 pm, "praveen malviya"  wrote:

 Hi Gary,
 
 Is there any ticket in IMM for any related issue?

 Both creation of SU and admin operation on it will go through IMM only.
 I do not know how IMM handles it and how IMM spec talks about it.
 Does IMM spec allow admin operation on a entity for which all synced
 IMMNDS (leaving non synced IMMNDS on the nodes joining the cluster) are
 not updated?
 
 Thanks,

 Praveen
 
 On 15-Jun-17 1:11 PM, Gary Lee wrote:

 > On a congested network, sometimes a newly created IMM object can take 
some
 > time to be available on other nodes.
 >
 > In our test, a new SU is created on SC-1 and unlocked. But sometimes
 > it fails on a remote node due to:
 >
 > 2017-05-19 13:55:19 SC-2 osafamfnd[258]: ER 
amf_saImmOmSearchInitialize_o2 failed: 12
 >
 > To get around this, we will retry on SA_AIS_ERR_NOT_EXIST a few times.
 > ---
 >   src/amf/amfnd/util.cc | 15 +++
 >   1 file changed, 15 insertions(+)
 >
 > diff --git a/src/amf/amfnd/util.cc b/src/amf/amfnd/util.cc
 > index ed0905ce2..bca642eac 100644
 > --- a/src/amf/amfnd/util.cc
 > +++ b/src/amf/amfnd/util.cc
 > @@ -38,6 +38,9 @@
 >   #include 
 >   #include "osaf/configmake.h"
 >   #include "amf/amfnd/avnd.h"
 > +#include "base/osaf_time.h"
 > +
 > +extern struct ImmutilWrapperProfile immutilWrapperProfile;
 >
 >   const char *presence_state[] = {
 >   "OUT_OF_RANGE", "UNINSTANTIATED", "INSTANTIATING",
 > @@ -335,6 +338,18 @@ SaAisErrorT amf_saImmOmSearchInitialize_o2(
 > scope, searchOptions, 
searchParam,
 > attributeNames, 
);
 >   }
 > +  } else if (rc == SA_AIS_ERR_NOT_EXIST) {
 > +// it is possible for 'rootName' to be not yet available
 > +// at the local immnd. Retry a few times to allow CCB to be 
propagated.
 > +unsigned int nTries = 1;
 > +while (rc == SA_AIS_ERR_NOT_EXIST &&
 > +  nTries < immutilWrapperProfile.nTries) {
 > +  osaf_nanosleep();
 > +  rc = immutil_saImmOmSearchInitialize_o2(immHandle, 
rootName.c_str(),
 > +scope, searchOptions, searchParam,
 > +attributeNames, );
 > +  nTries++;
 > +}
 > }
 > return rc;
 >   }
 >
 




--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! 
https://urldefense.proofpoint.com/v2/url?u=http-3A__sdm.link_slashdot=DwIGaQ=RoP1YumCXCgaWHvlZYR8PQcxBKCX5YTpkKY057SbK10=Ua8D9LRbRt6_3fFyQghU61tppZpWmDKj9QGctDqRYQQ=3lVa-ymN89sIVfvS57TSd0edM74_gBo3GkkdaSxuTCA=WL9nnf9tO-B21XeTvgltME0cARW6eq0IpDLuJQocH_k=
___
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.sourceforge.net_lists_listinfo_opensaf-2Ddevel=DwIGaQ=RoP1YumCXCgaWHvlZYR8PQcxBKCX5YTpkKY057SbK10=Ua8D9LRbRt6_3fFyQghU61tppZpWmDKj9QGctDqRYQQ=3lVa-ymN89sIVfvS57TSd0edM74_gBo3GkkdaSxuTCA=5AyrQ2cwgH0HW6VfyB4nxYnHjDz-L_xk5n3HjZmw350=



--
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
Opensaf-devel@lists.sourceforge.net

Re: [devel] [PATCH 1/1] amfnd: retry on ERR_NOT_EXIST [#2490]

2017-06-21 Thread Gary Lee
Hi Praveen

From talking with Zoran/Hung, the IMM behaviour is expected and correct.
I’m not sure about the last question.

As you know, in AMFND, the trigger to read from IMM is from an AMFD message.
The CCB could be committed on the node where active AMFD resides, so I guess 
the admin op would be accepted regardless of the answer to your question.

Gary

On 21/6/17, 4:43 pm, "praveen malviya"  wrote:

Hi Gary,

Is there any ticket in IMM for any related issue?
Both creation of SU and admin operation on it will go through IMM only.
I do not know how IMM handles it and how IMM spec talks about it.
Does IMM spec allow admin operation on a entity for which all synced 
IMMNDS (leaving non synced IMMNDS on the nodes joining the cluster) are 
not updated?

Thanks,
Praveen

On 15-Jun-17 1:11 PM, Gary Lee wrote:
> On a congested network, sometimes a newly created IMM object can take some
> time to be available on other nodes.
> 
> In our test, a new SU is created on SC-1 and unlocked. But sometimes
> it fails on a remote node due to:
> 
> 2017-05-19 13:55:19 SC-2 osafamfnd[258]: ER 
amf_saImmOmSearchInitialize_o2 failed: 12
> 
> To get around this, we will retry on SA_AIS_ERR_NOT_EXIST a few times.
> ---
>   src/amf/amfnd/util.cc | 15 +++
>   1 file changed, 15 insertions(+)
> 
> diff --git a/src/amf/amfnd/util.cc b/src/amf/amfnd/util.cc
> index ed0905ce2..bca642eac 100644
> --- a/src/amf/amfnd/util.cc
> +++ b/src/amf/amfnd/util.cc
> @@ -38,6 +38,9 @@
>   #include 
>   #include "osaf/configmake.h"
>   #include "amf/amfnd/avnd.h"
> +#include "base/osaf_time.h"
> +
> +extern struct ImmutilWrapperProfile immutilWrapperProfile;
>   
>   const char *presence_state[] = {
>   "OUT_OF_RANGE", "UNINSTANTIATED", "INSTANTIATING",
> @@ -335,6 +338,18 @@ SaAisErrorT amf_saImmOmSearchInitialize_o2(
> scope, searchOptions, 
searchParam,
> attributeNames, 
);
>   }
> +  } else if (rc == SA_AIS_ERR_NOT_EXIST) {
> +// it is possible for 'rootName' to be not yet available
> +// at the local immnd. Retry a few times to allow CCB to be 
propagated.
> +unsigned int nTries = 1;
> +while (rc == SA_AIS_ERR_NOT_EXIST &&
> +  nTries < immutilWrapperProfile.nTries) {
> +  osaf_nanosleep();
> +  rc = immutil_saImmOmSearchInitialize_o2(immHandle, 
rootName.c_str(),
> +scope, searchOptions, searchParam,
> +attributeNames, );
> +  nTries++;
> +}
> }
> return rc;
>   }
> 




--
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
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel


Re: [devel] [PATCH 1/1] amfnd: retry on ERR_NOT_EXIST [#2490]

2017-06-21 Thread praveen malviya

Hi Gary,

Is there any ticket in IMM for any related issue?
Both creation of SU and admin operation on it will go through IMM only.
I do not know how IMM handles it and how IMM spec talks about it.
Does IMM spec allow admin operation on a entity for which all synced 
IMMNDS (leaving non synced IMMNDS on the nodes joining the cluster) are 
not updated?


Thanks,
Praveen

On 15-Jun-17 1:11 PM, Gary Lee wrote:

On a congested network, sometimes a newly created IMM object can take some
time to be available on other nodes.

In our test, a new SU is created on SC-1 and unlocked. But sometimes
it fails on a remote node due to:

2017-05-19 13:55:19 SC-2 osafamfnd[258]: ER amf_saImmOmSearchInitialize_o2 
failed: 12

To get around this, we will retry on SA_AIS_ERR_NOT_EXIST a few times.
---
  src/amf/amfnd/util.cc | 15 +++
  1 file changed, 15 insertions(+)

diff --git a/src/amf/amfnd/util.cc b/src/amf/amfnd/util.cc
index ed0905ce2..bca642eac 100644
--- a/src/amf/amfnd/util.cc
+++ b/src/amf/amfnd/util.cc
@@ -38,6 +38,9 @@
  #include 
  #include "osaf/configmake.h"
  #include "amf/amfnd/avnd.h"
+#include "base/osaf_time.h"
+
+extern struct ImmutilWrapperProfile immutilWrapperProfile;
  
  const char *presence_state[] = {

  "OUT_OF_RANGE", "UNINSTANTIATED", "INSTANTIATING",
@@ -335,6 +338,18 @@ SaAisErrorT amf_saImmOmSearchInitialize_o2(
scope, searchOptions, 
searchParam,
attributeNames, );
  }
+  } else if (rc == SA_AIS_ERR_NOT_EXIST) {
+// it is possible for 'rootName' to be not yet available
+// at the local immnd. Retry a few times to allow CCB to be propagated.
+unsigned int nTries = 1;
+while (rc == SA_AIS_ERR_NOT_EXIST &&
+  nTries < immutilWrapperProfile.nTries) {
+  osaf_nanosleep();
+  rc = immutil_saImmOmSearchInitialize_o2(immHandle, rootName.c_str(),
+scope, searchOptions, searchParam,
+attributeNames, );
+  nTries++;
+}
}
return rc;
  }



--
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
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel