Re: [devel] [PATCH 6 of 8] cpsv: Apply new messages supporting extended SaNameT to CPD, CPND, and CPA v1 [#1574]

2016-08-16 Thread Vo Minh Hoang
Dear Mahesh,

Thank you very much for your clarifying.
When other service did also, I will update and provide patch that don't use
new messages.

Thank you and best regards,
Hoang


-Original Message-
From: A V Mahesh [mailto:mahesh.va...@oracle.com] 
Sent: Tuesday, August 16, 2016 11:29 AM
To: Vo Minh Hoang 
Cc: opensaf-devel@lists.sourceforge.net
Subject: Re: [PATCH 6 of 8] cpsv: Apply new messages supporting extended
SaNameT to CPD, CPND, and CPA v1 [#1574]

Hi Hoang,

Please find my responses as [AVM].

-AVM

On 8/15/2016 8:16 AM, Vo Minh Hoang wrote:
> Dear Mahesh,
>
> Thank you very much for your review.
> I would like to answer to your concern.
>
> The solution of adding new messages instead of updating old one mostly 
> because Long DN function has been working in current system (other 
> modules already support long DN).
[AVM]  Long DN  is being introduced in this release in all services
opensaf-5.1.x , so Opensaf rule is that any newly introduce
enhancement/feature functionality can be used once Cluster is completely
upgraded to new version ( all nodes with opensaf-5.1.x )  , so while
upgrading (in-service ) the  SA_ENABLE_EXTENDED_NAMES  will be false , so
their is no way that other modules already support long DN.
So their is not possibility  of  Creating New Long DN  checkpoint while
Upgrading.

>   So if we do not handle this, there are cases that CKPT is in-service 
> update in Long DN enabling nodes and run with Long DN function 
> immediately (Old checkpoint still short DN when previous CKPT version 
> does not support Long DN, just other service) and new updated CKPT 
> will send same message with different format to old CKPT cause 
> strangle behavior.
[AVM]  Accommodating existing checkpoint with Short DN  on newly
upgrading/upgraded  cluster checkpoint code  logic will be the aim of this
path ( please remember while upgrading SA_ENABLE_EXTENDED_NAMES  will be
false). The new logic Long DN variables is higher and will all ways
accommodate Short DN existing checkpoint information.

This patch case we don't need to handle message that will come  LONG DN ,
this path only need to take care of accommodating the existing short DN name
checkpoint names in a new data structures locally.

General comment : Even for each case of supporting servicemen upgrade, if we
were go on adding new event , by this time
opensaf might be having thousands of new event ,you can find some  
old patches of that handle in-service upgrade with out adding new event.

-AVM

> Please consider about it.
>
> Thank you and best regards,
> Hoang
>
>
> -Original Message-
> From: A V Mahesh [mailto:mahesh.va...@oracle.com]
> Sent: Friday, August 12, 2016 12:49 PM
> To: Hoang Vo 
> Cc: opensaf-devel@lists.sourceforge.net
> Subject: Re: [PATCH 6 of 8] cpsv: Apply new messages supporting 
> extended SaNameT to CPD, CPND, and CPA v1 [#1574]
>
> Hi Hoang,
>
> We don't required any new event like CPND_EVT_D2ND_CKPT_CREATE_2 even 
> though NEW CPND might might be sending event to OLD CPD.
>
> In general Opensaf rule is that any newly introduce 
> enhancement/feature functionality can be used once Cluster is 
> completely upgraded to new version.So while upgrading (in-service ) 
> the  SA_ENABLE_EXTENDED_NAMES  will be false  ( longDnsAllowed=0 of 
> opensafImm=opensafImm,safApp=safImmService)
> , once clusters upgraded to new version then only ongDnsAllowed set to 
> 1, ("immcfg -o safImmService -m 
> opensafImm=opensafImm,safApp=safImmService -a
> longDnsAllowed=1") so remove new event merge the content in to a 
> single exist old event , and do additionl functonality  based on the 
> state of
> longDnsAllowed=1 or 0
>
> -AVM
>
> On 7/21/2016 3:04 PM, Hoang Vo wrote:
>>osaf/libs/agents/saf/cpa/cpa_api.c  |  12 +---
>>osaf/libs/agents/saf/cpa/cpa_mds.c  |   2 +-
>>osaf/libs/common/cpsv/cpsv_evt.c|   1 +
>>osaf/services/saf/cpsv/cpd/cpd_evt.c|  10 +++---
>>osaf/services/saf/cpsv/cpd/cpd_mds.c|   3 ++-
>>osaf/services/saf/cpsv/cpd/cpd_proc.c   |   2 +-
>>osaf/services/saf/cpsv/cpnd/cpnd_evt.c  |  26
--
>>osaf/services/saf/cpsv/cpnd/cpnd_mds.c  |   4 ++--
>>osaf/services/saf/cpsv/cpnd/cpnd_proc.c |   6 +++---
>>9 files changed, 42 insertions(+), 24 deletions(-)
>>
>>
>> diff --git a/osaf/libs/agents/saf/cpa/cpa_api.c
> b/osaf/libs/agents/saf/cpa/cpa_api.c
>> --- a/osaf/libs/agents/saf/cpa/cpa_api.c
>> +++ b/osaf/libs/agents/saf/cpa/cpa_api.c
>> @@ -880,6 +880,8 @@ SaAisErrorT saCkptCheckpointOpen(SaCkptH
>>  }
>>
>>  ckpt_name = osaf_extended_name_borrow(checkpointName);
>> +if (strlen(ckpt_name) >= kOsafMaxDnLength)
>> +return SA_AIS_ERR_INVALID_PARAM;
>>
>>  /* SA_AIS_ERR_INVALID_PARAM, bullet 4 in SAI-AIS-CKPT-B.02.02
>>   Section 3.6.1 saCkptCheckpointOpen() and
> saCkptCheckpointOpenAsync(), Return Values */
>> 

Re: [devel] [PATCH 6 of 8] cpsv: Apply new messages supporting extended SaNameT to CPD, CPND, and CPA v1 [#1574]

2016-08-15 Thread A V Mahesh
Hi Hoang,

Please find my responses as [AVM].

-AVM

On 8/15/2016 8:16 AM, Vo Minh Hoang wrote:
> Dear Mahesh,
>
> Thank you very much for your review.
> I would like to answer to your concern.
>
> The solution of adding new messages instead of updating old one mostly
> because Long DN function has been working in current system (other modules
> already support long DN).
[AVM]  Long DN  is being introduced in this release in all services 
opensaf-5.1.x ,
so Opensaf rule is that any newly introduce enhancement/feature
functionality can be used once Cluster is completely upgraded to new
version ( all nodes with opensaf-5.1.x )  , so while upgrading 
(in-service ) the  SA_ENABLE_EXTENDED_NAMES  will
be false , so their is no way that other modules already support long DN.
So their is not possibility  of  Creating New Long DN  checkpoint while 
Upgrading.

>   So if we do not handle this, there are cases that
> CKPT is in-service update in Long DN enabling nodes and run with Long DN
> function immediately (Old checkpoint still short DN when previous CKPT
> version does not support Long DN, just other service) and new updated CKPT
> will send same message with different format to old CKPT cause strangle
> behavior.
[AVM]  Accommodating existing checkpoint with Short DN  on newly 
upgrading/upgraded  cluster
checkpoint code  logic will be the aim of this path ( please remember  
while upgrading
SA_ENABLE_EXTENDED_NAMES  will be false). The new logic Long DN 
variables is higher and will
all ways accommodate Short DN existing checkpoint information.

This patch case we don't need to handle message that will come  LONG DN 
, this path only need to take care of
accommodating the existing short DN name checkpoint names in a new data 
structures locally.

General comment : Even for each case of supporting servicemen upgrade, 
if we were go on adding new event , by this time
opensaf might be having thousands of new event ,you can find some  
old patches of that handle in-service upgrade
with out adding new event.

-AVM

> Please consider about it.
>
> Thank you and best regards,
> Hoang
>
>
> -Original Message-
> From: A V Mahesh [mailto:mahesh.va...@oracle.com]
> Sent: Friday, August 12, 2016 12:49 PM
> To: Hoang Vo 
> Cc: opensaf-devel@lists.sourceforge.net
> Subject: Re: [PATCH 6 of 8] cpsv: Apply new messages supporting extended
> SaNameT to CPD, CPND, and CPA v1 [#1574]
>
> Hi Hoang,
>
> We don't required any new event like CPND_EVT_D2ND_CKPT_CREATE_2 even though
> NEW CPND might might be sending event to OLD CPD.
>
> In general Opensaf rule is that any newly introduce enhancement/feature
> functionality can be used once Cluster is completely upgraded to new
> version.So while upgrading (in-service ) the  SA_ENABLE_EXTENDED_NAMES  will
> be false  ( longDnsAllowed=0 of opensafImm=opensafImm,safApp=safImmService)
> , once clusters upgraded to new version then only ongDnsAllowed set to 1,
> ("immcfg -o safImmService -m opensafImm=opensafImm,safApp=safImmService -a
> longDnsAllowed=1") so remove new event merge the content in to a single
> exist old event , and do additionl functonality  based on the state of
> longDnsAllowed=1 or 0
>
> -AVM
>
> On 7/21/2016 3:04 PM, Hoang Vo wrote:
>>osaf/libs/agents/saf/cpa/cpa_api.c  |  12 +---
>>osaf/libs/agents/saf/cpa/cpa_mds.c  |   2 +-
>>osaf/libs/common/cpsv/cpsv_evt.c|   1 +
>>osaf/services/saf/cpsv/cpd/cpd_evt.c|  10 +++---
>>osaf/services/saf/cpsv/cpd/cpd_mds.c|   3 ++-
>>osaf/services/saf/cpsv/cpd/cpd_proc.c   |   2 +-
>>osaf/services/saf/cpsv/cpnd/cpnd_evt.c  |  26 --
>>osaf/services/saf/cpsv/cpnd/cpnd_mds.c  |   4 ++--
>>osaf/services/saf/cpsv/cpnd/cpnd_proc.c |   6 +++---
>>9 files changed, 42 insertions(+), 24 deletions(-)
>>
>>
>> diff --git a/osaf/libs/agents/saf/cpa/cpa_api.c
> b/osaf/libs/agents/saf/cpa/cpa_api.c
>> --- a/osaf/libs/agents/saf/cpa/cpa_api.c
>> +++ b/osaf/libs/agents/saf/cpa/cpa_api.c
>> @@ -880,6 +880,8 @@ SaAisErrorT saCkptCheckpointOpen(SaCkptH
>>  }
>>
>>  ckpt_name = osaf_extended_name_borrow(checkpointName);
>> +if (strlen(ckpt_name) >= kOsafMaxDnLength)
>> +return SA_AIS_ERR_INVALID_PARAM;
>>
>>  /* SA_AIS_ERR_INVALID_PARAM, bullet 4 in SAI-AIS-CKPT-B.02.02
>>   Section 3.6.1 saCkptCheckpointOpen() and
> saCkptCheckpointOpenAsync(), Return Values */
>> @@ -981,7 +983,7 @@ SaAisErrorT saCkptCheckpointOpen(SaCkptH
>>  /* Populate & Send the Open Event to CPND */
>>  memset(, 0, sizeof(CPSV_EVT));
>>  evt.type = CPSV_EVT_TYPE_CPND;
>> -evt.info.cpnd.type = CPND_EVT_A2ND_CKPT_OPEN;
>> +evt.info.cpnd.type = CPND_EVT_A2ND_CKPT_OPEN_2;
>>  evt.info.cpnd.info.openReq.client_hdl = ckptHandle;
>>  evt.info.cpnd.info.openReq.lcl_ckpt_hdl = lc_node->lcl_ckpt_hdl;
>>
>> @@ -1192,6 +1194,8 @@ SaAisErrorT saCkptCheckpointOpenAsync(Sa
>>

Re: [devel] [PATCH 6 of 8] cpsv: Apply new messages supporting extended SaNameT to CPD, CPND, and CPA v1 [#1574]

2016-08-11 Thread A V Mahesh
Hi Hoang,

We don't required any new event like CPND_EVT_D2ND_CKPT_CREATE_2
even though NEW CPND might might be sending event to OLD CPD.

In general Opensaf rule is that any newly introduce enhancement/feature 
functionality can be used
once Cluster is completely upgraded to new  version.So while upgrading 
(in-service )
the  SA_ENABLE_EXTENDED_NAMES  will be false  ( longDnsAllowed=0
of opensafImm=opensafImm,safApp=safImmService)  , once clusters upgraded 
to new version then only
ongDnsAllowed set to 1, ("immcfg -o safImmService -m 
opensafImm=opensafImm,safApp=safImmService -a longDnsAllowed=1")
so remove new event merge the content in to a single  exist old event , 
and do additionl functonality  based on the state of longDnsAllowed=1 or 0

-AVM

On 7/21/2016 3:04 PM, Hoang Vo wrote:
>   osaf/libs/agents/saf/cpa/cpa_api.c  |  12 +---
>   osaf/libs/agents/saf/cpa/cpa_mds.c  |   2 +-
>   osaf/libs/common/cpsv/cpsv_evt.c|   1 +
>   osaf/services/saf/cpsv/cpd/cpd_evt.c|  10 +++---
>   osaf/services/saf/cpsv/cpd/cpd_mds.c|   3 ++-
>   osaf/services/saf/cpsv/cpd/cpd_proc.c   |   2 +-
>   osaf/services/saf/cpsv/cpnd/cpnd_evt.c  |  26 --
>   osaf/services/saf/cpsv/cpnd/cpnd_mds.c  |   4 ++--
>   osaf/services/saf/cpsv/cpnd/cpnd_proc.c |   6 +++---
>   9 files changed, 42 insertions(+), 24 deletions(-)
>
>
> diff --git a/osaf/libs/agents/saf/cpa/cpa_api.c 
> b/osaf/libs/agents/saf/cpa/cpa_api.c
> --- a/osaf/libs/agents/saf/cpa/cpa_api.c
> +++ b/osaf/libs/agents/saf/cpa/cpa_api.c
> @@ -880,6 +880,8 @@ SaAisErrorT saCkptCheckpointOpen(SaCkptH
>   }
>   
>   ckpt_name = osaf_extended_name_borrow(checkpointName);
> + if (strlen(ckpt_name) >= kOsafMaxDnLength)
> + return SA_AIS_ERR_INVALID_PARAM;
>   
>   /* SA_AIS_ERR_INVALID_PARAM, bullet 4 in SAI-AIS-CKPT-B.02.02
>  Section 3.6.1 saCkptCheckpointOpen() and 
> saCkptCheckpointOpenAsync(), Return Values */
> @@ -981,7 +983,7 @@ SaAisErrorT saCkptCheckpointOpen(SaCkptH
>   /* Populate & Send the Open Event to CPND */
>   memset(, 0, sizeof(CPSV_EVT));
>   evt.type = CPSV_EVT_TYPE_CPND;
> - evt.info.cpnd.type = CPND_EVT_A2ND_CKPT_OPEN;
> + evt.info.cpnd.type = CPND_EVT_A2ND_CKPT_OPEN_2;
>   evt.info.cpnd.info.openReq.client_hdl = ckptHandle;
>   evt.info.cpnd.info.openReq.lcl_ckpt_hdl = lc_node->lcl_ckpt_hdl;
>   
> @@ -1192,6 +1194,8 @@ SaAisErrorT saCkptCheckpointOpenAsync(Sa
>   }
>   
>   ckpt_name = osaf_extended_name_borrow(checkpointName);
> + if (strlen(ckpt_name) >= kOsafMaxDnLength)
> + return SA_AIS_ERR_INVALID_PARAM;
>   
>   /* SA_AIS_ERR_INVALID_PARAM, bullet 4 in SAI-AIS-CKPT-B.02.02
>  Section 3.6.1 saCkptCheckpointOpen() and 
> saCkptCheckpointOpenAsync(), Return Values */
> @@ -1277,7 +1281,7 @@ SaAisErrorT saCkptCheckpointOpenAsync(Sa
>   /* Populate & Send the Open Event to CPND */
>   memset(, 0, sizeof(CPSV_EVT));
>   evt.type = CPSV_EVT_TYPE_CPND;
> - evt.info.cpnd.type = CPND_EVT_A2ND_CKPT_OPEN;
> + evt.info.cpnd.type = CPND_EVT_A2ND_CKPT_OPEN_2;
>   evt.info.cpnd.info.openReq.client_hdl = ckptHandle;
>   evt.info.cpnd.info.openReq.lcl_ckpt_hdl = lc_node->lcl_ckpt_hdl;
>   
> @@ -1597,6 +1601,8 @@ SaAisErrorT saCkptCheckpointUnlink(SaCkp
>   }
>   
>   ckpt_name = osaf_extended_name_borrow(checkpointName);
> + if (strlen(ckpt_name) >= kOsafMaxDnLength)
> + return SA_AIS_ERR_INVALID_PARAM;
>   
>   /* retrieve CPA CB */
>   m_CPA_RETRIEVE_CB(cb);
> @@ -1635,7 +1641,7 @@ SaAisErrorT saCkptCheckpointUnlink(SaCkp
>   /* Populate evt.info.cpnd.info.unlinkReq & Call MDS sync Send */
>   memset(, 0, sizeof(CPSV_EVT));
>   evt.type = CPSV_EVT_TYPE_CPND;
> - evt.info.cpnd.type = CPND_EVT_A2ND_CKPT_UNLINK;
> + evt.info.cpnd.type = CPND_EVT_A2ND_CKPT_UNLINK_2;
>   
>   osaf_extended_name_lend(ckpt_name, 
> _name);
>   
> diff --git a/osaf/libs/agents/saf/cpa/cpa_mds.c 
> b/osaf/libs/agents/saf/cpa/cpa_mds.c
> --- a/osaf/libs/agents/saf/cpa/cpa_mds.c
> +++ b/osaf/libs/agents/saf/cpa/cpa_mds.c
> @@ -515,7 +515,7 @@ static uint32_t cpa_mds_svc_evt(CPA_CB *
>  /* Populate & Send the Open Event to CPND */
>  memset(, 0, sizeof(CPSV_EVT));
>  evt.type = CPSV_EVT_TYPE_CPND;
> -evt.info.cpnd.type = CPND_EVT_A2ND_CKPT_LIST_UPDATE;
> +evt.info.cpnd.type = CPND_EVT_A2ND_CKPT_LIST_UPDATE_2;
>  evt.info.cpnd.info.ckptListUpdate.client_hdl = 
> lc_node->cl_hdl;
>  osaf_extended_name_lend(lc_node->ckpt_name, 
> _name);
>   
> diff --git a/osaf/libs/common/cpsv/cpsv_evt.c 
> b/osaf/libs/common/cpsv/cpsv_evt.c
> --- a/osaf/libs/common/cpsv/cpsv_evt.c
> +++ b/osaf/libs/common/cpsv/cpsv_evt.c
> @@ -2414,6 +2414,7 @@ uint32_t cpsv_encode_extended_name(NCS_U
>   if(!osaf_is_an_extended_name(name))
>  

Re: [devel] [PATCH 6 of 8] cpsv: Apply new messages supporting extended SaNameT to CPD, CPND, and CPA v1 [#1574]

2016-08-10 Thread A V Mahesh
Hi Hoan,

I hope the patch  published On 8/2/2016 2:14 PM is the New version  V2

If you are sending new version please update   V1 to V2 , form next time 
on-words

-AVM


On 8/2/2016 2:17 PM, Vo Minh Hoang wrote:
> Dear Mahesh,
>
> I have just submitted the V3 patch fixing source code following your
> comment.
> I also update readme file that is attached to this email.
> Please tell me if you have any further inquiry.
>
> Thank you and best regards,
> Hoang
>
> -Original Message-
> From: A V Mahesh [mailto:mahesh.va...@oracle.com]
> Sent: Friday, July 29, 2016 1:27 PM
> To: Vo Minh Hoang 
> Cc: opensaf-devel@lists.sourceforge.net
> Subject: Re: [PATCH 6 of 8] cpsv: Apply new messages supporting extended
> SaNameT to CPD, CPND, and CPA v1 [#1574]
>
> Hi ,
>
> I have proved some code related minor comment in 4 of 8 , 6 of 8 & 8 of
> 8 , please  address them also in new patch(s).
>
> Reading testing :
>
> On 7/29/2016 7:49 AM, Vo Minh Hoang wrote:
>> We do not have specific test case and environment for in-service update.
>> So my test work is based on osaftest cases.
>>
>> I tested with old d - new nd and new d - old nd cases.
> I started basic testing with  one new Controller  & one old Controller and
> tow Old payload setup.
> I observed some encode/decode issue  by running simple  ` /usr/bin/ckpttest`
>
> Even I was not able to proceed with other testing which not related to LONG
> DN)( continuously receiving SA_AIS_ERR_TRY_AGAIN) Please re-visit the all
> encode & decode function that you have introduced run  the basic testing
> with the above setup running application on ( old nodes/application  and new
> nodes/application )
>
> traces On Old Node ( with out patch )
>
> 
> 
>
> Jul 29 11:34:16 SC-2 osafckptnd[5233]: ER cpnd mds decode failed Jul 29
> 11:34:16 SC-2 osafckptnd[5233]: ER cpnd mds decode failed Jul 29 11:34:26
> SC-2 osafckptnd[5233]: ER cpnd mds decode failed Jul 29 11:34:27 SC-2
> osafckptnd[5233]: ER cpnd mds decode failed Jul 29 11:34:27 SC-2
> osafckptnd[5233]: ER cpnd mds decode failed
>
> 
> ==
>
> Jul 29 11:34:04.216980 osafckptnd [5233:cpnd_mds.c:0225] >>
> cpnd_mds_callback Jul 29 11:34:04.217086 osafckptnd [5233:cpnd_mds.c:0267]
> << cpnd_mds_callback Jul 29 11:34:04.217100 osafckptnd
> [5233:cpnd_mds.c:0225] >> cpnd_mds_callback Jul 29 11:34:04.217129
> osafckptnd [5233:cpnd_mds.c:0729] << cpnd_mds_rcv Jul 29 11:34:04.217175
> osafckptnd [5233:cpnd_mds.c:0267] << cpnd_mds_callback Jul 29
> 11:34:04.217240 osafckptnd [5233:cpsv_evt.c:2219] TR cpnd <<== [9]
> CPSV_EVT_ND2ND_CKPT_SECT_CREATE_REQ(sec_id=0x0B15) from node 0x2010F Jul 29
> 11:34:04.217254 osafckptnd [5233:cpnd_evt.c:2626] >>
> cpnd_evt_proc_nd2nd_ckpt_sect_create
> Jul 29 11:34:04.217264 osafckptnd [5233:cpnd_evt.c:2632] T4 cpnd ckpt node
> get failed for ckpt_id:9 Jul 29 11:34:04.217272 osafckptnd
> [5233:cpnd_mds.c:1004] >> cpnd_mds_send_rsp Jul 29 11:34:04.217282
> osafckptnd [5233:cpsv_evt.c:2213] TR cpnd ==>> [0]
> CPSV_EVT_ND2ND_CKPT_SECT_ACTIVE_CREATE_RSP(err=6) to node 0x2010F Jul 29
> 11:34:04.217301 osafckptnd [5233:cpnd_mds.c:0225] >> cpnd_mds_callback Jul
> 29 11:34:04.217310 osafckptnd [5233:cpnd_mds.c:0291] >> cpnd_mds_enc Jul 29
> 11:34:04.217331 osafckptnd [5233:cpnd_mds.c:0267] << cpnd_mds_callback Jul
> 29 11:34:04.217464 osafckptnd [5233:cpnd_mds.c:1028] << cpnd_mds_send_rsp
> Jul 29 11:34:04.217483 osafckptnd [5233:cpnd_evt.c:2740] <<
> cpnd_evt_proc_nd2nd_ckpt_sect_create
> Jul 29 11:34:04.217493 osafckptnd [5233:cpnd_evt.c:4433] >> cpnd_evt_destroy
> Jul 29 11:34:04.217503 osafckptnd [5233:cpnd_evt.c:4619] << cpnd_evt_destroy
> Jul 29 11:34:04.719653 osafckptnd [5233:cpnd_mds.c:0225] >>
> cpnd_mds_callback Jul 29 11:34:04.719758 osafckptnd [5233:cpnd_mds.c:0267]
> << cpnd_mds_callback Jul 29 11:34:04.719772 osafckptnd
> [5233:cpnd_mds.c:0225] >> cpnd_mds_callback Jul 29 11:34:04.719801
> osafckptnd [5233:cpnd_mds.c:0729] << cpnd_mds_rcv Jul 29 11:34:04.719812
> osafckptnd [5233:cpnd_mds.c:0267] << cpnd_mds_callback
>
> 
> =
>
> 520|0 88 03703659 1 10|
> 520|0 88 03703659 1 11| SUCCESS   : ckpt with all flags on created
> 520|0 88 03703659 1 12| Return Value  : SA_AIS_OK
> 520|0 88 03703659 1 13|
> 520|0 88 03703659 1 14| SUCCESS   : Unlinked ckpt all replica
> 520|0 88 03703659 1 15| Return Value  : SA_AIS_OK
> 520|0 88 03703659 1 16|
> 520|0 88 03703659 1 17| FAILED: Section 11 created in ckpt
> 520|0 88 03703659 1 18| Return Value  : SA_AIS_ERR_TRY_AGAIN
>
> 
> =
>
> -AVM
>
>
> On 7/29/2016 7:49 AM, Vo Minh Hoang wrote:
>> Dear Mahesh,
>>
>> We do not have specific test 

Re: [devel] [PATCH 6 of 8] cpsv: Apply new messages supporting extended SaNameT to CPD, CPND, and CPA v1 [#1574]

2016-08-02 Thread Vo Minh Hoang
Dear Mahesh,

I have just submitted the V3 patch fixing source code following your
comment.
I also update readme file that is attached to this email.
Please tell me if you have any further inquiry.

Thank you and best regards,
Hoang

-Original Message-
From: A V Mahesh [mailto:mahesh.va...@oracle.com] 
Sent: Friday, July 29, 2016 1:27 PM
To: Vo Minh Hoang 
Cc: opensaf-devel@lists.sourceforge.net
Subject: Re: [PATCH 6 of 8] cpsv: Apply new messages supporting extended
SaNameT to CPD, CPND, and CPA v1 [#1574]

Hi ,

I have proved some code related minor comment in 4 of 8 , 6 of 8 & 8 of
8 , please  address them also in new patch(s).

Reading testing :

On 7/29/2016 7:49 AM, Vo Minh Hoang wrote:
> We do not have specific test case and environment for in-service update.
> So my test work is based on osaftest cases.
>
> I tested with old d - new nd and new d - old nd cases.

I started basic testing with  one new Controller  & one old Controller and
tow Old payload setup.
I observed some encode/decode issue  by running simple  ` /usr/bin/ckpttest`

Even I was not able to proceed with other testing which not related to LONG
DN)( continuously receiving SA_AIS_ERR_TRY_AGAIN) Please re-visit the all
encode & decode function that you have introduced run  the basic testing
with the above setup running application on ( old nodes/application  and new
nodes/application )

traces On Old Node ( with out patch )




Jul 29 11:34:16 SC-2 osafckptnd[5233]: ER cpnd mds decode failed Jul 29
11:34:16 SC-2 osafckptnd[5233]: ER cpnd mds decode failed Jul 29 11:34:26
SC-2 osafckptnd[5233]: ER cpnd mds decode failed Jul 29 11:34:27 SC-2
osafckptnd[5233]: ER cpnd mds decode failed Jul 29 11:34:27 SC-2
osafckptnd[5233]: ER cpnd mds decode failed


==

Jul 29 11:34:04.216980 osafckptnd [5233:cpnd_mds.c:0225] >>
cpnd_mds_callback Jul 29 11:34:04.217086 osafckptnd [5233:cpnd_mds.c:0267]
<< cpnd_mds_callback Jul 29 11:34:04.217100 osafckptnd
[5233:cpnd_mds.c:0225] >> cpnd_mds_callback Jul 29 11:34:04.217129
osafckptnd [5233:cpnd_mds.c:0729] << cpnd_mds_rcv Jul 29 11:34:04.217175
osafckptnd [5233:cpnd_mds.c:0267] << cpnd_mds_callback Jul 29
11:34:04.217240 osafckptnd [5233:cpsv_evt.c:2219] TR cpnd <<== [9]
CPSV_EVT_ND2ND_CKPT_SECT_CREATE_REQ(sec_id=0x0B15) from node 0x2010F Jul 29
11:34:04.217254 osafckptnd [5233:cpnd_evt.c:2626] >>
cpnd_evt_proc_nd2nd_ckpt_sect_create
Jul 29 11:34:04.217264 osafckptnd [5233:cpnd_evt.c:2632] T4 cpnd ckpt node
get failed for ckpt_id:9 Jul 29 11:34:04.217272 osafckptnd
[5233:cpnd_mds.c:1004] >> cpnd_mds_send_rsp Jul 29 11:34:04.217282
osafckptnd [5233:cpsv_evt.c:2213] TR cpnd ==>> [0]
CPSV_EVT_ND2ND_CKPT_SECT_ACTIVE_CREATE_RSP(err=6) to node 0x2010F Jul 29
11:34:04.217301 osafckptnd [5233:cpnd_mds.c:0225] >> cpnd_mds_callback Jul
29 11:34:04.217310 osafckptnd [5233:cpnd_mds.c:0291] >> cpnd_mds_enc Jul 29
11:34:04.217331 osafckptnd [5233:cpnd_mds.c:0267] << cpnd_mds_callback Jul
29 11:34:04.217464 osafckptnd [5233:cpnd_mds.c:1028] << cpnd_mds_send_rsp
Jul 29 11:34:04.217483 osafckptnd [5233:cpnd_evt.c:2740] <<
cpnd_evt_proc_nd2nd_ckpt_sect_create
Jul 29 11:34:04.217493 osafckptnd [5233:cpnd_evt.c:4433] >> cpnd_evt_destroy
Jul 29 11:34:04.217503 osafckptnd [5233:cpnd_evt.c:4619] << cpnd_evt_destroy
Jul 29 11:34:04.719653 osafckptnd [5233:cpnd_mds.c:0225] >>
cpnd_mds_callback Jul 29 11:34:04.719758 osafckptnd [5233:cpnd_mds.c:0267]
<< cpnd_mds_callback Jul 29 11:34:04.719772 osafckptnd
[5233:cpnd_mds.c:0225] >> cpnd_mds_callback Jul 29 11:34:04.719801
osafckptnd [5233:cpnd_mds.c:0729] << cpnd_mds_rcv Jul 29 11:34:04.719812
osafckptnd [5233:cpnd_mds.c:0267] << cpnd_mds_callback


=

520|0 88 03703659 1 10|
520|0 88 03703659 1 11| SUCCESS   : ckpt with all flags on created
520|0 88 03703659 1 12| Return Value  : SA_AIS_OK
520|0 88 03703659 1 13|
520|0 88 03703659 1 14| SUCCESS   : Unlinked ckpt all replica
520|0 88 03703659 1 15| Return Value  : SA_AIS_OK
520|0 88 03703659 1 16|
520|0 88 03703659 1 17| FAILED: Section 11 created in ckpt
520|0 88 03703659 1 18| Return Value  : SA_AIS_ERR_TRY_AGAIN


=

-AVM


On 7/29/2016 7:49 AM, Vo Minh Hoang wrote:
> Dear Mahesh,
>
> We do not have specific test case and environment for in-service update.
> So my test work is based on osaftest cases.
>
> I tested with old d - new nd and new d - old nd cases.
> There are failed test cases but after investigating, they are 
> intensional when old one cannot recognize new message.
> The only problem found is record to ticket #1922 and it is not related 
> to long DN problem.
>
> Thank you and best regards,
> 

Re: [devel] [PATCH 6 of 8] cpsv: Apply new messages supporting extended SaNameT to CPD, CPND, and CPA v1 [#1574]

2016-07-29 Thread Vo Minh Hoang
Dear Mahesh,

Thank you very much for your comment.
I start working on it from now.

Sincerely,
Hoang

-Original Message-
From: A V Mahesh [mailto:mahesh.va...@oracle.com] 
Sent: Friday, July 29, 2016 1:27 PM
To: Vo Minh Hoang 
Cc: opensaf-devel@lists.sourceforge.net
Subject: Re: [PATCH 6 of 8] cpsv: Apply new messages supporting extended
SaNameT to CPD, CPND, and CPA v1 [#1574]

Hi ,

I have proved some code related minor comment in 4 of 8 , 6 of 8 & 8 of
8 , please  address them also in new patch(s).

Reading testing :

On 7/29/2016 7:49 AM, Vo Minh Hoang wrote:
> We do not have specific test case and environment for in-service update.
> So my test work is based on osaftest cases.
>
> I tested with old d - new nd and new d - old nd cases.

I started basic testing with  one new Controller  & one old Controller and
tow Old payload setup.
I observed some encode/decode issue  by running simple  ` /usr/bin/ckpttest`

Even I was not able to proceed with other testing which not related to LONG
DN)( continuously receiving SA_AIS_ERR_TRY_AGAIN) Please re-visit the all
encode & decode function that you have introduced run  the basic testing
with the above setup running application on ( old nodes/application  and new
nodes/application )

traces On Old Node ( with out patch )




Jul 29 11:34:16 SC-2 osafckptnd[5233]: ER cpnd mds decode failed Jul 29
11:34:16 SC-2 osafckptnd[5233]: ER cpnd mds decode failed Jul 29 11:34:26
SC-2 osafckptnd[5233]: ER cpnd mds decode failed Jul 29 11:34:27 SC-2
osafckptnd[5233]: ER cpnd mds decode failed Jul 29 11:34:27 SC-2
osafckptnd[5233]: ER cpnd mds decode failed


==

Jul 29 11:34:04.216980 osafckptnd [5233:cpnd_mds.c:0225] >>
cpnd_mds_callback Jul 29 11:34:04.217086 osafckptnd [5233:cpnd_mds.c:0267]
<< cpnd_mds_callback Jul 29 11:34:04.217100 osafckptnd
[5233:cpnd_mds.c:0225] >> cpnd_mds_callback Jul 29 11:34:04.217129
osafckptnd [5233:cpnd_mds.c:0729] << cpnd_mds_rcv Jul 29 11:34:04.217175
osafckptnd [5233:cpnd_mds.c:0267] << cpnd_mds_callback Jul 29
11:34:04.217240 osafckptnd [5233:cpsv_evt.c:2219] TR cpnd <<== [9]
CPSV_EVT_ND2ND_CKPT_SECT_CREATE_REQ(sec_id=0x0B15) from node 0x2010F Jul 29
11:34:04.217254 osafckptnd [5233:cpnd_evt.c:2626] >>
cpnd_evt_proc_nd2nd_ckpt_sect_create
Jul 29 11:34:04.217264 osafckptnd [5233:cpnd_evt.c:2632] T4 cpnd ckpt node
get failed for ckpt_id:9 Jul 29 11:34:04.217272 osafckptnd
[5233:cpnd_mds.c:1004] >> cpnd_mds_send_rsp Jul 29 11:34:04.217282
osafckptnd [5233:cpsv_evt.c:2213] TR cpnd ==>> [0]
CPSV_EVT_ND2ND_CKPT_SECT_ACTIVE_CREATE_RSP(err=6) to node 0x2010F Jul 29
11:34:04.217301 osafckptnd [5233:cpnd_mds.c:0225] >> cpnd_mds_callback Jul
29 11:34:04.217310 osafckptnd [5233:cpnd_mds.c:0291] >> cpnd_mds_enc Jul 29
11:34:04.217331 osafckptnd [5233:cpnd_mds.c:0267] << cpnd_mds_callback Jul
29 11:34:04.217464 osafckptnd [5233:cpnd_mds.c:1028] << cpnd_mds_send_rsp
Jul 29 11:34:04.217483 osafckptnd [5233:cpnd_evt.c:2740] <<
cpnd_evt_proc_nd2nd_ckpt_sect_create
Jul 29 11:34:04.217493 osafckptnd [5233:cpnd_evt.c:4433] >> cpnd_evt_destroy
Jul 29 11:34:04.217503 osafckptnd [5233:cpnd_evt.c:4619] << cpnd_evt_destroy
Jul 29 11:34:04.719653 osafckptnd [5233:cpnd_mds.c:0225] >>
cpnd_mds_callback Jul 29 11:34:04.719758 osafckptnd [5233:cpnd_mds.c:0267]
<< cpnd_mds_callback Jul 29 11:34:04.719772 osafckptnd
[5233:cpnd_mds.c:0225] >> cpnd_mds_callback Jul 29 11:34:04.719801
osafckptnd [5233:cpnd_mds.c:0729] << cpnd_mds_rcv Jul 29 11:34:04.719812
osafckptnd [5233:cpnd_mds.c:0267] << cpnd_mds_callback


=

520|0 88 03703659 1 10|
520|0 88 03703659 1 11| SUCCESS   : ckpt with all flags on created
520|0 88 03703659 1 12| Return Value  : SA_AIS_OK
520|0 88 03703659 1 13|
520|0 88 03703659 1 14| SUCCESS   : Unlinked ckpt all replica
520|0 88 03703659 1 15| Return Value  : SA_AIS_OK
520|0 88 03703659 1 16|
520|0 88 03703659 1 17| FAILED: Section 11 created in ckpt
520|0 88 03703659 1 18| Return Value  : SA_AIS_ERR_TRY_AGAIN


=

-AVM


On 7/29/2016 7:49 AM, Vo Minh Hoang wrote:
> Dear Mahesh,
>
> We do not have specific test case and environment for in-service update.
> So my test work is based on osaftest cases.
>
> I tested with old d - new nd and new d - old nd cases.
> There are failed test cases but after investigating, they are 
> intensional when old one cannot recognize new message.
> The only problem found is record to ticket #1922 and it is not related 
> to long DN problem.
>
> Thank you and best regards,
> Hoang
>
> -Original Message-
> From: A V Mahesh [mailto:mahesh.va...@oracle.com]
> Sent: Thursday, July 28, 2016 4:04 PM
> 

Re: [devel] [PATCH 6 of 8] cpsv: Apply new messages supporting extended SaNameT to CPD, CPND, and CPA v1 [#1574]

2016-07-29 Thread A V Mahesh
Hi Hoang,

Minor comment

-AVM

On 7/21/2016 3:04 PM, Hoang Vo wrote:
>   osaf/libs/agents/saf/cpa/cpa_api.c  |  12 +---
>   osaf/libs/agents/saf/cpa/cpa_mds.c  |   2 +-
>   osaf/libs/common/cpsv/cpsv_evt.c|   1 +
>   osaf/services/saf/cpsv/cpd/cpd_evt.c|  10 +++---
>   osaf/services/saf/cpsv/cpd/cpd_mds.c|   3 ++-
>   osaf/services/saf/cpsv/cpd/cpd_proc.c   |   2 +-
>   osaf/services/saf/cpsv/cpnd/cpnd_evt.c  |  26 --
>   osaf/services/saf/cpsv/cpnd/cpnd_mds.c  |   4 ++--
>   osaf/services/saf/cpsv/cpnd/cpnd_proc.c |   6 +++---
>   9 files changed, 42 insertions(+), 24 deletions(-)
>
>
> diff --git a/osaf/libs/agents/saf/cpa/cpa_api.c 
> b/osaf/libs/agents/saf/cpa/cpa_api.c
> --- a/osaf/libs/agents/saf/cpa/cpa_api.c
> +++ b/osaf/libs/agents/saf/cpa/cpa_api.c
> @@ -880,6 +880,8 @@ SaAisErrorT saCkptCheckpointOpen(SaCkptH
>   }
>   
>   ckpt_name = osaf_extended_name_borrow(checkpointName);
> + if (strlen(ckpt_name) >= kOsafMaxDnLength)
> + return SA_AIS_ERR_INVALID_PARAM;
[AVM] Add   TRACE_LEAVE2  * TRACE
>   
>   /* SA_AIS_ERR_INVALID_PARAM, bullet 4 in SAI-AIS-CKPT-B.02.02
>  Section 3.6.1 saCkptCheckpointOpen() and 
> saCkptCheckpointOpenAsync(), Return Values */
> @@ -981,7 +983,7 @@ SaAisErrorT saCkptCheckpointOpen(SaCkptH
>   /* Populate & Send the Open Event to CPND */
>   memset(, 0, sizeof(CPSV_EVT));
>   evt.type = CPSV_EVT_TYPE_CPND;
> - evt.info.cpnd.type = CPND_EVT_A2ND_CKPT_OPEN;
> + evt.info.cpnd.type = CPND_EVT_A2ND_CKPT_OPEN_2;
>   evt.info.cpnd.info.openReq.client_hdl = ckptHandle;
>   evt.info.cpnd.info.openReq.lcl_ckpt_hdl = lc_node->lcl_ckpt_hdl;
>   
> @@ -1192,6 +1194,8 @@ SaAisErrorT saCkptCheckpointOpenAsync(Sa
>   }
>   
>   ckpt_name = osaf_extended_name_borrow(checkpointName);
> + if (strlen(ckpt_name) >= kOsafMaxDnLength)
> + return SA_AIS_ERR_INVALID_PARAM;
[AVM] Add   TRACE_LEAVE2  * TRACE
>   
>   /* SA_AIS_ERR_INVALID_PARAM, bullet 4 in SAI-AIS-CKPT-B.02.02
>  Section 3.6.1 saCkptCheckpointOpen() and 
> saCkptCheckpointOpenAsync(), Return Values */
> @@ -1277,7 +1281,7 @@ SaAisErrorT saCkptCheckpointOpenAsync(Sa
>   /* Populate & Send the Open Event to CPND */
>   memset(, 0, sizeof(CPSV_EVT));
>   evt.type = CPSV_EVT_TYPE_CPND;
> - evt.info.cpnd.type = CPND_EVT_A2ND_CKPT_OPEN;
> + evt.info.cpnd.type = CPND_EVT_A2ND_CKPT_OPEN_2;
>   evt.info.cpnd.info.openReq.client_hdl = ckptHandle;
>   evt.info.cpnd.info.openReq.lcl_ckpt_hdl = lc_node->lcl_ckpt_hdl;
>   
> @@ -1597,6 +1601,8 @@ SaAisErrorT saCkptCheckpointUnlink(SaCkp
>   }
>   
>   ckpt_name = osaf_extended_name_borrow(checkpointName);
> + if (strlen(ckpt_name) >= kOsafMaxDnLength)
> + return SA_AIS_ERR_INVALID_PARAM;
[AVM] Add   TRACE_LEAVE2  * TRACE
>   
>   /* retrieve CPA CB */
>   m_CPA_RETRIEVE_CB(cb);
> @@ -1635,7 +1641,7 @@ SaAisErrorT saCkptCheckpointUnlink(SaCkp
>   /* Populate evt.info.cpnd.info.unlinkReq & Call MDS sync Send */
>   memset(, 0, sizeof(CPSV_EVT));
>   evt.type = CPSV_EVT_TYPE_CPND;
> - evt.info.cpnd.type = CPND_EVT_A2ND_CKPT_UNLINK;
> + evt.info.cpnd.type = CPND_EVT_A2ND_CKPT_UNLINK_2;
>   
>   osaf_extended_name_lend(ckpt_name, 
> _name);
>   
> diff --git a/osaf/libs/agents/saf/cpa/cpa_mds.c 
> b/osaf/libs/agents/saf/cpa/cpa_mds.c
> --- a/osaf/libs/agents/saf/cpa/cpa_mds.c
> +++ b/osaf/libs/agents/saf/cpa/cpa_mds.c
> @@ -515,7 +515,7 @@ static uint32_t cpa_mds_svc_evt(CPA_CB *
>  /* Populate & Send the Open Event to CPND */
>  memset(, 0, sizeof(CPSV_EVT));
>  evt.type = CPSV_EVT_TYPE_CPND;
> -evt.info.cpnd.type = CPND_EVT_A2ND_CKPT_LIST_UPDATE;
> +evt.info.cpnd.type = CPND_EVT_A2ND_CKPT_LIST_UPDATE_2;
>  evt.info.cpnd.info.ckptListUpdate.client_hdl = 
> lc_node->cl_hdl;
>  osaf_extended_name_lend(lc_node->ckpt_name, 
> _name);
>   
> diff --git a/osaf/libs/common/cpsv/cpsv_evt.c 
> b/osaf/libs/common/cpsv/cpsv_evt.c
> --- a/osaf/libs/common/cpsv/cpsv_evt.c
> +++ b/osaf/libs/common/cpsv/cpsv_evt.c
> @@ -2414,6 +2414,7 @@ uint32_t cpsv_encode_extended_name(NCS_U
>   if(!osaf_is_an_extended_name(name))
>   return NCSCC_RC_SUCCESS;
>   
> + TRACE("length = %d", name->length);
>   SaConstStringT value = osaf_extended_name_borrow(name);
>   uint16_t length = osaf_extended_name_length(name);
>   
> diff --git a/osaf/services/saf/cpsv/cpd/cpd_evt.c 
> b/osaf/services/saf/cpsv/cpd/cpd_evt.c
> --- a/osaf/services/saf/cpsv/cpd/cpd_evt.c
> +++ b/osaf/services/saf/cpsv/cpd/cpd_evt.c
> @@ -110,6 +110,7 @@ void cpd_process_evt(CPSV_EVT *evt)
>   (void)cpd_evt_proc_timer_expiry(cb, >info.cpd);
>   break;
>   case CPD_EVT_ND2D_CKPT_CREATE:
> + case CPD_EVT_ND2D_CKPT_CREATE_2:
>   

Re: [devel] [PATCH 6 of 8] cpsv: Apply new messages supporting extended SaNameT to CPD, CPND, and CPA v1 [#1574]

2016-07-28 Thread Vo Minh Hoang
Dear Mahesh,

We do not have specific test case and environment for in-service update.
So my test work is based on osaftest cases.

I tested with old d - new nd and new d - old nd cases.
There are failed test cases but after investigating, they are intensional
when old one cannot recognize new message.
The only problem found is record to ticket #1922 and it is not related to
long DN problem.

Thank you and best regards,
Hoang

-Original Message-
From: A V Mahesh [mailto:mahesh.va...@oracle.com] 
Sent: Thursday, July 28, 2016 4:04 PM
To: Hoang Vo 
Cc: opensaf-devel@lists.sourceforge.net
Subject: Re: [PATCH 6 of 8] cpsv: Apply new messages supporting extended
SaNameT to CPD, CPND, and CPA v1 [#1574]

Hi Hoang,

I just started reviewing please share following :

I hope this Long DN should support In-service upgrade ,  if so,

please share the test case that you run , it will help me in reviewing

and  in test uncovered  use/test cases.

-AVM


On 7/21/2016 3:04 PM, Hoang Vo wrote:
>   osaf/libs/agents/saf/cpa/cpa_api.c  |  12 +---
>   osaf/libs/agents/saf/cpa/cpa_mds.c  |   2 +-
>   osaf/libs/common/cpsv/cpsv_evt.c|   1 +
>   osaf/services/saf/cpsv/cpd/cpd_evt.c|  10 +++---
>   osaf/services/saf/cpsv/cpd/cpd_mds.c|   3 ++-
>   osaf/services/saf/cpsv/cpd/cpd_proc.c   |   2 +-
>   osaf/services/saf/cpsv/cpnd/cpnd_evt.c  |  26 --
>   osaf/services/saf/cpsv/cpnd/cpnd_mds.c  |   4 ++--
>   osaf/services/saf/cpsv/cpnd/cpnd_proc.c |   6 +++---
>   9 files changed, 42 insertions(+), 24 deletions(-)
>
>
> diff --git a/osaf/libs/agents/saf/cpa/cpa_api.c 
> b/osaf/libs/agents/saf/cpa/cpa_api.c
> --- a/osaf/libs/agents/saf/cpa/cpa_api.c
> +++ b/osaf/libs/agents/saf/cpa/cpa_api.c
> @@ -880,6 +880,8 @@ SaAisErrorT saCkptCheckpointOpen(SaCkptH
>   }
>   
>   ckpt_name = osaf_extended_name_borrow(checkpointName);
> + if (strlen(ckpt_name) >= kOsafMaxDnLength)
> + return SA_AIS_ERR_INVALID_PARAM;
>   
>   /* SA_AIS_ERR_INVALID_PARAM, bullet 4 in SAI-AIS-CKPT-B.02.02
>  Section 3.6.1 saCkptCheckpointOpen() and 
> saCkptCheckpointOpenAsync(), Return Values */ @@ -981,7 +983,7 @@
SaAisErrorT saCkptCheckpointOpen(SaCkptH
>   /* Populate & Send the Open Event to CPND */
>   memset(, 0, sizeof(CPSV_EVT));
>   evt.type = CPSV_EVT_TYPE_CPND;
> - evt.info.cpnd.type = CPND_EVT_A2ND_CKPT_OPEN;
> + evt.info.cpnd.type = CPND_EVT_A2ND_CKPT_OPEN_2;
>   evt.info.cpnd.info.openReq.client_hdl = ckptHandle;
>   evt.info.cpnd.info.openReq.lcl_ckpt_hdl = lc_node->lcl_ckpt_hdl;
>   
> @@ -1192,6 +1194,8 @@ SaAisErrorT saCkptCheckpointOpenAsync(Sa
>   }
>   
>   ckpt_name = osaf_extended_name_borrow(checkpointName);
> + if (strlen(ckpt_name) >= kOsafMaxDnLength)
> + return SA_AIS_ERR_INVALID_PARAM;
>   
>   /* SA_AIS_ERR_INVALID_PARAM, bullet 4 in SAI-AIS-CKPT-B.02.02
>  Section 3.6.1 saCkptCheckpointOpen() and 
> saCkptCheckpointOpenAsync(), Return Values */ @@ -1277,7 +1281,7 @@
SaAisErrorT saCkptCheckpointOpenAsync(Sa
>   /* Populate & Send the Open Event to CPND */
>   memset(, 0, sizeof(CPSV_EVT));
>   evt.type = CPSV_EVT_TYPE_CPND;
> - evt.info.cpnd.type = CPND_EVT_A2ND_CKPT_OPEN;
> + evt.info.cpnd.type = CPND_EVT_A2ND_CKPT_OPEN_2;
>   evt.info.cpnd.info.openReq.client_hdl = ckptHandle;
>   evt.info.cpnd.info.openReq.lcl_ckpt_hdl = lc_node->lcl_ckpt_hdl;
>   
> @@ -1597,6 +1601,8 @@ SaAisErrorT saCkptCheckpointUnlink(SaCkp
>   }
>   
>   ckpt_name = osaf_extended_name_borrow(checkpointName);
> + if (strlen(ckpt_name) >= kOsafMaxDnLength)
> + return SA_AIS_ERR_INVALID_PARAM;
>   
>   /* retrieve CPA CB */
>   m_CPA_RETRIEVE_CB(cb);
> @@ -1635,7 +1641,7 @@ SaAisErrorT saCkptCheckpointUnlink(SaCkp
>   /* Populate evt.info.cpnd.info.unlinkReq & Call MDS sync Send */
>   memset(, 0, sizeof(CPSV_EVT));
>   evt.type = CPSV_EVT_TYPE_CPND;
> - evt.info.cpnd.type = CPND_EVT_A2ND_CKPT_UNLINK;
> + evt.info.cpnd.type = CPND_EVT_A2ND_CKPT_UNLINK_2;
>   
>   osaf_extended_name_lend(ckpt_name, 
> _name);
>   
> diff --git a/osaf/libs/agents/saf/cpa/cpa_mds.c 
> b/osaf/libs/agents/saf/cpa/cpa_mds.c
> --- a/osaf/libs/agents/saf/cpa/cpa_mds.c
> +++ b/osaf/libs/agents/saf/cpa/cpa_mds.c
> @@ -515,7 +515,7 @@ static uint32_t cpa_mds_svc_evt(CPA_CB *
>  /* Populate & Send the Open Event to CPND */
>  memset(, 0, sizeof(CPSV_EVT));
>  evt.type = CPSV_EVT_TYPE_CPND;
> -evt.info.cpnd.type = CPND_EVT_A2ND_CKPT_LIST_UPDATE;
> +evt.info.cpnd.type = CPND_EVT_A2ND_CKPT_LIST_UPDATE_2;
>  evt.info.cpnd.info.ckptListUpdate.client_hdl =
lc_node->cl_hdl;
>  osaf_extended_name_lend(lc_node->ckpt_name, 
> _name);
>   
> diff --git a/osaf/libs/common/cpsv/cpsv_evt.c 
> 

Re: [devel] [PATCH 6 of 8] cpsv: Apply new messages supporting extended SaNameT to CPD, CPND, and CPA v1 [#1574]

2016-07-28 Thread A V Mahesh
Hi Hoang,

I just started reviewing please share following :

I hope this Long DN should support In-service upgrade ,  if so,

please share the test case that you run , it will help me in reviewing

and  in test uncovered  use/test cases.

-AVM


On 7/21/2016 3:04 PM, Hoang Vo wrote:
>   osaf/libs/agents/saf/cpa/cpa_api.c  |  12 +---
>   osaf/libs/agents/saf/cpa/cpa_mds.c  |   2 +-
>   osaf/libs/common/cpsv/cpsv_evt.c|   1 +
>   osaf/services/saf/cpsv/cpd/cpd_evt.c|  10 +++---
>   osaf/services/saf/cpsv/cpd/cpd_mds.c|   3 ++-
>   osaf/services/saf/cpsv/cpd/cpd_proc.c   |   2 +-
>   osaf/services/saf/cpsv/cpnd/cpnd_evt.c  |  26 --
>   osaf/services/saf/cpsv/cpnd/cpnd_mds.c  |   4 ++--
>   osaf/services/saf/cpsv/cpnd/cpnd_proc.c |   6 +++---
>   9 files changed, 42 insertions(+), 24 deletions(-)
>
>
> diff --git a/osaf/libs/agents/saf/cpa/cpa_api.c 
> b/osaf/libs/agents/saf/cpa/cpa_api.c
> --- a/osaf/libs/agents/saf/cpa/cpa_api.c
> +++ b/osaf/libs/agents/saf/cpa/cpa_api.c
> @@ -880,6 +880,8 @@ SaAisErrorT saCkptCheckpointOpen(SaCkptH
>   }
>   
>   ckpt_name = osaf_extended_name_borrow(checkpointName);
> + if (strlen(ckpt_name) >= kOsafMaxDnLength)
> + return SA_AIS_ERR_INVALID_PARAM;
>   
>   /* SA_AIS_ERR_INVALID_PARAM, bullet 4 in SAI-AIS-CKPT-B.02.02
>  Section 3.6.1 saCkptCheckpointOpen() and 
> saCkptCheckpointOpenAsync(), Return Values */
> @@ -981,7 +983,7 @@ SaAisErrorT saCkptCheckpointOpen(SaCkptH
>   /* Populate & Send the Open Event to CPND */
>   memset(, 0, sizeof(CPSV_EVT));
>   evt.type = CPSV_EVT_TYPE_CPND;
> - evt.info.cpnd.type = CPND_EVT_A2ND_CKPT_OPEN;
> + evt.info.cpnd.type = CPND_EVT_A2ND_CKPT_OPEN_2;
>   evt.info.cpnd.info.openReq.client_hdl = ckptHandle;
>   evt.info.cpnd.info.openReq.lcl_ckpt_hdl = lc_node->lcl_ckpt_hdl;
>   
> @@ -1192,6 +1194,8 @@ SaAisErrorT saCkptCheckpointOpenAsync(Sa
>   }
>   
>   ckpt_name = osaf_extended_name_borrow(checkpointName);
> + if (strlen(ckpt_name) >= kOsafMaxDnLength)
> + return SA_AIS_ERR_INVALID_PARAM;
>   
>   /* SA_AIS_ERR_INVALID_PARAM, bullet 4 in SAI-AIS-CKPT-B.02.02
>  Section 3.6.1 saCkptCheckpointOpen() and 
> saCkptCheckpointOpenAsync(), Return Values */
> @@ -1277,7 +1281,7 @@ SaAisErrorT saCkptCheckpointOpenAsync(Sa
>   /* Populate & Send the Open Event to CPND */
>   memset(, 0, sizeof(CPSV_EVT));
>   evt.type = CPSV_EVT_TYPE_CPND;
> - evt.info.cpnd.type = CPND_EVT_A2ND_CKPT_OPEN;
> + evt.info.cpnd.type = CPND_EVT_A2ND_CKPT_OPEN_2;
>   evt.info.cpnd.info.openReq.client_hdl = ckptHandle;
>   evt.info.cpnd.info.openReq.lcl_ckpt_hdl = lc_node->lcl_ckpt_hdl;
>   
> @@ -1597,6 +1601,8 @@ SaAisErrorT saCkptCheckpointUnlink(SaCkp
>   }
>   
>   ckpt_name = osaf_extended_name_borrow(checkpointName);
> + if (strlen(ckpt_name) >= kOsafMaxDnLength)
> + return SA_AIS_ERR_INVALID_PARAM;
>   
>   /* retrieve CPA CB */
>   m_CPA_RETRIEVE_CB(cb);
> @@ -1635,7 +1641,7 @@ SaAisErrorT saCkptCheckpointUnlink(SaCkp
>   /* Populate evt.info.cpnd.info.unlinkReq & Call MDS sync Send */
>   memset(, 0, sizeof(CPSV_EVT));
>   evt.type = CPSV_EVT_TYPE_CPND;
> - evt.info.cpnd.type = CPND_EVT_A2ND_CKPT_UNLINK;
> + evt.info.cpnd.type = CPND_EVT_A2ND_CKPT_UNLINK_2;
>   
>   osaf_extended_name_lend(ckpt_name, 
> _name);
>   
> diff --git a/osaf/libs/agents/saf/cpa/cpa_mds.c 
> b/osaf/libs/agents/saf/cpa/cpa_mds.c
> --- a/osaf/libs/agents/saf/cpa/cpa_mds.c
> +++ b/osaf/libs/agents/saf/cpa/cpa_mds.c
> @@ -515,7 +515,7 @@ static uint32_t cpa_mds_svc_evt(CPA_CB *
>  /* Populate & Send the Open Event to CPND */
>  memset(, 0, sizeof(CPSV_EVT));
>  evt.type = CPSV_EVT_TYPE_CPND;
> -evt.info.cpnd.type = CPND_EVT_A2ND_CKPT_LIST_UPDATE;
> +evt.info.cpnd.type = CPND_EVT_A2ND_CKPT_LIST_UPDATE_2;
>  evt.info.cpnd.info.ckptListUpdate.client_hdl = 
> lc_node->cl_hdl;
>  osaf_extended_name_lend(lc_node->ckpt_name, 
> _name);
>   
> diff --git a/osaf/libs/common/cpsv/cpsv_evt.c 
> b/osaf/libs/common/cpsv/cpsv_evt.c
> --- a/osaf/libs/common/cpsv/cpsv_evt.c
> +++ b/osaf/libs/common/cpsv/cpsv_evt.c
> @@ -2414,6 +2414,7 @@ uint32_t cpsv_encode_extended_name(NCS_U
>   if(!osaf_is_an_extended_name(name))
>   return NCSCC_RC_SUCCESS;
>   
> + TRACE("length = %d", name->length);
>   SaConstStringT value = osaf_extended_name_borrow(name);
>   uint16_t length = osaf_extended_name_length(name);
>   
> diff --git a/osaf/services/saf/cpsv/cpd/cpd_evt.c 
> b/osaf/services/saf/cpsv/cpd/cpd_evt.c
> --- a/osaf/services/saf/cpsv/cpd/cpd_evt.c
> +++ b/osaf/services/saf/cpsv/cpd/cpd_evt.c
> @@ -110,6 +110,7 @@ void cpd_process_evt(CPSV_EVT *evt)
>   (void)cpd_evt_proc_timer_expiry(cb, >info.cpd);
> 

Re: [devel] [PATCH 6 of 8] cpsv: Apply new messages supporting extended SaNameT to CPD, CPND, and CPA v1 [#1574]

2016-07-05 Thread A V Mahesh
Hi Hoang,

-case CPD_EVT_ND2D_CKPT_UNLINK:
+case CPD_EVT_ND2D_CKPT_UNLINK_2:

-send_evt.info.cpnd.type = CPND_EVT_D2ND_CKPT_CREATE;
+send_evt.info.cpnd.type = CPND_EVT_D2ND_CKPT_CREATE_2;

Is this changes  tested with in-service upgrade ?

case like old ND and new ND  , New Director and  Old ND.

- AVM

On 6/23/2016 4:23 PM, Hoang Vo wrote:
>   osaf/libs/agents/saf/cpa/cpa_api.c  |  12 +---
>   osaf/libs/agents/saf/cpa/cpa_mds.c  |   2 +-
>   osaf/libs/common/cpsv/cpsv_evt.c|   1 +
>   osaf/services/saf/cpsv/cpd/cpd_evt.c|  10 +++---
>   osaf/services/saf/cpsv/cpd/cpd_mds.c|   3 ++-
>   osaf/services/saf/cpsv/cpd/cpd_proc.c   |   2 +-
>   osaf/services/saf/cpsv/cpnd/cpnd_evt.c  |  26 --
>   osaf/services/saf/cpsv/cpnd/cpnd_mds.c  |   4 ++--
>   osaf/services/saf/cpsv/cpnd/cpnd_proc.c |   6 +++---
>   9 files changed, 42 insertions(+), 24 deletions(-)
>
>
> diff --git a/osaf/libs/agents/saf/cpa/cpa_api.c 
> b/osaf/libs/agents/saf/cpa/cpa_api.c
> --- a/osaf/libs/agents/saf/cpa/cpa_api.c
> +++ b/osaf/libs/agents/saf/cpa/cpa_api.c
> @@ -880,6 +880,8 @@ SaAisErrorT saCkptCheckpointOpen(SaCkptH
>   }
>   
>   ckpt_name = osaf_extended_name_borrow(checkpointName);
> + if (strlen(ckpt_name) >= kOsafMaxDnLength)
> + return SA_AIS_ERR_INVALID_PARAM;
>   
>   /* SA_AIS_ERR_INVALID_PARAM, bullet 4 in SAI-AIS-CKPT-B.02.02
>  Section 3.6.1 saCkptCheckpointOpen() and 
> saCkptCheckpointOpenAsync(), Return Values */
> @@ -981,7 +983,7 @@ SaAisErrorT saCkptCheckpointOpen(SaCkptH
>   /* Populate & Send the Open Event to CPND */
>   memset(, 0, sizeof(CPSV_EVT));
>   evt.type = CPSV_EVT_TYPE_CPND;
> - evt.info.cpnd.type = CPND_EVT_A2ND_CKPT_OPEN;
> + evt.info.cpnd.type = CPND_EVT_A2ND_CKPT_OPEN_2;
>   evt.info.cpnd.info.openReq.client_hdl = ckptHandle;
>   evt.info.cpnd.info.openReq.lcl_ckpt_hdl = lc_node->lcl_ckpt_hdl;
>   
> @@ -1192,6 +1194,8 @@ SaAisErrorT saCkptCheckpointOpenAsync(Sa
>   }
>   
>   ckpt_name = osaf_extended_name_borrow(checkpointName);
> + if (strlen(ckpt_name) >= kOsafMaxDnLength)
> + return SA_AIS_ERR_INVALID_PARAM;
>   
>   /* SA_AIS_ERR_INVALID_PARAM, bullet 4 in SAI-AIS-CKPT-B.02.02
>  Section 3.6.1 saCkptCheckpointOpen() and 
> saCkptCheckpointOpenAsync(), Return Values */
> @@ -1277,7 +1281,7 @@ SaAisErrorT saCkptCheckpointOpenAsync(Sa
>   /* Populate & Send the Open Event to CPND */
>   memset(, 0, sizeof(CPSV_EVT));
>   evt.type = CPSV_EVT_TYPE_CPND;
> - evt.info.cpnd.type = CPND_EVT_A2ND_CKPT_OPEN;
> + evt.info.cpnd.type = CPND_EVT_A2ND_CKPT_OPEN_2;
>   evt.info.cpnd.info.openReq.client_hdl = ckptHandle;
>   evt.info.cpnd.info.openReq.lcl_ckpt_hdl = lc_node->lcl_ckpt_hdl;
>   
> @@ -1597,6 +1601,8 @@ SaAisErrorT saCkptCheckpointUnlink(SaCkp
>   }
>   
>   ckpt_name = osaf_extended_name_borrow(checkpointName);
> + if (strlen(ckpt_name) >= kOsafMaxDnLength)
> + return SA_AIS_ERR_INVALID_PARAM;
>   
>   /* retrieve CPA CB */
>   m_CPA_RETRIEVE_CB(cb);
> @@ -1635,7 +1641,7 @@ SaAisErrorT saCkptCheckpointUnlink(SaCkp
>   /* Populate evt.info.cpnd.info.unlinkReq & Call MDS sync Send */
>   memset(, 0, sizeof(CPSV_EVT));
>   evt.type = CPSV_EVT_TYPE_CPND;
> - evt.info.cpnd.type = CPND_EVT_A2ND_CKPT_UNLINK;
> + evt.info.cpnd.type = CPND_EVT_A2ND_CKPT_UNLINK_2;
>   
>   osaf_extended_name_lend(ckpt_name, 
> _name);
>   
> diff --git a/osaf/libs/agents/saf/cpa/cpa_mds.c 
> b/osaf/libs/agents/saf/cpa/cpa_mds.c
> --- a/osaf/libs/agents/saf/cpa/cpa_mds.c
> +++ b/osaf/libs/agents/saf/cpa/cpa_mds.c
> @@ -515,7 +515,7 @@ static uint32_t cpa_mds_svc_evt(CPA_CB *
>  /* Populate & Send the Open Event to CPND */
>  memset(, 0, sizeof(CPSV_EVT));
>  evt.type = CPSV_EVT_TYPE_CPND;
> -evt.info.cpnd.type = CPND_EVT_A2ND_CKPT_LIST_UPDATE;
> +evt.info.cpnd.type = CPND_EVT_A2ND_CKPT_LIST_UPDATE_2;
>  evt.info.cpnd.info.ckptListUpdate.client_hdl = 
> lc_node->cl_hdl;
>  osaf_extended_name_lend(lc_node->ckpt_name, 
> _name);
>   
> diff --git a/osaf/libs/common/cpsv/cpsv_evt.c 
> b/osaf/libs/common/cpsv/cpsv_evt.c
> --- a/osaf/libs/common/cpsv/cpsv_evt.c
> +++ b/osaf/libs/common/cpsv/cpsv_evt.c
> @@ -2414,6 +2414,7 @@ uint32_t cpsv_encode_extended_name(NCS_U
>   if(!osaf_is_an_extended_name(name))
>   return NCSCC_RC_SUCCESS;
>   
> + TRACE("length = %d", name->length);
>   SaConstStringT value = osaf_extended_name_borrow(name);
>   uint16_t length = osaf_extended_name_length(name);
>   
> diff --git a/osaf/services/saf/cpsv/cpd/cpd_evt.c 
> b/osaf/services/saf/cpsv/cpd/cpd_evt.c
> --- a/osaf/services/saf/cpsv/cpd/cpd_evt.c
> +++ b/osaf/services/saf/cpsv/cpd/cpd_evt.c
> @@ -110,6 +110,7 @@ void cpd_process_evt(CPSV_EVT