[devel] [PATCH 0 of 1] Review Request for amfnd: remove used code in util.cc [#1642]
Summary: amfnd: remove used code in util.cc [#1642] Review request for Trac Ticket(s): 1642 Peer Reviewer(s): AMF devs Pull request to: AMF maintainers Affected branch(es): default Development branch: default Impacted area Impact y/n Docsn Build systemn RPM/packaging n Configuration files n Startup scripts n SAF servicesn OpenSAF servicesy Core libraries n Samples n Tests n Other n Comments (indicate scope for each "y" above): - <> changeset d214fafbc0401e97dfae9ca9a7cea7311c53696a Author: Long HB Nguyen Date: Fri, 19 Aug 2016 11:35:54 +0700 amfnd: remove used code in util.cc [#1642] Complete diffstat: -- osaf/services/saf/amf/amfnd/util.cc | 546 1 files changed, 0 insertions(+), 546 deletions(-) Testing Commands: - <> Testing, Expected Results: -- <> Conditions of Submission: - <> Arch Built StartedLinux distro --- mipsn n mips64 n n x86 n n x86_64 y y powerpc n n powerpc64 n n Reviewer Checklist: --- [Submitters: make sure that your review doesn't trigger any checkmarks!] Your checkin has not passed review because (see checked entries): ___ Your RR template is generally incomplete; it has too many blank entries that need proper data filled in. ___ You have failed to nominate the proper persons for review and push. ___ Your patches do not have proper short+long header ___ You have grammar/spelling in your header that is unacceptable. ___ You have exceeded a sensible line length in your headers/comments/text. ___ You have failed to put in a proper Trac Ticket # into your commits. ___ You have incorrectly put/left internal data in your comments/files (i.e. internal bug tracking tool IDs, product names etc) ___ You have not given any evidence of testing beyond basic build tests. Demonstrate some level of runtime or other sanity testing. ___ You have ^M present in some of your files. These have to be removed. ___ You have needlessly changed whitespace or added whitespace crimes like trailing spaces, or spaces before tabs. ___ You have mixed real technical changes with whitespace and other cosmetic code cleanup changes. These have to be separate commits. ___ You need to refactor your submission into logical chunks; there is too much content into a single commit. ___ You have extraneous garbage in your review (merge commits etc) ___ You have giant attachments which should never have been sent; Instead you should place your content in a public tree to be pulled. ___ You have too many commits attached to an e-mail; resend as threaded commits, or place in a public tree for a pull. ___ You have resent this content multiple times without a clear indication of what has changed between each re-send. ___ You have failed to adequately and individually address all of the comments and change requests that were proposed in the initial review. ___ You have a misconfigured ~/.hgrc file (i.e. username, email etc) ___ Your computer have a badly configured date and time; confusing the the threaded patch review. ___ Your changes affect IPC mechanism, and you don't present any results for in-service upgradability test. ___ Your changes affect user manual and documentation, your patch series do not contain the patch that updates the Doxygen manual. -- ___ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel
[devel] [PATCH 1 of 1] amfnd: remove used code in util.cc [#1642]
osaf/services/saf/amf/amfnd/util.cc | 546 1 files changed, 0 insertions(+), 546 deletions(-) diff --git a/osaf/services/saf/amf/amfnd/util.cc b/osaf/services/saf/amf/amfnd/util.cc --- a/osaf/services/saf/amf/amfnd/util.cc +++ b/osaf/services/saf/amf/amfnd/util.cc @@ -249,552 +249,6 @@ const char *avnd_failed_state_file_locat return failed_state_file_name; } -/* - * Function: free_d2n_su_msg_info - * - * Purpose: This function frees the d2n SU message contents. - * - * Input: su_msg - Pointer to the SU message contents to be freed. - * - * Returns: None - * - * NOTES: none. - * - * - **/ - -static void free_d2n_su_msg_info(AVSV_DND_MSG *su_msg) -{ - AVSV_SU_INFO_MSG *su_info; - - while (su_msg->msg_info.d2n_reg_su.su_list != nullptr) { - su_info = su_msg->msg_info.d2n_reg_su.su_list; - su_msg->msg_info.d2n_reg_su.su_list = su_info->next; - delete su_info; - } -} - - -/* - * Function: free_d2n_susi_msg_info - * - * Purpose: This function frees the d2n SU SI message contents. - * - * Input: susi_msg - Pointer to the SUSI message contents to be freed. - * - * Returns: none - * - * NOTES: It also frees the array of attributes, which are sperately - * allocated and pointed to by AVSV_SUSI_ASGN structure. - * - * - **/ - -static void free_d2n_susi_msg_info(AVSV_DND_MSG *susi_msg) -{ - AVSV_SUSI_ASGN *compcsi_info; - - while (susi_msg->msg_info.d2n_su_si_assign.list != nullptr) { - compcsi_info = susi_msg->msg_info.d2n_su_si_assign.list; - susi_msg->msg_info.d2n_su_si_assign.list = compcsi_info->next; - if (compcsi_info->attrs.list != nullptr) { - // AVSV_ATTR_NAME_VAL variables - // are malloc'ed, use free() - free(compcsi_info->attrs.list); - compcsi_info->attrs.list = nullptr; - } - delete compcsi_info; - } -} - -/* - * Function: free_d2n_pg_msg_info - * - * Purpose: This function frees the d2n PG track response message contents. - * - * Input: pg_msg - Pointer to the PG message contents to be freed. - * - * Returns: None - * - * NOTES: None - * - * - **/ - -static void free_d2n_pg_msg_info(AVSV_DND_MSG *pg_msg) -{ - AVSV_D2N_PG_TRACK_ACT_RSP_MSG_INFO *info = &pg_msg->msg_info.d2n_pg_track_act_rsp; - - if (info->mem_list.numberOfItems > 0) - delete [] info->mem_list.notification; - - info->mem_list.notification = 0; - info->mem_list.numberOfItems = 0; -} - -/ - Name : dnd_msg_free - - Description : This routine frees the Message structures used for - communication between AvD and AvND. - - Arguments : msg - ptr to the DND message that needs to be freed. - - Return Values : None - - Notes : For : AVSV_D2N_REG_SU_MSG, AVSV_D2N_INFO_SU_SI_ASSIGN_MSG - and AVSV_D2N_PG_TRACK_ACT_RSP_MSG, this procedure calls the - corresponding information free function to free the - list information in them before freeing the message. -**/ -void dnd_msg_free(AVSV_DND_MSG *msg) -{ - if (msg == nullptr) - return; - - /* these messages have information list in them free them -* first by calling the corresponding free routine. -*/ - switch (msg->msg_type) { - case AVSV_D2N_REG_SU_MSG: - free_d2n_su_msg_info(msg); - break; - case AVSV_D2N_INFO_SU_SI_ASSIGN_MSG: - free_d2n_susi_msg_info(msg); - break; - case AVSV_D2N_PG_TRACK_ACT_RSP_MSG: - free_d2n_pg_msg_info(msg); - break; - case AVSV_N2D_ND_SISU_STATE_INFO_MSG: - free_n2d_nd_sisu_state_info(msg); - break; - case AVSV_N2D_ND_CSICOMP_STATE_INFO_MSG: - free_n2d_nd_csicomp_state_info(msg); - break; - default: - break; - } - - /* free the message */ - delete msg; -} - -/ - Name : nda_ava_msg_free - - Description : This routine frees the AvA message. - - Arguments : msg - ptr to the AvA msg - - Return Values : None - - Notes
[devel] [PATCH 0 of 1] Review Request for amfa: fixed freeing notification buff [#1642]
Summary: amfa: fixed freeing notification buff [#1642] Review request for Trac Ticket(s): 1642 Peer Reviewer(s): AMF devs Pull request to: Amf maintainers Affected branch(es): default Development branch: default Impacted area Impact y/n Docsn Build systemn RPM/packaging n Configuration files n Startup scripts n SAF servicesn OpenSAF servicesn Core libraries y Samples n Tests n Other n Comments (indicate scope for each "y" above): - This patch is to fix for Praveen's commnents on amf agent (for notification buffer). changeset 41a247bdf14274810463c51b4ff58fe57b6001ec Author: Long HB Nguyen Date: Fri, 19 Aug 2016 11:35:38 +0700 amfa: fixed freeing notification buff [#1642] Complete diffstat: -- osaf/libs/agents/saf/amfa/amf_agent.cc | 1 + osaf/libs/agents/saf/amfa/ava_hdl.cc | 2 -- 2 files changed, 1 insertions(+), 2 deletions(-) Testing Commands: - <> Testing, Expected Results: -- <> Conditions of Submission: - <> Arch Built StartedLinux distro --- mipsn n mips64 n n x86 n n x86_64 y y powerpc n n powerpc64 n n Reviewer Checklist: --- [Submitters: make sure that your review doesn't trigger any checkmarks!] Your checkin has not passed review because (see checked entries): ___ Your RR template is generally incomplete; it has too many blank entries that need proper data filled in. ___ You have failed to nominate the proper persons for review and push. ___ Your patches do not have proper short+long header ___ You have grammar/spelling in your header that is unacceptable. ___ You have exceeded a sensible line length in your headers/comments/text. ___ You have failed to put in a proper Trac Ticket # into your commits. ___ You have incorrectly put/left internal data in your comments/files (i.e. internal bug tracking tool IDs, product names etc) ___ You have not given any evidence of testing beyond basic build tests. Demonstrate some level of runtime or other sanity testing. ___ You have ^M present in some of your files. These have to be removed. ___ You have needlessly changed whitespace or added whitespace crimes like trailing spaces, or spaces before tabs. ___ You have mixed real technical changes with whitespace and other cosmetic code cleanup changes. These have to be separate commits. ___ You need to refactor your submission into logical chunks; there is too much content into a single commit. ___ You have extraneous garbage in your review (merge commits etc) ___ You have giant attachments which should never have been sent; Instead you should place your content in a public tree to be pulled. ___ You have too many commits attached to an e-mail; resend as threaded commits, or place in a public tree for a pull. ___ You have resent this content multiple times without a clear indication of what has changed between each re-send. ___ You have failed to adequately and individually address all of the comments and change requests that were proposed in the initial review. ___ You have a misconfigured ~/.hgrc file (i.e. username, email etc) ___ Your computer have a badly configured date and time; confusing the the threaded patch review. ___ Your changes affect IPC mechanism, and you don't present any results for in-service upgradability test. ___ Your changes affect user manual and documentation, your patch series do not contain the patch that updates the Doxygen manual. -- ___ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel
[devel] [PATCH 1 of 1] amfa: fixed freeing notification buff [#1642]
osaf/libs/agents/saf/amfa/amf_agent.cc | 1 + osaf/libs/agents/saf/amfa/ava_hdl.cc | 2 -- 2 files changed, 1 insertions(+), 2 deletions(-) diff --git a/osaf/libs/agents/saf/amfa/amf_agent.cc b/osaf/libs/agents/saf/amfa/amf_agent.cc --- a/osaf/libs/agents/saf/amfa/amf_agent.cc +++ b/osaf/libs/agents/saf/amfa/amf_agent.cc @@ -2450,6 +2450,7 @@ SaAisErrorT AmfAgent::ProtectionGroupTra ava_cpy_protection_group_ntf(buf->notification, rsp_buf->notification, buf->numberOfItems, SA_AMF_HARS_READY_FOR_ASSIGNMENT); rc = SA_AIS_ERR_NO_SPACE; + buf->numberOfItems = rsp_buf->numberOfItems; } } else { /* if(create_memory == false) */ diff --git a/osaf/libs/agents/saf/amfa/ava_hdl.cc b/osaf/libs/agents/saf/amfa/ava_hdl.cc --- a/osaf/libs/agents/saf/amfa/ava_hdl.cc +++ b/osaf/libs/agents/saf/amfa/ava_hdl.cc @@ -697,7 +697,6 @@ uint32_t ava_hdl_cbk_rec_prc(AVSV_AMF_CB ((SaAmfCallbacksT_4*)reg_cbk)->saAmfProtectionGroupTrackCallback(&pg_track->csi_name, &buf, pg_track->mem_num, pg_track->err); - free(buf.notification); } else { pg_track->err = SA_AIS_ERR_NO_MEMORY; LOG_CR("Notification is NULL: Invoking PGTrack Callback with error SA_AIS_ERR_NO_MEMORY"); @@ -740,7 +739,6 @@ uint32_t ava_hdl_cbk_rec_prc(AVSV_AMF_CB ((SaAmfCallbacksT *)reg_cbk)->saAmfProtectionGroupTrackCallback(&pg_track->csi_name, &buf, pg_track->mem_num, pg_track->err); - free(buf.notification); } else { pg_track->err = SA_AIS_ERR_NO_MEMORY; LOG_CR("Notification is NULL: Invoking PGTrack Callback with error SA_AIS_ERR_NO_MEMORY"); -- ___ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel
[devel] [PATCH 1 of 1] cpsv: To update checkpoint user number for each node [#1669] V5
osaf/libs/common/cpsv/include/cpd_cb.h |6 +- osaf/libs/common/cpsv/include/cpd_proc.h |3 + osaf/libs/common/cpsv/include/cpd_red.h | 13 ++ osaf/libs/common/cpsv/include/cpsv_evt.h |8 + osaf/services/saf/cpsv/cpd/cpd_db.c | 14 ++- osaf/services/saf/cpsv/cpd/cpd_evt.c |8 + osaf/services/saf/cpsv/cpd/cpd_mbcsv.c | 97 --- osaf/services/saf/cpsv/cpd/cpd_proc.c| 148 +++ osaf/services/saf/cpsv/cpd/cpd_red.c | 30 - osaf/services/saf/cpsv/cpd/cpd_sbevt.c | 57 +-- 10 files changed, 347 insertions(+), 37 deletions(-) Problem: --- The saCkptCheckpointNumOpeners is not updated when a node which has a checkpoint client restarts. Solution: Currently CPD doesn't store number of user on each node. This patch updates CPD to update information about users on each node for each checkpoint. When a node restarts, the CPD update the total number of users for a checkpoint accordingly. This is reflected on saCkptCheckpointNumOpeners attribute correctly. diff --git a/osaf/libs/common/cpsv/include/cpd_cb.h b/osaf/libs/common/cpsv/include/cpd_cb.h --- a/osaf/libs/common/cpsv/include/cpd_cb.h +++ b/osaf/libs/common/cpsv/include/cpd_cb.h @@ -22,7 +22,7 @@ #include #include "cpd_tmr.h" -#define CPSV_CPD_MBCSV_VERSION1 +#define CPSV_CPD_MBCSV_VERSION2 #define m_CPND_IS_ON_SCXB(m,n) ((m==n)?1:0) @@ -50,7 +50,7 @@ CPD_WRT_CPA_SUBPART_VER_MIN + 1 ) #define CPSV_CPD_MBCSV_VERSION_MIN 1 -#define CPSV_CPD_MBCSV_VERSION 1 +#define CPSV_CPD_MBCSV_VERSION_USR_INFO 2 #include "saImmOi.h" @@ -92,6 +92,8 @@ typedef struct cpd_ckpt_info_node { uint32_t num_users; uint32_t num_readers; uint32_t num_writers; + uint32_t node_users_cnt; + CPD_NODE_USER_INFO *node_users; /* for imm */ SaUint32T ckpt_used_size; diff --git a/osaf/libs/common/cpsv/include/cpd_proc.h b/osaf/libs/common/cpsv/include/cpd_proc.h --- a/osaf/libs/common/cpsv/include/cpd_proc.h +++ b/osaf/libs/common/cpsv/include/cpd_proc.h @@ -108,5 +108,8 @@ uint32_t cpd_mbcsv_enc_async_update(CPD_ uint32_t cpd_mbcsv_close(CPD_CB *cb); bool cpd_is_noncollocated_replica_present_on_payload(CPD_CB *cb, CPD_CKPT_INFO_NODE *ckpt_node); uint32_t cpd_ckpt_reploc_imm_object_delete(CPD_CB *cb, CPD_CKPT_REPLOC_INFO *ckpt_reploc_node ,bool is_unlink_set); +void cpd_proc_increase_node_user_info(CPD_CKPT_INFO_NODE *ckpt_node, MDS_DEST cpnd_dest, SaCkptCheckpointOpenFlagsT open_flags); +void cpd_proc_decrease_node_user_info(CPD_CKPT_INFO_NODE *ckpt_node, MDS_DEST cpnd_dest, SaCkptCheckpointOpenFlagsT open_flags); +void cpd_proc_update_user_info_when_node_down(CPD_CB *cb, NODE_ID node_id); uint32_t cpd_proc_ckpt_update_post(CPD_CB *cb); #endif diff --git a/osaf/libs/common/cpsv/include/cpd_red.h b/osaf/libs/common/cpsv/include/cpd_red.h --- a/osaf/libs/common/cpsv/include/cpd_red.h +++ b/osaf/libs/common/cpsv/include/cpd_red.h @@ -64,6 +64,18 @@ typedef struct cpd_a2s_ckpt_usr_info { } CPD_A2S_CKPT_USR_INFO; +typedef struct cpd_a2s_ckpt_usr_info_2 { + SaCkptCheckpointHandleT ckpt_id; + uint32_t num_user; + uint32_t num_writer; + uint32_t num_reader; + uint32_t num_sections; + uint32_t ckpt_on_scxb1; + uint32_t ckpt_on_scxb2; + uint32_t node_users_cnt; + CPD_NODE_USER_INFO *node_list; +} CPD_A2S_CKPT_USR_INFO_2; + typedef struct cpd_mbcsv_msg { CPD_MBCSV_MSG_TYPE type; union { @@ -76,6 +88,7 @@ typedef struct cpd_mbcsv_msg { CPD_A2S_CKPT_UNLINK ckpt_ulink; CPD_A2S_CKPT_USR_INFO usr_info; CPSV_CKPT_DEST_INFO dest_down; + CPD_A2S_CKPT_USR_INFO_2 usr_info_2; } info; } CPD_MBCSV_MSG; diff --git a/osaf/libs/common/cpsv/include/cpsv_evt.h b/osaf/libs/common/cpsv/include/cpsv_evt.h --- a/osaf/libs/common/cpsv/include/cpsv_evt.h +++ b/osaf/libs/common/cpsv/include/cpsv_evt.h @@ -840,6 +840,14 @@ typedef struct cpd_tmr_info { } info; } CPD_TMR_INFO; +typedef struct cpd_node_user_info { + MDS_DEST dest; + uint32_t num_users; + uint32_t num_writers; + uint32_t num_readers; + struct cpd_node_user_info *next; +} CPD_NODE_USER_INFO; + /** CPD Event Data Structures **/ diff --git a/osaf/services/saf/cpsv/cpd/cpd_db.c b/osaf/services/saf/cpsv/cpd/cpd_db.c --- a/osaf/services/saf/cpsv/cpd/cpd_db.c +++ b/osaf/services/saf/cpsv/cpd/cpd_db.c @@ -137,6 +137,7 @@ uint32_t cpd_ckpt_node_delete(CPD_CB *cb { uint32_t rc = NCSCC_RC_SUCCESS; CPD_NODE_REF_INFO *nref_info, *next_info; + CPD_NODE_USER_INFO *node_user, *next_node_user; TRACE_ENTER(); @@ -153,6 +154,13 @@ uint32_t cpd_ckpt_node_delete(CPD_CB *cb
[devel] [PATCH 0 of 1] Review Request for cpsv: To update checkpoint user number for each node [#1669] V5
Summary: cpsv: To update checkpoint user number for each node [#1669] V5 Review request for Trac Ticket(s): 1669 Peer Reviewer(s): mahesh.va...@oracle.com; anders.wid...@ericsson.com Pull request to: mahesh.va...@oracle.com; Affected branch(es): default Development branch: default Impacted area Impact y/n Docsn Build systemn RPM/packaging n Configuration files n Startup scripts n SAF servicesy OpenSAF servicesn Core libraries n Samples n Tests n Other n Comments (indicate scope for each "y" above): - changeset 09fb5a5a13c8362268fec6059aa997c942b8f257 Author: Hoang Vo Date: Fri, 19 Aug 2016 12:00:54 +0700 cpsv: To update checkpoint user number for each node [#1669] V5 Problem: --- The saCkptCheckpointNumOpeners is not updated when a node which has a checkpoint client restarts. Solution: Currently CPD doesn't store number of user on each node. This patch updates CPD to update information about users on each node for each checkpoint. When a node restarts, the CPD update the total number of users for a checkpoint accordingly. This is reflected on saCkptCheckpointNumOpeners attribute correctly. Complete diffstat: -- osaf/libs/common/cpsv/include/cpd_cb.h |6 +++- osaf/libs/common/cpsv/include/cpd_proc.h |3 ++ osaf/libs/common/cpsv/include/cpd_red.h | 13 +++ osaf/libs/common/cpsv/include/cpsv_evt.h |8 +++ osaf/services/saf/cpsv/cpd/cpd_db.c | 14 ++- osaf/services/saf/cpsv/cpd/cpd_evt.c |8 +++ osaf/services/saf/cpsv/cpd/cpd_mbcsv.c | 97 -- osaf/services/saf/cpsv/cpd/cpd_proc.c| 148 osaf/services/saf/cpsv/cpd/cpd_red.c | 30 -- osaf/services/saf/cpsv/cpd/cpd_sbevt.c | 57 + 10 files changed, 347 insertions(+), 37 deletions(-) Testing Commands: - 1. Create a checkpoint on PL3 with flag (creation flag SA_CKPT_WR_ALL_REPLICAS) 2. Open this checkpoint on PL4 3. Restart PL3 Testing, Expected Results: -- After step 3. the saCkptCheckpointNumOpeners is changed. Conditions of Submission: - ACK from maintainer Arch Built StartedLinux distro --- mipsn n mips64 n n x86 n n x86_64 y y powerpc n n powerpc64 n n Reviewer Checklist: --- [Submitters: make sure that your review doesn't trigger any checkmarks!] Your checkin has not passed review because (see checked entries): ___ Your RR template is generally incomplete; it has too many blank entries that need proper data filled in. ___ You have failed to nominate the proper persons for review and push. ___ Your patches do not have proper short+long header ___ You have grammar/spelling in your header that is unacceptable. ___ You have exceeded a sensible line length in your headers/comments/text. ___ You have failed to put in a proper Trac Ticket # into your commits. ___ You have incorrectly put/left internal data in your comments/files (i.e. internal bug tracking tool IDs, product names etc) ___ You have not given any evidence of testing beyond basic build tests. Demonstrate some level of runtime or other sanity testing. ___ You have ^M present in some of your files. These have to be removed. ___ You have needlessly changed whitespace or added whitespace crimes like trailing spaces, or spaces before tabs. ___ You have mixed real technical changes with whitespace and other cosmetic code cleanup changes. These have to be separate commits. ___ You need to refactor your submission into logical chunks; there is too much content into a single commit. ___ You have extraneous garbage in your review (merge commits etc) ___ You have giant attachments which should never have been sent; Instead you should place your content in a public tree to be pulled. ___ You have too many commits attached to an e-mail; resend as threaded commits, or place in a public tree for a pull. ___ You have resent this content multiple times without a clear indication of what has changed between each re-send. ___ You have failed to adequately and individually address all of the comments and change requests that were proposed in the initial review. ___ You have a misconfigured ~/.hgrc file
Re: [devel] [PATCH 0 of 1] Review Request for smf: Incorrect notification about AMF OI error in syslog [#1953]
Hi Lennart, Reviewed the patch. Ack. /Neel. On 2016/08/15 04:30 PM, Lennart Lund wrote: > Summary: smf: Incorrect notification about AMF OI error in syslog > Review request for Trac Ticket(s): #1953 > Peer Reviewer(s): reddy.neelaka...@oracle.com, rafael.odza...@ericsson.com > Pull request to: <> > Affected branch(es): <> > Development branch: <> > > > Impacted area Impact y/n > > Docsn > Build systemn > RPM/packaging n > Configuration files n > Startup scripts n > SAF servicesy > OpenSAF servicesn > Core libraries n > Samples n > Tests n > Other n > > > Comments (indicate scope for each "y" above): > - > > changeset 64c6a0dfb2e842a9af1bf9fcff388e81c93c6ee3 > Author: Lennart Lund > Date: Mon, 15 Aug 2016 12:55:02 +0200 > > log: Fix incorrect error-log in > SmfAdminOperation::changeNodeGroupAdminState > [#1953] > > Fix Incorrect log message "NO unlock: changeNodeGroupAdminState() Fail > SA_AIS_OK (1)" > > > Complete diffstat: > -- > osaf/services/saf/smfsv/smfd/SmfUpgradeStep.cc | 9 +++-- > 1 files changed, 7 insertions(+), 2 deletions(-) > > > Testing Commands: > - > NA > > > Testing, Expected Results: > -- > <> > > > Conditions of Submission: > - > <> > > > Arch Built StartedLinux distro > --- > mipsn n > mips64 n n > x86 n n > x86_64 n n > powerpc n n > powerpc64 n n > > > Reviewer Checklist: > --- > [Submitters: make sure that your review doesn't trigger any checkmarks!] > > > Your checkin has not passed review because (see checked entries): > > ___ Your RR template is generally incomplete; it has too many blank entries > that need proper data filled in. > > ___ You have failed to nominate the proper persons for review and push. > > ___ Your patches do not have proper short+long header > > ___ You have grammar/spelling in your header that is unacceptable. > > ___ You have exceeded a sensible line length in your headers/comments/text. > > ___ You have failed to put in a proper Trac Ticket # into your commits. > > ___ You have incorrectly put/left internal data in your comments/files > (i.e. internal bug tracking tool IDs, product names etc) > > ___ You have not given any evidence of testing beyond basic build tests. > Demonstrate some level of runtime or other sanity testing. > > ___ You have ^M present in some of your files. These have to be removed. > > ___ You have needlessly changed whitespace or added whitespace crimes > like trailing spaces, or spaces before tabs. > > ___ You have mixed real technical changes with whitespace and other > cosmetic code cleanup changes. These have to be separate commits. > > ___ You need to refactor your submission into logical chunks; there is > too much content into a single commit. > > ___ You have extraneous garbage in your review (merge commits etc) > > ___ You have giant attachments which should never have been sent; > Instead you should place your content in a public tree to be pulled. > > ___ You have too many commits attached to an e-mail; resend as threaded > commits, or place in a public tree for a pull. > > ___ You have resent this content multiple times without a clear indication > of what has changed between each re-send. > > ___ You have failed to adequately and individually address all of the > comments and change requests that were proposed in the initial review. > > ___ You have a misconfigured ~/.hgrc file (i.e. username, email etc) > > ___ Your computer have a badly configured date and time; confusing the > the threaded patch review. > > ___ Your changes affect IPC mechanism, and you don't present any results > for in-service upgradability test. > > ___ Your changes affect user manual and documentation, your patch series > do not contain the patch that updates the Doxygen manual. > -- ___ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel
Re: [devel] [PATCH 1 of 1] log: fix failed to recover app streams [#1941]
Hi Vu Ack Thanks Lennart > -Original Message- > From: Vu Minh Nguyen [mailto:vu.m.ngu...@dektech.com.au] > Sent: den 10 augusti 2016 08:40 > To: Lennart Lund ; A V Mahesh > > Cc: opensaf-devel@lists.sourceforge.net > Subject: [PATCH 1 of 1] log: fix failed to recover app streams [#1941] > > osaf/services/saf/logsv/lgs/lgs_recov.cc | 59 +-- > > 1 files changed, 32 insertions(+), 27 deletions(-) > > > create_new_app_stream() was changed and introduced new error codes in > long DN > ticket. One of them is SA_AIS_ERR_EXIST. > > When SCs restart from headless, create_new_app_stream() returns > SA_AIS_ERR_EXIST > but this error code was not handled correctly and made recovery > functionality > fail. > > lgs_restore_one_app_stream needs to be updated. > > diff --git a/osaf/services/saf/logsv/lgs/lgs_recov.cc > b/osaf/services/saf/logsv/lgs/lgs_recov.cc > --- a/osaf/services/saf/logsv/lgs/lgs_recov.cc > +++ b/osaf/services/saf/logsv/lgs/lgs_recov.cc > @@ -309,24 +309,6 @@ static int lgs_get_file_params_h(gfp_in_ > return rc; > } > > -static void lgs_remove_stream(uint32_t client_id, log_stream_t > *log_stream) > -{ > - TRACE_ENTER(); > - > - /* Remove the stream handle and > - * remove the stream resources > - */ > - if (lgs_client_stream_rmv(client_id, log_stream->streamId) < 0) { > -TRACE("%s lgs_client_stream_rmv Fail", __FUNCTION__); > - } > - > - log_free_stream_resources(log_stream); > - > - log_stream = NULL; > - > - TRACE_LEAVE(); > -} > - > /** > * Restore parameters for a lost runtime (application) stream, create the > * stream in the local stream list and associate with a client. > @@ -344,7 +326,6 @@ int lgs_restore_one_app_stream( > { > int int_rc = 0; > int rc_out = 0; > - SaAisErrorT ais_rc = SA_AIS_OK; > SaImmHandleT immOmHandle; > SaImmAttrValuesT_2 *attribute; > SaImmAttrValuesT_2 **attributes; > @@ -353,7 +334,7 @@ int lgs_restore_one_app_stream( > int list_pos; > int n; > int i = 0; > - > + SaBoolT twelveHourModeFlag = SA_FALSE; > lgsv_stream_open_req_t open_stream_param; > log_stream_t *log_stream = NULL; > SaTimeT restored_creationTimeStamp = 0; > @@ -552,23 +533,46 @@ int lgs_restore_one_app_stream( >*/ > open_stream_param.client_id = client_id; > open_stream_param.lstr_open_flags = 0; /* Dummy not used here > */ > - > open_stream_param.logFileName = const_cast *>(fileName.c_str()); > open_stream_param.logFilePathName = const_cast *>(pathName.c_str()); > > - ais_rc = create_new_app_stream(&open_stream_param, > &log_stream); > - if ( ais_rc != SA_AIS_OK) { > - TRACE("%s: create_new_app_stream Fail %s", > - __FUNCTION__, saf_error(ais_rc)); > + log_stream = log_stream_new(stream_name, STREAM_NEW); > + if (log_stream == NULL) { > rc_out = -1; > goto done_free_attr; > } > > + /** > + * No need to verify all attributes as > + * they have been verified at the time of creation > + */ > + > + /* Get twelveHourModeFlag from the logFileFmt */ > + lgs_is_valid_format_expression(open_stream_param.logFileFmt, > +STREAM_TYPE_APPLICATION, > +&twelveHourModeFlag); > + rc_out = lgs_populate_log_stream( > + open_stream_param.logFileName, > + open_stream_param.logFilePathName, > + open_stream_param.maxLogFileSize, > + open_stream_param.maxLogRecordSize, > + open_stream_param.logFileFullAction, > + open_stream_param.maxFilesRotated, > + open_stream_param.logFileFmt, > + STREAM_TYPE_APPLICATION, > + twelveHourModeFlag, > + 0, > + log_stream); // output > + if (rc_out == -1) { > + log_stream_delete(&log_stream); > + goto done_free_attr; > + } > + > /* Create an association between this client and the stream */ > int_rc = lgs_client_stream_add(client_id, log_stream->streamId); > if (int_rc == -1) { > TRACE("%s: lgs_client_stream_add Fail", __FUNCTION__); > - log_free_stream_resources(log_stream); /* Undo create > new stream */ > + log_stream_delete(&log_stream); > rc_out = -1; > goto done_free_attr; > } > @@ -606,7 +610,8 @@ int lgs_restore_one_app_stream( >/* Remove the stream handle and > * remove the stream resources > */ > - lgs_remove_stream(client_id, log_stream); > + lgs_client_stream_rmv(client_id, log_stream->streamId); > + log_stream_delete(&log_stream); > rc_out = -1; > goto done_free_attr; > } --
Re: [devel] [PATCH 0 of 1] Review Request for imm: fix string format for size_t type [#195]
Hi zoran, Reviewed the patch. Ack. /Neel. On 2016/08/18 05:46 PM, Zoran Milinkovic wrote: > Summary: imm: fix string format for size_t type [#195] > Review request for Trac Ticket(s): 195 > Peer Reviewer(s): Neelakanta, Hung > Pull request to: Zoran > Affected branch(es): default(5.1) > Development branch: default(5.1) > > > Impacted area Impact y/n > > Docsn > Build systemn > RPM/packaging n > Configuration files n > Startup scripts n > SAF servicesy > OpenSAF servicesn > Core libraries n > Samples n > Tests n > Other n > > > Comments (indicate scope for each "y" above): > - > > changeset 974ebb83278f3e1621f991d518dfee815848bbdf > Author: Zoran Milinkovic > Date: Thu, 18 Aug 2016 14:00:59 +0200 > > imm: fix string format for size_t type [#195] > > Fix string format for size_t type that IMM can be compiled with 32-bit > compiler. > > > Complete diffstat: > -- > osaf/services/saf/immsv/immnd/ImmModel.cc | 8 > 1 files changed, 4 insertions(+), 4 deletions(-) > > > Testing Commands: > - > > > Testing, Expected Results: > -- > Test that OpenSAF can be compiled with 32-bit compiler > > > Conditions of Submission: > - > Ack from Neelakanta and Hung > > > Arch Built StartedLinux distro > --- > mipsn n > mips64 n n > x86 n n > x86_64 n n > powerpc n n > powerpc64 n n > > > Reviewer Checklist: > --- > [Submitters: make sure that your review doesn't trigger any checkmarks!] > > > Your checkin has not passed review because (see checked entries): > > ___ Your RR template is generally incomplete; it has too many blank entries > that need proper data filled in. > > ___ You have failed to nominate the proper persons for review and push. > > ___ Your patches do not have proper short+long header > > ___ You have grammar/spelling in your header that is unacceptable. > > ___ You have exceeded a sensible line length in your headers/comments/text. > > ___ You have failed to put in a proper Trac Ticket # into your commits. > > ___ You have incorrectly put/left internal data in your comments/files > (i.e. internal bug tracking tool IDs, product names etc) > > ___ You have not given any evidence of testing beyond basic build tests. > Demonstrate some level of runtime or other sanity testing. > > ___ You have ^M present in some of your files. These have to be removed. > > ___ You have needlessly changed whitespace or added whitespace crimes > like trailing spaces, or spaces before tabs. > > ___ You have mixed real technical changes with whitespace and other > cosmetic code cleanup changes. These have to be separate commits. > > ___ You need to refactor your submission into logical chunks; there is > too much content into a single commit. > > ___ You have extraneous garbage in your review (merge commits etc) > > ___ You have giant attachments which should never have been sent; > Instead you should place your content in a public tree to be pulled. > > ___ You have too many commits attached to an e-mail; resend as threaded > commits, or place in a public tree for a pull. > > ___ You have resent this content multiple times without a clear indication > of what has changed between each re-send. > > ___ You have failed to adequately and individually address all of the > comments and change requests that were proposed in the initial review. > > ___ You have a misconfigured ~/.hgrc file (i.e. username, email etc) > > ___ Your computer have a badly configured date and time; confusing the > the threaded patch review. > > ___ Your changes affect IPC mechanism, and you don't present any results > for in-service upgradability test. > > ___ Your changes affect user manual and documentation, your patch series > do not contain the patch that updates the Doxygen manual. > -- ___ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel
Re: [devel] [PATCH 0 of 1] Review Request for imm: Do not revert isApplier and isPbe flag when timeout occurs [#1943]
Hi Hung, Reviewed and tested the patch. Ack. /Neel. On 2016/08/11 12:39 PM, Hung Nguyen wrote: > Summary: imm: Do not revert isApplier and isPbe flag when timeout occurs > [#1943] > Review request for Trac Ticket(s): 1943 > Peer Reviewer(s): Zoran, Neel > Pull request to: > Affected branch(es): 4.7, 5.0, 5.1 > Development branch: 5.1 > > > Impacted area Impact y/n > > Docsn > Build systemn > RPM/packaging n > Configuration files n > Startup scripts n > SAF servicesy > OpenSAF servicesn > Core libraries n > Samples n > Tests n > Other n > > > Comments (indicate scope for each "y" above): > - > > > changeset 1fe934cdf3795c62dd71b89087075c6782a7d45c > Author: Hung Nguyen > Date: Thu, 11 Aug 2016 14:08:29 +0700 > > imm: Do not revert isApplier and isPbe flag when timeout occurs [#1943] > > Do not revert isApplier and isPbe flag when timeout occurs. > > > Complete diffstat: > -- > osaf/libs/agents/saf/imma/imma_oi_api.c | 10 +- > 1 files changed, 9 insertions(+), 1 deletions(-) > > > Testing Commands: > - > > > > Testing, Expected Results: > -- > > > > Conditions of Submission: > - > Ack from reviewers. > > > Arch Built StartedLinux distro > --- > mipsn n > mips64 n n > x86 n n > x86_64 n n > powerpc n n > powerpc64 n n > > > Reviewer Checklist: > --- > [Submitters: make sure that your review doesn't trigger any checkmarks!] > > > Your checkin has not passed review because (see checked entries): > > ___ Your RR template is generally incomplete; it has too many blank entries > that need proper data filled in. > > ___ You have failed to nominate the proper persons for review and push. > > ___ Your patches do not have proper short+long header > > ___ You have grammar/spelling in your header that is unacceptable. > > ___ You have exceeded a sensible line length in your headers/comments/text. > > ___ You have failed to put in a proper Trac Ticket # into your commits. > > ___ You have incorrectly put/left internal data in your comments/files > (i.e. internal bug tracking tool IDs, product names etc) > > ___ You have not given any evidence of testing beyond basic build tests. > Demonstrate some level of runtime or other sanity testing. > > ___ You have ^M present in some of your files. These have to be removed. > > ___ You have needlessly changed whitespace or added whitespace crimes > like trailing spaces, or spaces before tabs. > > ___ You have mixed real technical changes with whitespace and other > cosmetic code cleanup changes. These have to be separate commits. > > ___ You need to refactor your submission into logical chunks; there is > too much content into a single commit. > > ___ You have extraneous garbage in your review (merge commits etc) > > ___ You have giant attachments which should never have been sent; > Instead you should place your content in a public tree to be pulled. > > ___ You have too many commits attached to an e-mail; resend as threaded > commits, or place in a public tree for a pull. > > ___ You have resent this content multiple times without a clear indication > of what has changed between each re-send. > > ___ You have failed to adequately and individually address all of the > comments and change requests that were proposed in the initial review. > > ___ You have a misconfigured ~/.hgrc file (i.e. username, email etc) > > ___ Your computer have a badly configured date and time; confusing the > the threaded patch review. > > ___ Your changes affect IPC mechanism, and you don't present any results > for in-service upgradability test. > > ___ Your changes affect user manual and documentation, your patch series > do not contain the patch that updates the Doxygen manual. > -- ___ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel
[devel] [PATCH 0 of 1] Review Request for imm: fix string format for size_t type [#195]
Summary: imm: fix string format for size_t type [#195] Review request for Trac Ticket(s): 195 Peer Reviewer(s): Neelakanta, Hung Pull request to: Zoran Affected branch(es): default(5.1) Development branch: default(5.1) Impacted area Impact y/n Docsn Build systemn RPM/packaging n Configuration files n Startup scripts n SAF servicesy OpenSAF servicesn Core libraries n Samples n Tests n Other n Comments (indicate scope for each "y" above): - changeset 974ebb83278f3e1621f991d518dfee815848bbdf Author: Zoran Milinkovic Date: Thu, 18 Aug 2016 14:00:59 +0200 imm: fix string format for size_t type [#195] Fix string format for size_t type that IMM can be compiled with 32-bit compiler. Complete diffstat: -- osaf/services/saf/immsv/immnd/ImmModel.cc | 8 1 files changed, 4 insertions(+), 4 deletions(-) Testing Commands: - Testing, Expected Results: -- Test that OpenSAF can be compiled with 32-bit compiler Conditions of Submission: - Ack from Neelakanta and Hung Arch Built StartedLinux distro --- mipsn n mips64 n n x86 n n x86_64 n n powerpc n n powerpc64 n n Reviewer Checklist: --- [Submitters: make sure that your review doesn't trigger any checkmarks!] Your checkin has not passed review because (see checked entries): ___ Your RR template is generally incomplete; it has too many blank entries that need proper data filled in. ___ You have failed to nominate the proper persons for review and push. ___ Your patches do not have proper short+long header ___ You have grammar/spelling in your header that is unacceptable. ___ You have exceeded a sensible line length in your headers/comments/text. ___ You have failed to put in a proper Trac Ticket # into your commits. ___ You have incorrectly put/left internal data in your comments/files (i.e. internal bug tracking tool IDs, product names etc) ___ You have not given any evidence of testing beyond basic build tests. Demonstrate some level of runtime or other sanity testing. ___ You have ^M present in some of your files. These have to be removed. ___ You have needlessly changed whitespace or added whitespace crimes like trailing spaces, or spaces before tabs. ___ You have mixed real technical changes with whitespace and other cosmetic code cleanup changes. These have to be separate commits. ___ You need to refactor your submission into logical chunks; there is too much content into a single commit. ___ You have extraneous garbage in your review (merge commits etc) ___ You have giant attachments which should never have been sent; Instead you should place your content in a public tree to be pulled. ___ You have too many commits attached to an e-mail; resend as threaded commits, or place in a public tree for a pull. ___ You have resent this content multiple times without a clear indication of what has changed between each re-send. ___ You have failed to adequately and individually address all of the comments and change requests that were proposed in the initial review. ___ You have a misconfigured ~/.hgrc file (i.e. username, email etc) ___ Your computer have a badly configured date and time; confusing the the threaded patch review. ___ Your changes affect IPC mechanism, and you don't present any results for in-service upgradability test. ___ Your changes affect user manual and documentation, your patch series do not contain the patch that updates the Doxygen manual. -- ___ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel
[devel] [PATCH 1 of 1] imm: fix string format for size_t type [#195]
osaf/services/saf/immsv/immnd/ImmModel.cc | 8 1 files changed, 4 insertions(+), 4 deletions(-) Fix string format for size_t type that IMM can be compiled with 32-bit compiler. diff --git a/osaf/services/saf/immsv/immnd/ImmModel.cc b/osaf/services/saf/immsv/immnd/ImmModel.cc --- a/osaf/services/saf/immsv/immnd/ImmModel.cc +++ b/osaf/services/saf/immsv/immnd/ImmModel.cc @@ -4175,7 +4175,7 @@ ImmModel::verifySchemaChange(const std:: if ( attName == immMaxClasses) { val = newAttr->mDefaultValue.getValue_int(); if( sClassMap.size() > val){ -LOG_NO("The Number of classes in the cluster %lu greater than the schema change" +LOG_NO("The Number of classes in the cluster %zu greater than the schema change" "value %d", sClassMap.size(), val); verifyFailed = true; } @@ -4184,7 +4184,7 @@ ImmModel::verifySchemaChange(const std:: if ( !verifyFailed && attName == immMaxImp) { val = newAttr->mDefaultValue.getValue_int(); if( sImplementerVector.size() > val){ -LOG_NO("The Number of Implementers in the cluster %lu greater than the schema change" +LOG_NO("The Number of Implementers in the cluster %zu greater than the schema change" "value %d", sImplementerVector.size(), val); verifyFailed = true; } @@ -4193,7 +4193,7 @@ ImmModel::verifySchemaChange(const std:: if ( !verifyFailed && attName == immMaxAdmOwn) { val = newAttr->mDefaultValue.getValue_int(); if( sOwnerVector.size() > val){ -LOG_NO("The Number of AdminOwners in the cluster %lu greater than the schema change" +LOG_NO("The Number of AdminOwners in the cluster %zu greater than the schema change" "value %d", sOwnerVector.size(), val); verifyFailed = true; } @@ -4202,7 +4202,7 @@ ImmModel::verifySchemaChange(const std:: if ( !verifyFailed && attName == immMaxCcbs) { val = newAttr->mDefaultValue.getValue_int(); if( sCcbVector.size() > val){ -LOG_NO("The Number of Ccbs in the cluster %lu greater than the schema change" +LOG_NO("The Number of Ccbs in the cluster %zu greater than the schema change" "value %d", sCcbVector.size(), val); verifyFailed = true; } -- ___ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel
Re: [devel] [PATCH 0 of 1] Review Request for immtools: Allow immadm to explicitly set ReleaseOnFinalize [#1937]
Hi Hung, Reviewed the patch. Ack. /Neel. On 2016/08/09 01:48 PM, Hung Nguyen wrote: > Summary: immtools: Allow immadm to explicitly set ReleaseOnFinalize [#1937] > Review request for Trac Ticket(s): 1937 > Peer Reviewer(s): Zoran, Neel > Pull request to: > Affected branch(es): 5.1 > Development branch: 5.1 > > > Impacted area Impact y/n > > Docsn > Build systemn > RPM/packaging n > Configuration files n > Startup scripts n > SAF servicesy > OpenSAF servicesn > Core libraries n > Samples n > Tests n > Other n > > > Comments (indicate scope for each "y" above): > - > > > changeset 5f4c240db01c21b9cccf3ba9e906b5fd2e465d91 > Author: Hung Nguyen > Date: Tue, 09 Aug 2016 14:59:42 +0700 > > immtools: Allow immadm to explicitly set ReleaseOnFinalize [#1937] > > Allow immadm to explicitly set ReleaseOnFinalize. > > > Complete diffstat: > -- > osaf/tools/safimm/immadm/imm_admin.c | 12 +++- > 1 files changed, 11 insertions(+), 1 deletions(-) > > > Testing Commands: > - > # immadm -a abc -r -o 1 test=1 > # immadm -a abc --release-on-finalize -o 1 test=1 > > > Testing, Expected Results: > -- > # immlist -a SaImmAttrAdminOwnerName test=1 > SaImmAttrAdminOwnerName= > > > Conditions of Submission: > - > Ack from reviewers. > > > Arch Built StartedLinux distro > --- > mipsn n > mips64 n n > x86 n n > x86_64 n n > powerpc n n > powerpc64 n n > > > Reviewer Checklist: > --- > [Submitters: make sure that your review doesn't trigger any checkmarks!] > > > Your checkin has not passed review because (see checked entries): > > ___ Your RR template is generally incomplete; it has too many blank entries > that need proper data filled in. > > ___ You have failed to nominate the proper persons for review and push. > > ___ Your patches do not have proper short+long header > > ___ You have grammar/spelling in your header that is unacceptable. > > ___ You have exceeded a sensible line length in your headers/comments/text. > > ___ You have failed to put in a proper Trac Ticket # into your commits. > > ___ You have incorrectly put/left internal data in your comments/files > (i.e. internal bug tracking tool IDs, product names etc) > > ___ You have not given any evidence of testing beyond basic build tests. > Demonstrate some level of runtime or other sanity testing. > > ___ You have ^M present in some of your files. These have to be removed. > > ___ You have needlessly changed whitespace or added whitespace crimes > like trailing spaces, or spaces before tabs. > > ___ You have mixed real technical changes with whitespace and other > cosmetic code cleanup changes. These have to be separate commits. > > ___ You need to refactor your submission into logical chunks; there is > too much content into a single commit. > > ___ You have extraneous garbage in your review (merge commits etc) > > ___ You have giant attachments which should never have been sent; > Instead you should place your content in a public tree to be pulled. > > ___ You have too many commits attached to an e-mail; resend as threaded > commits, or place in a public tree for a pull. > > ___ You have resent this content multiple times without a clear indication > of what has changed between each re-send. > > ___ You have failed to adequately and individually address all of the > comments and change requests that were proposed in the initial review. > > ___ You have a misconfigured ~/.hgrc file (i.e. username, email etc) > > ___ Your computer have a badly configured date and time; confusing the > the threaded patch review. > > ___ Your changes affect IPC mechanism, and you don't present any results > for in-service upgradability test. > > ___ Your changes affect user manual and documentation, your patch series > do not contain the patch that updates the Doxygen manual. > -- ___ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel
Re: [devel] [PATCH 0 of 1] Review Request for imm: Return implementer ID to timed out client [#1948]
Hi Hung, Reviewed and tested the patch. Ack. /Neel. On 2016/08/11 02:05 PM, Hung Nguyen wrote: > Summary: imm: Return implementer ID to timed out client [#1948] > Review request for Trac Ticket(s): 1948 > Peer Reviewer(s): Zoran, Neel > Pull request to: > Affected branch(es): 4.7, 5.0, 5.1 > Development branch: 5.1 > > > Impacted area Impact y/n > > Docsn > Build systemn > RPM/packaging n > Configuration files n > Startup scripts n > SAF servicesy > OpenSAF servicesn > Core libraries n > Samples n > Tests n > Other n > > > Comments (indicate scope for each "y" above): > - > > > changeset 343968c7fdfbc46dafff6a807c7c0279f97ad4e1 > Author: Hung Nguyen > Date: Thu, 11 Aug 2016 13:51:52 +0700 > > imm: Return implementer ID to timed out client [#1948] > > When receiving redundant request that comes from timed out client, > return > SA_AIS_OK with the implementer ID. > > > Complete diffstat: > -- > osaf/services/saf/immsv/immnd/ImmModel.cc | 12 ++-- > osaf/services/saf/immsv/immnd/immnd_evt.c | 9 - > osaf/services/saf/immsv/immnd/immnd_init.h | 2 +- > 3 files changed, 19 insertions(+), 4 deletions(-) > > > Testing Commands: > - > > > > Testing, Expected Results: > -- > > > > Conditions of Submission: > - > Ack from reviewers. > > > Arch Built StartedLinux distro > --- > mipsn n > mips64 n n > x86 n n > x86_64 n n > powerpc n n > powerpc64 n n > > > Reviewer Checklist: > --- > [Submitters: make sure that your review doesn't trigger any checkmarks!] > > > Your checkin has not passed review because (see checked entries): > > ___ Your RR template is generally incomplete; it has too many blank entries > that need proper data filled in. > > ___ You have failed to nominate the proper persons for review and push. > > ___ Your patches do not have proper short+long header > > ___ You have grammar/spelling in your header that is unacceptable. > > ___ You have exceeded a sensible line length in your headers/comments/text. > > ___ You have failed to put in a proper Trac Ticket # into your commits. > > ___ You have incorrectly put/left internal data in your comments/files > (i.e. internal bug tracking tool IDs, product names etc) > > ___ You have not given any evidence of testing beyond basic build tests. > Demonstrate some level of runtime or other sanity testing. > > ___ You have ^M present in some of your files. These have to be removed. > > ___ You have needlessly changed whitespace or added whitespace crimes > like trailing spaces, or spaces before tabs. > > ___ You have mixed real technical changes with whitespace and other > cosmetic code cleanup changes. These have to be separate commits. > > ___ You need to refactor your submission into logical chunks; there is > too much content into a single commit. > > ___ You have extraneous garbage in your review (merge commits etc) > > ___ You have giant attachments which should never have been sent; > Instead you should place your content in a public tree to be pulled. > > ___ You have too many commits attached to an e-mail; resend as threaded > commits, or place in a public tree for a pull. > > ___ You have resent this content multiple times without a clear indication > of what has changed between each re-send. > > ___ You have failed to adequately and individually address all of the > comments and change requests that were proposed in the initial review. > > ___ You have a misconfigured ~/.hgrc file (i.e. username, email etc) > > ___ Your computer have a badly configured date and time; confusing the > the threaded patch review. > > ___ Your changes affect IPC mechanism, and you don't present any results > for in-service upgradability test. > > ___ Your changes affect user manual and documentation, your patch series > do not contain the patch that updates the Doxygen manual. > -- ___ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel
Re: [devel] [PATCH 07 of 13] leap: support for SAF SaTimeT timeout variable in MDS transport [#1658]
Hi Mahesh, Good job! Ack with the following review comments. Not tested. * hj_tmr.c: rp_tmr_time_left_in_sec(time_t tmr_trig_at, *uint32**_t* tmr_value) ==> change uint32_t to int64_t. * ncs_tmr.h: #define m_RP_TMR_LOG_MSG(str, val) printf("%s :: %x\n", str, *(uint32_t*)val); ==> has to print int64_t value. * nodeinit.c: time_out = atoi(q);, ==> should be atoll(). * Minor comment: Following services code shall also need to update to int64_t. Hopefully svc owners can take care of them. osaf/services/saf/smfsv/smfnd/smfnd_evt.c: cmd_info.i_timeout_in_ms = i_timeout; osaf/services/saf/amf/amfnd/clc.cc: cmd_info.i_timeout_in_ms = (uint32_t)((clc_info->cmds[cmd_type - 1].timeout) / 100); osaf/services/saf/amf/amfnd/clc.cc: clc_info->cmds[cmd_type - 1].timeout, cmd_info.i_timeout_in_ms); * Also need to update test code accordingly osaf/libs/core/leap/tests/sysf_tmr_test.cc * Hopefully you will be taking care of validating these patches on 32-bit machines too?. Also, compiling them with GCC 6.1 version etc. Also, all the services owners need to review the service specific patch(es) of #1658. Best Regards, Ramesh. On 8/9/2016 11:45 AM, mahesh.va...@oracle.com wrote: > osaf/libs/core/common/include/osaf_poll.h| 4 ++-- > osaf/libs/core/common/include/osaf_secutil.h | 2 +- > osaf/libs/core/common/osaf_poll.c| 9 + > osaf/libs/core/common/osaf_secutil.c | 8 > osaf/libs/core/include/ncs_osprm.h | 2 +- > osaf/libs/core/include/ncs_tmr.h | 8 > osaf/libs/core/include/ncssysf_tmr.h | 4 ++-- > osaf/libs/core/leap/hj_tmr.c | 22 +++--- > osaf/libs/core/leap/include/sysf_exc_scr.h | 2 +- > osaf/libs/core/leap/sysf_tmr.c | 10 +- > osaf/services/infrastructure/nid/nodeinit.h | 2 +- > 11 files changed, 37 insertions(+), 36 deletions(-) > > > diff --git a/osaf/libs/core/common/include/osaf_poll.h > b/osaf/libs/core/common/include/osaf_poll.h > --- a/osaf/libs/core/common/include/osaf_poll.h > +++ b/osaf/libs/core/common/include/osaf_poll.h > @@ -43,7 +43,7 @@ extern "C" { >* >* The return value will always be in the range [0, i_nfds]. >*/ > -extern unsigned osaf_poll(struct pollfd* io_fds, nfds_t i_nfds, int > i_timeout); > +extern unsigned osaf_poll(struct pollfd* io_fds, nfds_t i_nfds, int64_t > i_timeout); > > /** >* @brief Wait for events on file descriptors > @@ -88,7 +88,7 @@ extern unsigned osaf_ppoll(struct pollfd >* >* The return value from this function will always be in the range [-1, 1]. >*/ > -extern int osaf_poll_one_fd(int i_fd, int i_timeout); > +extern int osaf_poll_one_fd(int i_fd, int64_t i_timeout); > > #ifdef __cplusplus > } > diff --git a/osaf/libs/core/common/include/osaf_secutil.h > b/osaf/libs/core/common/include/osaf_secutil.h > --- a/osaf/libs/core/common/include/osaf_secutil.h > +++ b/osaf/libs/core/common/include/osaf_secutil.h > @@ -58,7 +58,7 @@ extern "C" { >*/ > int osaf_auth_server_connect(const char *path, >const void *req_buf, size_t req_size, void > *resp_buf, size_t resp_size, > - int timeout); > + int64_t timeout); > > /** >* Type for callback installed on server side > diff --git a/osaf/libs/core/common/osaf_poll.c > b/osaf/libs/core/common/osaf_poll.c > --- a/osaf/libs/core/common/osaf_poll.c > +++ b/osaf/libs/core/common/osaf_poll.c > @@ -15,12 +15,13 @@ >* >*/ > > -#include "osaf_poll.h" > #include > #include > #include "osaf_time.h" > #include "osaf_utility.h" > #include "logtrace.h" > +#include "osaf_poll.h" > + > > static unsigned osaf_poll_no_timeout(struct pollfd* io_fds, nfds_t i_nfds); > > @@ -35,7 +36,7 @@ static unsigned osaf_poll_no_timeout(str > return result; > } > > -unsigned osaf_poll(struct pollfd* io_fds, nfds_t i_nfds, int i_timeout) > +unsigned osaf_poll(struct pollfd* io_fds, nfds_t i_nfds, int64_t i_timeout) > { > struct timespec timeout_ts; > if (i_timeout < 0) return osaf_poll_no_timeout(io_fds, i_nfds); > @@ -120,14 +121,14 @@ unsigned osaf_ppoll(struct pollfd* io_fd > return result; > } > > -int osaf_poll_one_fd(int i_fd, int i_timeout) > +int osaf_poll_one_fd(int i_fd, int64_t i_timeout) > { > struct pollfd set = { .fd = i_fd, .events = POLLIN, .revents = 0 }; > unsigned result; > result = osaf_poll(&set, 1, i_timeout); > if (result == 1) { > if ((set.revents & (POLLNVAL | POLLERR)) != 0) { > - LOG_ER("osaf_poll_one_fd(%d, %d) called from %p " > + LOG_ER("osaf_poll_one_fd(%d, %" PRId64 ") called from > %p " > "failed: revents=%hd", > i_fd, i_timeout, __builtin_r
[devel] [PATCH 1 of 1] cpa: remove multiple sync_send() calls in case of multiple vector write [#1849]
osaf/libs/agents/saf/cpa/cpa_api.c | 17 - 1 files changed, 8 insertions(+), 9 deletions(-) Issue : In current saCkptCheckpointWrite() , in case of multiple ioVector write case ( > 1 ) multiple calls made for cpa_mds_msg_sync_send() , which is cause performance issue . Fix : It is not required to call cpa_mds_msg_sync_send() multiple time , so fixed to call only once. 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 @@ -3523,17 +3523,16 @@ SaAisErrorT saCkptCheckpointWrite(SaCkpt /* Unlock cpa_lock before calling mds api */ m_NCS_UNLOCK(&cb->cb_lock, NCS_LOCK_WRITE); - for (iter = 0; iter < numberOfElements; iter++) { + for (iter = 0; iter < numberOfElements; iter++) all_ioVector_size += ioVector[iter].dataSize; - time_out = CPA_WAIT_TIME(all_ioVector_size); - - if (time_out < CPSV_WAIT_TIME) { - time_out = CPSV_WAIT_TIME; - } - proc_rc = cpa_mds_msg_sync_send(cb->cpa_mds_hdl, &(gc_node->active_mds_dest), + + time_out = CPA_WAIT_TIME(all_ioVector_size); + if (time_out < CPSV_WAIT_TIME) { + time_out = CPSV_WAIT_TIME; + } + + proc_rc = cpa_mds_msg_sync_send(cb->cpa_mds_hdl, &(gc_node->active_mds_dest), &evt, &out_evt, time_out); - - } /* Generate rc from proc_rc */ switch (proc_rc) { -- ___ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel
[devel] [PATCH 0 of 1] Review Request for cpa: remove multiple sync_send() calls in case of multiple vector write [#1849]
Summary:cpa: remove multiple sync_send() calls in case of multiple vector write [#1849] Review request for Trac Ticket(s): #1849 Peer Reviewer(s): Nhat,Hoang Pull request to: <> Affected branch(es): default, 5.0 Development branch: default Impacted area Impact y/n Docsn Build systemn RPM/packaging n Configuration files n Startup scripts n SAF servicesn OpenSAF servicesy Core libraries n Samples n Tests n Other n Comments (indicate scope for each "y" above): - changeset 015adb911df29e21a4c97540cb06efabfa71987a Author: A V Mahesh Date: Thu, 18 Aug 2016 14:33:13 +0530 cpa: remove multiple sync_send() calls in case of multiple vector write [#1849] Issue : In current saCkptCheckpointWrite() , in case of multiple ioVector write case ( > 1 ) multiple calls made for cpa_mds_msg_sync_send() , which is cause performance issue . Fix : It is not required to call cpa_mds_msg_sync_send() multiple time , so fixed to call only once. Complete diffstat: -- osaf/libs/agents/saf/cpa/cpa_api.c | 17 - 1 files changed, 8 insertions(+), 9 deletions(-) Testing Commands: - Do saCkptCheckpointWrite() with multiple ioVector before & after patch performance should improve. Testing, Expected Results: -- Conditions of Submission: - <> Arch Built StartedLinux distro --- mipsn n mips64 n n x86 n n x86_64 y y powerpc n n powerpc64 n n Reviewer Checklist: --- [Submitters: make sure that your review doesn't trigger any checkmarks!] Your checkin has not passed review because (see checked entries): ___ Your RR template is generally incomplete; it has too many blank entries that need proper data filled in. ___ You have failed to nominate the proper persons for review and push. ___ Your patches do not have proper short+long header ___ You have grammar/spelling in your header that is unacceptable. ___ You have exceeded a sensible line length in your headers/comments/text. ___ You have failed to put in a proper Trac Ticket # into your commits. ___ You have incorrectly put/left internal data in your comments/files (i.e. internal bug tracking tool IDs, product names etc) ___ You have not given any evidence of testing beyond basic build tests. Demonstrate some level of runtime or other sanity testing. ___ You have ^M present in some of your files. These have to be removed. ___ You have needlessly changed whitespace or added whitespace crimes like trailing spaces, or spaces before tabs. ___ You have mixed real technical changes with whitespace and other cosmetic code cleanup changes. These have to be separate commits. ___ You need to refactor your submission into logical chunks; there is too much content into a single commit. ___ You have extraneous garbage in your review (merge commits etc) ___ You have giant attachments which should never have been sent; Instead you should place your content in a public tree to be pulled. ___ You have too many commits attached to an e-mail; resend as threaded commits, or place in a public tree for a pull. ___ You have resent this content multiple times without a clear indication of what has changed between each re-send. ___ You have failed to adequately and individually address all of the comments and change requests that were proposed in the initial review. ___ You have a misconfigured ~/.hgrc file (i.e. username, email etc) ___ Your computer have a badly configured date and time; confusing the the threaded patch review. ___ Your changes affect IPC mechanism, and you don't present any results for in-service upgradability test. ___ Your changes affect user manual and documentation, your patch series do not contain the patch that updates the Doxygen manual. -- ___ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel
Re: [devel] [PATCH 1 of 1] MDS: Log TIPC dropped messages [#1957]
Hi HansN, It seem you missed to see below : On 8/12/2016 9:11 AM, A V Mahesh wrote: > Hi HansN, > > We were having ticket for this raised by Hans Feldt > `https://sourceforge.net/p/opensaf/tickets/634/` > > at that time i have give my analysis base the MDS code at that time as > below please check. > > > > > > The Linux TIPC 2.0 Programmer's Guide in section 1.5.7. Multicast > Message Delivery mention that. > > The TIPC currently does not permit an application to send a multicast > message with the "destination droppable" setting disabled. > Consequently, TIPC will never try to return an undeliverable multicast > message to its sender. > > so if we set destination droppable disabled , multicast is not permitted > I experimented setting TIPC_DEST_DROPPABLE=off in multicast_demo and > observed that multicast is working > > As if The Opensaf using multicast , it is not allowed to set > TIPC_DEST_DROPPABLE=off > > == > So the TIPC_DEST_DROPPABLE should be enabled only if MDS_TIPC_MCAST_ENABLED is disabled, currently by default TIPC Multicast Messaging Setting enabled (MDS_TIPC_MCAST_ENABLED =1 ) in /etc/opensaf/nid.conf , if TIPC Multicast Messagingis disabled we can set TIPC_DEST_DROPPABLE dynamically. == # This is valid when above MDS_TRANSPORT is set to TIPC. # Setting MDS_TIPC_MCAST_ENABLED to 1 or 0, allows OpenSAF # to enable or disable TIPC Multicast Messaging. # By Default TIPC Multicast Messaging is Enabled. # Note: In case of TIPC Multicast Messaging disabled (0), the performance # of OpenSAF will be considerably lower as compared to Enabled (1). export MDS_TIPC_MCAST_ENABLED=1 == -AVM On 8/18/2016 2:43 PM, Hans Nordeback wrote: > osaf/libs/core/mds/mds_dt_tipc.c | 32 +--- > 1 files changed, 25 insertions(+), 7 deletions(-) > > > diff --git a/osaf/libs/core/mds/mds_dt_tipc.c > b/osaf/libs/core/mds/mds_dt_tipc.c > --- a/osaf/libs/core/mds/mds_dt_tipc.c > +++ b/osaf/libs/core/mds/mds_dt_tipc.c > @@ -320,6 +320,15 @@ uint32_t mdtm_tipc_init(NODE_ID nodeid, > m_MDS_LOG_INFO("MDTM: Successfully set default socket > option TIPC_IMP = %d", TIPCIMPORTANCE); > } > > +int droppable = 0; > +if (setsockopt(tipc_cb.BSRsock, SOL_TIPC, TIPC_DEST_DROPPABLE, > &droppable, sizeof(droppable)) != 0) { > +LOG_ER("MDTM: Can't set TIPC_DEST_DROPPABLE to zero err > :%s\n", strerror(errno)); > +m_MDS_LOG_ERR("MDTM: Can't set TIPC_DEST_DROPPABLE to zero > err :%s\n", strerror(errno)); > +osafassert(0); > +} else { > +m_MDS_LOG_NOTIFY("MDTM: Successfully set TIPC_DEST_DROPPABLE > to zero"); > +} > + > return NCSCC_RC_SUCCESS; > } > > @@ -563,6 +572,8 @@ ssize_t recvfrom_connectionless (int sd, > unsigned char *cptr; > int i; > int has_addr; > + int anc_data[2]; > + > ssize_t sz; > > has_addr = (from != NULL) && (addrlen != NULL); > @@ -591,19 +602,26 @@ ssize_t recvfrom_connectionless (int sd, > if the message was sent using a TIPC name or name > sequence as the > destination rather than a TIPC port ID So abort for > TIPC_ERRINFO and TIPC_RETDATA*/ > if (anc->cmsg_type == TIPC_ERRINFO) { > - /* TIPC_ERRINFO - TIPC error code associated > with a returned data message or a connection termination message so abort */ > - m_MDS_LOG_CRITICAL("MDTM: undelivered message > condition ancillary data: TIPC_ERRINFO abort err :%s", strerror(errno) ); > - abort(); > + anc_data[0] = *((unsigned int*)(CMSG_DATA(anc) > + 0)); > + if (anc_data[0] == TIPC_ERR_OVERLOAD) { > + LOG_CR("MDTM: undelivered message > condition ancillary data: TIPC_ERR_OVERLOAD"); > + m_MDS_LOG_CRITICAL("MDTM: undelivered > message condition ancillary data: TIPC_ERR_OVERLOAD"); > + } else { > + /* TIPC_ERRINFO - TIPC error code > associated with a returned data message or a connection termination message > so abort */ > + LOG_CR("MDTM: undelivered message > condition ancillary data: TIPC_ERRINFO abort err : %d", anc_data[0]); > + m_MDS_LOG_CRITICAL("MDTM: undelivered > message condition ancillary data: TIPC_ERRINFO abort err : %d", anc_data[0]); > + } >
[devel] [PATCH 1 of 1] MDS: Log TIPC dropped messages [#1957]
osaf/libs/core/mds/mds_dt_tipc.c | 32 +--- 1 files changed, 25 insertions(+), 7 deletions(-) diff --git a/osaf/libs/core/mds/mds_dt_tipc.c b/osaf/libs/core/mds/mds_dt_tipc.c --- a/osaf/libs/core/mds/mds_dt_tipc.c +++ b/osaf/libs/core/mds/mds_dt_tipc.c @@ -320,6 +320,15 @@ uint32_t mdtm_tipc_init(NODE_ID nodeid, m_MDS_LOG_INFO("MDTM: Successfully set default socket option TIPC_IMP = %d", TIPCIMPORTANCE); } +int droppable = 0; +if (setsockopt(tipc_cb.BSRsock, SOL_TIPC, TIPC_DEST_DROPPABLE, &droppable, sizeof(droppable)) != 0) { +LOG_ER("MDTM: Can't set TIPC_DEST_DROPPABLE to zero err :%s\n", strerror(errno)); +m_MDS_LOG_ERR("MDTM: Can't set TIPC_DEST_DROPPABLE to zero err :%s\n", strerror(errno)); +osafassert(0); +} else { +m_MDS_LOG_NOTIFY("MDTM: Successfully set TIPC_DEST_DROPPABLE to zero"); +} + return NCSCC_RC_SUCCESS; } @@ -563,6 +572,8 @@ ssize_t recvfrom_connectionless (int sd, unsigned char *cptr; int i; int has_addr; + int anc_data[2]; + ssize_t sz; has_addr = (from != NULL) && (addrlen != NULL); @@ -591,19 +602,26 @@ ssize_t recvfrom_connectionless (int sd, if the message was sent using a TIPC name or name sequence as the destination rather than a TIPC port ID So abort for TIPC_ERRINFO and TIPC_RETDATA*/ if (anc->cmsg_type == TIPC_ERRINFO) { - /* TIPC_ERRINFO - TIPC error code associated with a returned data message or a connection termination message so abort */ - m_MDS_LOG_CRITICAL("MDTM: undelivered message condition ancillary data: TIPC_ERRINFO abort err :%s", strerror(errno) ); - abort(); + anc_data[0] = *((unsigned int*)(CMSG_DATA(anc) + 0)); + if (anc_data[0] == TIPC_ERR_OVERLOAD) { + LOG_CR("MDTM: undelivered message condition ancillary data: TIPC_ERR_OVERLOAD"); + m_MDS_LOG_CRITICAL("MDTM: undelivered message condition ancillary data: TIPC_ERR_OVERLOAD"); + } else { + /* TIPC_ERRINFO - TIPC error code associated with a returned data message or a connection termination message so abort */ + LOG_CR("MDTM: undelivered message condition ancillary data: TIPC_ERRINFO abort err : %d", anc_data[0]); + m_MDS_LOG_CRITICAL("MDTM: undelivered message condition ancillary data: TIPC_ERRINFO abort err : %d", anc_data[0]); + } } else if (anc->cmsg_type == TIPC_RETDATA) { - /* If we set TIPC_DEST_DROPPABLE off messge (configure TIPC to return rejected messages to the sender ) + /* If we set TIPC_DEST_DROPPABLE off message (configure TIPC to return rejected messages to the sender ) we will hit this when we implement MDS retransmit lost messages abort can be replaced with flow control logic*/ for (i = anc->cmsg_len - sizeof(*anc); i > 0; i--) { - m_MDS_LOG_DBG("MDTM: returned byte 0x%02x\n", *cptr); + LOG_CR("MDTM: returned byte 0x%02x\n", *cptr); + m_MDS_LOG_CRITICAL("MDTM: returned byte 0x%02x\n", *cptr); cptr++; } /* TIPC_RETDATA -The contents of a returned data message so abort */ - m_MDS_LOG_CRITICAL("MDTM: undelivered message condition ancillary data: TIPC_RETDATA abort err :%s", strerror(errno) ); - abort(); + LOG_CR("MDTM: undelivered message condition ancillary data: TIPC_RETDATA"); + m_MDS_LOG_CRITICAL("MDTM: undelivered message condition ancillary data: TIPC_RETDATA"); } else if (anc->cmsg_type == TIPC_DESTNAME) { if (sz == 0) { m_MDS_LOG_DBG("MDTM: recd bytes=0 on received on sock, abnormal/unknown condition. Ignoring"); -- ___ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel
[devel] [PATCH 0 of 1] Review Request for MDS: Log TIPC dropped messages [#1957]
Summary: MDS: Log TIPC dropped messages Review request for Trac Ticket(s): #1957 Peer Reviewer(s): AndersW, Mathi, Mahesh Pull request to: Affected branch(es): default Development branch: default Impacted area Impact y/n Docsn Build systemn RPM/packaging n Configuration files n Startup scripts n SAF servicesn OpenSAF servicesn Core libraries y Samples n Tests n Other n Comments (indicate scope for each "y" above): - <> changeset ff10fa76e2e59ba1a16b625a8d997f461c71ed2f Author: Hans Nordeback Date: Wed, 03 Aug 2016 10:23:52 +0200 MDS: Log TIPC dropped messages [#1957] Complete diffstat: -- osaf/libs/core/mds/mds_dt_tipc.c | 32 +--- 1 files changed, 25 insertions(+), 7 deletions(-) Testing Commands: - <> Testing, Expected Results: -- <> Conditions of Submission: - <> Arch Built StartedLinux distro --- mipsn n mips64 n n x86 n n x86_64 y y powerpc n n powerpc64 n n Reviewer Checklist: --- [Submitters: make sure that your review doesn't trigger any checkmarks!] Your checkin has not passed review because (see checked entries): ___ Your RR template is generally incomplete; it has too many blank entries that need proper data filled in. ___ You have failed to nominate the proper persons for review and push. ___ Your patches do not have proper short+long header ___ You have grammar/spelling in your header that is unacceptable. ___ You have exceeded a sensible line length in your headers/comments/text. ___ You have failed to put in a proper Trac Ticket # into your commits. ___ You have incorrectly put/left internal data in your comments/files (i.e. internal bug tracking tool IDs, product names etc) ___ You have not given any evidence of testing beyond basic build tests. Demonstrate some level of runtime or other sanity testing. ___ You have ^M present in some of your files. These have to be removed. ___ You have needlessly changed whitespace or added whitespace crimes like trailing spaces, or spaces before tabs. ___ You have mixed real technical changes with whitespace and other cosmetic code cleanup changes. These have to be separate commits. ___ You need to refactor your submission into logical chunks; there is too much content into a single commit. ___ You have extraneous garbage in your review (merge commits etc) ___ You have giant attachments which should never have been sent; Instead you should place your content in a public tree to be pulled. ___ You have too many commits attached to an e-mail; resend as threaded commits, or place in a public tree for a pull. ___ You have resent this content multiple times without a clear indication of what has changed between each re-send. ___ You have failed to adequately and individually address all of the comments and change requests that were proposed in the initial review. ___ You have a misconfigured ~/.hgrc file (i.e. username, email etc) ___ Your computer have a badly configured date and time; confusing the the threaded patch review. ___ Your changes affect IPC mechanism, and you don't present any results for in-service upgradability test. ___ Your changes affect user manual and documentation, your patch series do not contain the patch that updates the Doxygen manual. -- ___ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel
[devel] [PATCH 0 of 1] Review Request for amfd: ensure long DNs are sent correctly to NTF [#1642]
Summary: amfd: ensure long DNs are sent correctly to NTF [#1642] Review request for Trac Ticket(s): 1642 Peer Reviewer(s): <> Pull request to: <> Affected branch(es): default Development branch: default Impacted area Impact y/n Docsn Build systemn RPM/packaging n Configuration files n Startup scripts n SAF servicesy OpenSAF servicesn Core libraries n Samples n Tests n Other n Comments (indicate scope for each "y" above): - changeset a2f9faa0826712ba4403d844ac6d16a243c84a88 Author: Gary Lee Date: Thu, 18 Aug 2016 17:36:49 +1000 amfd: ensure long DNs are sent correctly to NTF [#1642] Ensure long DNs are sent correctly in NTF additional info Add missing or correct misplaced TRACE_LEAVE() Complete diffstat: -- osaf/services/saf/amf/amfd/include/ntf.h |1 - osaf/services/saf/amf/amfd/ntf.cc| 105 - osaf/services/saf/amf/amfd/si.cc |2 +- 3 files changed, 41 insertions(+), 67 deletions(-) Testing Commands: - run AMF demo with long DN entities Testing, Expected Results: -- Ensure NTF additional info in NTF notifications are properly formatted Conditions of Submission: - <> Arch Built StartedLinux distro mipsn n mips64 n n x86 n n x86_64 y y powerpc n n powerpc64 n n Reviewer Checklist: --- [Submitters: make sure that your review doesn't trigger any checkmarks!] Your checkin has not passed review because (see checked entries): ___ Your RR template is generally incomplete; it has too many blank entries that need proper data filled in. ___ You have failed to nominate the proper persons for review and push. ___ Your patches do not have proper short+long header ___ You have grammar/spelling in your header that is unacceptable. ___ You have exceeded a sensible line length in your headers/comments/text. ___ You have failed to put in a proper Trac Ticket # into your commits. ___ You have incorrectly put/left internal data in your comments/files (i.e. internal bug tracking tool IDs, product names etc) ___ You have not given any evidence of testing beyond basic build tests. Demonstrate some level of runtime or other sanity testing. ___ You have ^M present in some of your files. These have to be removed. ___ You have needlessly changed whitespace or added whitespace crimes like trailing spaces, or spaces before tabs. ___ You have mixed real technical changes with whitespace and other cosmetic code cleanup changes. These have to be separate commits. ___ You need to refactor your submission into logical chunks; there is too much content into a single commit. ___ You have extraneous garbage in your review (merge commits etc) ___ You have giant attachments which should never have been sent; Instead you should place your content in a public tree to be pulled. ___ You have too many commits attached to an e-mail; resend as threaded commits, or place in a public tree for a pull. ___ You have resent this content multiple times without a clear indication of what has changed between each re-send. ___ You have failed to adequately and individually address all of the comments and change requests that were proposed in the initial review. ___ You have a misconfigured ~/.hgrc file (i.e. username, email etc) ___ Your computer have a badly configured date and time; confusing the the threaded patch review. ___ Your changes affect IPC mechanism, and you don't present any results for in-service upgradability test. ___ Your changes affect user manual and documentation, your patch series do not contain the patch that updates the Doxygen manual. -- ___ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel
[devel] [PATCH 1 of 1] amfd: ensure long DNs are sent correctly to NTF [#1642]
osaf/services/saf/amf/amfd/include/ntf.h |1 - osaf/services/saf/amf/amfd/ntf.cc| 105 +++--- osaf/services/saf/amf/amfd/si.cc |2 +- 3 files changed, 41 insertions(+), 67 deletions(-) Ensure long DNs are sent correctly in NTF additional info Add missing or correct misplaced TRACE_LEAVE() diff --git a/osaf/services/saf/amf/amfd/include/ntf.h b/osaf/services/saf/amf/amfd/include/ntf.h --- a/osaf/services/saf/amf/amfd/include/ntf.h +++ b/osaf/services/saf/amf/amfd/include/ntf.h @@ -31,7 +31,6 @@ #include #include -#define ADDITION_TEXT_LENGTH 320 #define AMF_NTF_SENDER "safApp=safAmfService" /* All states like oper, readiness etc starts from 1, so defining not applicable values */ diff --git a/osaf/services/saf/amf/amfd/ntf.cc b/osaf/services/saf/amf/amfd/ntf.cc --- a/osaf/services/saf/amf/amfd/ntf.cc +++ b/osaf/services/saf/amf/amfd/ntf.cc @@ -42,22 +42,20 @@ */ void avd_send_comp_inst_failed_alarm(const std::string& comp_name, const std::string& node_name) { - char add_text[ADDITION_TEXT_LENGTH]; const SaNameTWrapper node(node_name); + const std::string add_text("Instantiation of Component " + comp_name + " failed"); TRACE_ENTER(); - - snprintf(add_text, ADDITION_TEXT_LENGTH, "Instantiation of Component %s failed", - comp_name.c_str()); sendAlarmNotificationAvd(avd_cb, comp_name, -(SaUint8T*)add_text, +(SaUint8T*)add_text.c_str(), SA_SVC_AMF, SA_AMF_NTFID_COMP_INSTANTIATION_FAILED, SA_NTF_SOFTWARE_ERROR, SA_NTF_SEVERITY_MAJOR, (NCSCONTEXT)(static_cast(node)), true /* add_info is node_name */); + TRACE_LEAVE(); } /* @@ -75,23 +73,20 @@ void avd_send_comp_inst_failed_alarm(con */ void avd_send_comp_clean_failed_alarm(const std::string& comp_name, const std::string& node_name) { - char add_text[ADDITION_TEXT_LENGTH]; + const std::string add_text("Cleanup of Component " + comp_name + " failed"); + const SaNameTWrapper node(node_name); TRACE_ENTER(); - - snprintf(add_text, ADDITION_TEXT_LENGTH, "Cleanup of Component %s failed", - comp_name.c_str()); - const SaNameTWrapper node(node_name); sendAlarmNotificationAvd(avd_cb, comp_name, -(SaUint8T*)add_text, +(SaUint8T*)add_text.c_str(), SA_SVC_AMF, SA_AMF_NTFID_COMP_CLEANUP_FAILED, SA_NTF_SOFTWARE_ERROR, SA_NTF_SEVERITY_MAJOR, (NCSCONTEXT)static_cast(node), -true /* add_info is node_name */); - +true /* add_info is node_name */); + TRACE_LEAVE(); } /* Name : avd_send_cluster_reset_alarm @@ -110,22 +105,18 @@ void avd_send_comp_clean_failed_alarm(co */ void avd_send_cluster_reset_alarm(const std::string& comp_name) { - char add_text[ADDITION_TEXT_LENGTH]; - TRACE_ENTER(); - - snprintf(add_text, ADDITION_TEXT_LENGTH, "Failure of Component %s triggered" - " cluster reset", comp_name.c_str()); + const std::string add_text("Failure of Component " + comp_name + " triggered cluster reset"); sendAlarmNotificationAvd(avd_cb, comp_name, -(SaUint8T*)add_text, +(SaUint8T*)add_text.c_str(), SA_SVC_AMF, SA_AMF_NTFID_CLUSTER_RESET, SA_NTF_SOFTWARE_ERROR, SA_NTF_SEVERITY_MAJOR, nullptr, false /* No add_info */); - + TRACE_LEAVE(); } /* @@ -141,22 +132,20 @@ void avd_send_cluster_reset_alarm(const */ void avd_send_si_unassigned_alarm(const std::string& si_name) { - char add_text[ADDITION_TEXT_LENGTH]; + const std::string add_text("
[devel] [PATCH 7 of 8] ckpt: Add new test cases to verify long DN feature on CPSV [#1574] v1
tests/cpsv/Makefile.am |1 + tests/cpsv/test_cpa.c | 180 +++- tests/cpsv/test_cpa_util.c | 16 +++- tests/cpsv/test_cpsv.h |6 + tests/cpsv/test_cpsv_conf.h |3 + 5 files changed, 201 insertions(+), 5 deletions(-) diff --git a/tests/cpsv/Makefile.am b/tests/cpsv/Makefile.am --- a/tests/cpsv/Makefile.am +++ b/tests/cpsv/Makefile.am @@ -21,6 +21,7 @@ MAINTAINERCLEANFILES = Makefile.in bin_PROGRAMS = ckpttest ckpttest_CPPFLAGS = \ + -DSA_EXTENDED_NAME_SOURCE \ $(AM_CPPFLAGS) \ -I$(top_srcdir)/tests/unit_test_fw/inc \ -I$(top_srcdir)/osaf/libs/common/immsv/include \ diff --git a/tests/cpsv/test_cpa.c b/tests/cpsv/test_cpa.c --- a/tests/cpsv/test_cpa.c +++ b/tests/cpsv/test_cpa.c @@ -1,6 +1,8 @@ #include #include +#include "saAis.h" +#include "osaf_extended_name.h" #include "test_cpsv.h" #include "test_cpsv_conf.h" #include "ncs_main_papi.h" @@ -42,6 +44,10 @@ const char *saf_error_string[] = { #define m_TEST_CPSV_PRINTF(...) #endif +#define VALID_EXTENDED_NAME_LENGTH 400 +#define INVALID_EXTENDED_NAME_LENGTH 2049 + + extern int gl_prev_act; /** Ultility Functions / @@ -82,6 +88,18 @@ void printResult(int result) } +bool is_extended_name_enable() { + + char *extended_name_env = getenv("SA_ENABLE_EXTENDED_NAMES"); + if (extended_name_env == 0) + return false; + + if (strcmp(extended_name_env, "1") != 0) + return false; + + return true; +} + void handleAssigner(SaInvocationT invocation, SaCkptCheckpointHandleT checkpointHandle) { if (invocation == 1014) @@ -122,8 +140,7 @@ void fill_ckpt_attri(SaCkptCheckpointCre void fill_ckpt_name(SaNameT *name,char *string) { - strcpy((char *)name->value,string); - name->length = strlen((char *)name->value); + saAisNameLend(string, name); } void fill_sec_attri(SaCkptSectionCreationAttributesT *sec_cr_attr,SaCkptSectionIdT *sec,SaTimeT exp_time) @@ -279,6 +296,20 @@ void fill_testcase_data() fill_ckpt_name(&tcd.weak_replica_ckpt_large,"safCkpt=weak_replica_large_ckpt,safApp=safCkptService"); fill_ckpt_name(&tcd.collocated_ckpt_large,"safCkpt=collocated_large_ckpt,safApp=safCkptService"); + char *ckpt_name = malloc(VALID_EXTENDED_NAME_LENGTH); + memset(ckpt_name, 0, VALID_EXTENDED_NAME_LENGTH); + memset(ckpt_name, '.', VALID_EXTENDED_NAME_LENGTH - 1); + int length = sprintf(ckpt_name, "safCkpt=all_replicas_ckpt_with_valid_extended_name_length"); + *(ckpt_name + length) = '.'; + saAisNameLend(ckpt_name, &tcd.all_replicas_ckpt_with_valid_extended_name_length); + + ckpt_name = malloc(INVALID_EXTENDED_NAME_LENGTH); + memset(ckpt_name, 0, INVALID_EXTENDED_NAME_LENGTH); + memset(ckpt_name, '.', INVALID_EXTENDED_NAME_LENGTH - 1); + length = sprintf(ckpt_name, "safCkpt=all_replicas_ckpt_with_invalid_extended_name_length"); + *(ckpt_name + length) = '.'; + saAisNameLend(ckpt_name, &tcd.all_replicas_ckpt_with_invalid_extended_name_length); + /* Variables for sec create */ tcd.sec_id1 = (SaUint8T*)"11"; tcd.section1.idLen = 2; @@ -451,6 +482,9 @@ void test_ckpt_cleanup(CPSV_CLEANUP_CKPT error = test_ckptUnlink(CKPT_UNLINK_SUCCESS9_T,TEST_CONFIG_MODE); break; + case CPSV_CLEAN_ASYNC_ALL_REPLICAS_CKPT_EXTENDED_NAME: + error = test_ckptUnlink(CKPT_UNLINK_ALL_REPLICAS_EXTENDED_NAME_SUCCESS_T,TEST_CONFIG_MODE); + break; } if(error != TEST_PASS) @@ -2278,6 +2312,122 @@ final1: test_validate(result, TEST_PASS); } +void cpsv_it_open_55() +{ + int result; + printHead("To verify creating a ckpt with valid extended name length"); + + /* Skip the test if Extended Name is not enable */ + if (is_extended_name_enable() == false) + return test_validate(TEST_PASS, TEST_PASS); + + result = test_ckptInitialize(CKPT_INIT_SUCCESS_T,TEST_CONFIG_MODE); + if(result != TEST_PASS) + goto final1; + + result = test_ckptOpen(CKPT_OPEN_ALL_CREATE_EXTENDED_NAME_SUCCESS_T,TEST_NONCONFIG_MODE); + + test_cpsv_cleanup(CPSV_CLEAN_INIT_SUCCESS_T); + +final1: + printResult(result); + test_validate(result, TEST_PASS); +} + +void cpsv_it_open_56() +{ + int result; + printHead("To verify creating a ckpt with invalid extended name length"); + + /* Skip the test if Extended Name is not enable */ + if (is_extended_name_enable() == false) + return test_validate(TEST_PASS, TEST_PASS); + + result = test_ckptInitialize(CKPT_INIT_SUCCESS_T,TEST_CONFIG_MODE); + if(result != TEST_PASS) + goto final1; + + result = test_ckptOpen(CKPT_OPEN_ALL_CREATE_EXTENDED_NAME_INVALID_PARAM_T,TEST_NONCONFIG_MODE); + + test_cpsv_cleanup(CPSV_CLEAN_INIT_SUCCESS_T); + +final1: + printResult(result); + test_validate(result, TEST_PASS); +} + +void
[devel] [PATCH 5 of 8] cpd: Add new mbcsv messages supporting extended SaNameT [#1574] v2
osaf/services/saf/cpsv/cpd/cpd_mbcsv.c | 22 ++ 1 files changed, 22 insertions(+), 0 deletions(-) diff --git a/osaf/services/saf/cpsv/cpd/cpd_mbcsv.c b/osaf/services/saf/cpsv/cpd/cpd_mbcsv.c --- a/osaf/services/saf/cpsv/cpd/cpd_mbcsv.c +++ b/osaf/services/saf/cpsv/cpd/cpd_mbcsv.c @@ -23,6 +23,8 @@ **/ #include "cpd.h" +extern uint32_t cpsv_encode_extended_name(NCS_UBAID *uba, SaNameT *name); +extern uint32_t cpsv_decode_extended_name(NCS_UBAID *uba, SaNameT *name); /** * Name : cpd_mbcsv_async_update @@ -385,6 +387,9 @@ uint32_t cpd_mbcsv_enc_async_update(CPD_ TRACE_4("edu exec async create failed"); rc = NCSCC_RC_FAILURE; } + + cpsv_encode_extended_name(&arg->info.encode.io_uba, &cpd_msg->info.ckpt_create.ckpt_name); + break; case CPD_A2S_MSG_CKPT_UNLINK: @@ -395,6 +400,9 @@ uint32_t cpd_mbcsv_enc_async_update(CPD_ TRACE_4("edu exec async unlink failed"); rc = NCSCC_RC_FAILURE; } + + cpsv_encode_extended_name(&arg->info.encode.io_uba, &cpd_msg->info.ckpt_ulink.ckpt_name); + break; case CPD_A2S_MSG_CKPT_RDSET: @@ -573,6 +581,8 @@ uint32_t cpd_mbcsv_enc_msg_resp(CPD_CB * TRACE_LEAVE(); return rc; } + + cpsv_encode_extended_name(&arg->info.encode.io_uba, &ckpt_create.ckpt_name); if (ckpt_create.dest_list) m_MMGR_FREE_CPSV_CPND_DEST_INFO(ckpt_create.dest_list); @@ -783,6 +793,9 @@ uint32_t cpd_mbcsv_dec_async_update(CPD_ rc = NCSCC_RC_FAILURE; goto end; } + + cpsv_decode_extended_name(&arg->info.decode.i_uba, &ckpt_create->ckpt_name); + cpd_msg->type = evt_type; cpd_msg->info.ckpt_create = *ckpt_create; rc = cpd_process_sb_msg(cb, cpd_msg); @@ -808,6 +821,9 @@ uint32_t cpd_mbcsv_dec_async_update(CPD_ rc = NCSCC_RC_FAILURE; goto end; } + + cpsv_decode_extended_name(&arg->info.decode.i_uba, &ckpt_unlink->ckpt_name); + cpd_msg->type = evt_type; cpd_msg->info.ckpt_ulink = *ckpt_unlink; rc = cpd_process_sb_msg(cb, cpd_msg); @@ -998,6 +1014,9 @@ uint32_t cpd_mbcsv_dec_sync_resp(CPD_CB TRACE_LEAVE(); return rc; } + + cpsv_decode_extended_name(&arg->info.decode.i_uba, &ckpt_data->ckpt_name); + mbcsv_msg.info.ckpt_create = *ckpt_data; proc_rc = cpd_sb_proc_ckpt_create(cb, &mbcsv_msg); if (proc_rc != NCSCC_RC_SUCCESS) { @@ -1007,6 +1026,9 @@ uint32_t cpd_mbcsv_dec_sync_resp(CPD_CB if (ckpt_data->dest_list) m_MMGR_FREE_CPSV_SYS_MEMORY(ckpt_data->dest_list); + if (osaf_is_an_extended_name(&ckpt_data->ckpt_name)) + free((void *)osaf_extended_name_borrow(&ckpt_data->ckpt_name)); + memset(ckpt_data, 0, sizeof(CPD_A2S_CKPT_CREATE)); memset(&mbcsv_msg, 0, sizeof(CPD_MBCSV_MSG)); } -- ___ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel
[devel] [PATCH 0 of 8] Review Request for CKPT: Support DNs longer than 255 bytes [#1574] v5
Summary: CKPT: Support DNs longer than 255 bytes {#1574} Review request for Trac Ticket(s): 1574 Peer Reviewer(s): mahesh.va...@oracle.com; anders.wid...@ericsson.com Pull request to: mahesh.va...@oracle.com Affected branch(es): default Development branch: default Impacted area Impact y/n Docsn Build systemn RPM/packaging n Configuration files n Startup scripts n SAF servicesy OpenSAF servicesn Core libraries n Samples n Tests n Other n Comments (indicate scope for each "y" above): - changeset 05233bdae1fb000fea001964eba1c51ebf3bfd8e Author: Hoang Vo Date: Thu, 18 Aug 2016 13:51:56 +0700 cpd: Add support for extended SaNameT [#1574] v3 changeset cecabec5b6be73e731e540fd439e1d0e3534809f Author: Hoang Vo Date: Thu, 18 Aug 2016 13:51:56 +0700 cpnd: Add support for extended SaNameT [#1574] v3 changeset 940dc877c94a9539e3da06d89c6480ef7e0ceda0 Author: Hoang Vo Date: Thu, 18 Aug 2016 13:51:56 +0700 cpa: Add support for extended SaNameT [#1574] v1 changeset 1f74531a36163bdfecd6b27174443d51c11ecf61 Author: Hoang Vo Date: Thu, 18 Aug 2016 13:51:56 +0700 cpsv: Add new message to support extended SaNameT [#1574] v3 changeset 29df19302186b3275ad06db00dc62f275dea25e1 Author: Hoang Vo Date: Thu, 18 Aug 2016 13:51:56 +0700 cpd: Add new mbcsv messages supporting extended SaNameT [#1574] v2 changeset 3f72410a7c2bb077647bdd4e46869a31a832f1d8 Author: Hoang Vo Date: Thu, 18 Aug 2016 13:51:56 +0700 cpsv: Apply new messages supporting extended SaNameT to CPD, CPND, and CPA [#1574] v4 changeset f32a0b3ca1ebf6049d2103e68e91d98bf086c48e Author: Hoang Vo Date: Thu, 18 Aug 2016 13:51:56 +0700 ckpt: Add new test cases to verify long DN feature on CPSV [#1574] v1 changeset 1aa38b707cf2cec14c416631cfc7e5518b25735f Author: Hoang Vo Date: Thu, 18 Aug 2016 13:51:56 +0700 cpnd: add support for shm recovery for in-service update without restarting node [#1574] v1 Complete diffstat: -- osaf/libs/agents/saf/cpa/Makefile.am |1 + osaf/libs/agents/saf/cpa/cpa_api.c| 48 -- osaf/libs/agents/saf/cpa/cpa_db.c |2 + osaf/libs/agents/saf/cpa/cpa_mds.c|4 +- osaf/libs/agents/saf/cpa/cpa_proc.c |2 +- osaf/libs/common/cpsv/cpsv_evt.c | 440 ++--- osaf/libs/common/cpsv/include/cpa.h |1 + osaf/libs/common/cpsv/include/cpa_cb.h|2 +- osaf/libs/common/cpsv/include/cpa_proc.h |2 +- osaf/libs/common/cpsv/include/cpd.h |1 + osaf/libs/common/cpsv/include/cpd_cb.h| 17 +- osaf/libs/common/cpsv/include/cpd_imm.h |4 +- osaf/libs/common/cpsv/include/cpd_mem.h | 25 +++- osaf/libs/common/cpsv/include/cpd_proc.h |2 +- osaf/libs/common/cpsv/include/cpnd.h |1 + osaf/libs/common/cpsv/include/cpnd_cb.h |5 +- osaf/libs/common/cpsv/include/cpnd_init.h |3 +- osaf/libs/common/cpsv/include/cpsv_evt.h | 10 + osaf/libs/common/cpsv/include/cpsv_shm.h | 24 +++- osaf/services/saf/cpsv/cpd/Makefile.am|1 + osaf/services/saf/cpsv/cpd/cpd_amf.c |7 +- osaf/services/saf/cpsv/cpd/cpd_db.c | 95 +++--- osaf/services/saf/cpsv/cpd/cpd_evt.c | 103 ++- osaf/services/saf/cpsv/cpd/cpd_imm.c | 268 ++ osaf/services/saf/cpsv/cpd/cpd_main.c |7 + osaf/services/saf/cpsv/cpd/cpd_mbcsv.c| 31 - osaf/services/saf/cpsv/cpd/cpd_mds.c | 84 - osaf/services/saf/cpsv/cpd/cpd_proc.c | 180 ++-- osaf/services/saf/cpsv/cpd/cpd_red.c |6 +- osaf/services/saf/cpsv/cpd/cpd_sbevt.c| 57 +++- osaf/services/saf/cpsv/cpnd/Makefile.am |1 + osaf/services/saf/cpsv/cpnd/cpnd_db.c |6 +- osaf/services/saf/cpsv/cpnd/cpnd_evt.c| 73 --- osaf/services/saf/cpsv/cpnd/cpnd_main.c |7 + osaf/services/saf/cpsv/cpnd/cpnd_mds.c| 86 - osaf/services/saf/cpsv/cpnd/cpnd_proc.c | 84 +--- osaf/services/saf/cpsv/cpnd/cpnd_res.c| 823 ++ tests/cpsv/Makefile.am|1 + tests/cpsv/test_cpa.c | 180 - tests/cpsv/test_cpa_util.c| 16 ++- tests/cpsv/test_cpsv.h|6 + tests/cpsv/test_cpsv_conf.h |3 + 42 files changed, 2088 insertions(+), 631 deletions(-) Testing Commands: - Start all SCs and PLs Login S
[devel] [PATCH 6 of 8] cpsv: Apply new messages supporting extended SaNameT to CPD, CPND, and CPA [#1574] v4
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_proc.c | 2 +- osaf/services/saf/cpsv/cpnd/cpnd_evt.c | 2 ++ osaf/services/saf/cpsv/cpnd/cpnd_proc.c | 2 +- 6 files changed, 18 insertions(+), 3 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,10 @@ SaAisErrorT saCkptCheckpointOpen(SaCkptH } ckpt_name = osaf_extended_name_borrow(checkpointName); + if (strlen(ckpt_name) >= kOsafMaxDnLength) { + TRACE_LEAVE2("API return code = %u", SA_AIS_ERR_INVALID_PARAM); + 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 */ @@ -1192,6 +1196,10 @@ SaAisErrorT saCkptCheckpointOpenAsync(Sa } ckpt_name = osaf_extended_name_borrow(checkpointName); + if (strlen(ckpt_name) >= kOsafMaxDnLength) { + TRACE_LEAVE2("API return code = %u", SA_AIS_ERR_INVALID_PARAM); + 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 */ @@ -1597,6 +1605,10 @@ SaAisErrorT saCkptCheckpointUnlink(SaCkp } ckpt_name = osaf_extended_name_borrow(checkpointName); + if (strlen(ckpt_name) >= kOsafMaxDnLength) { + TRACE_LEAVE2("API return code = %u", SA_AIS_ERR_INVALID_PARAM); + return SA_AIS_ERR_INVALID_PARAM; + } /* retrieve CPA CB */ m_CPA_RETRIEVE_CB(cb); 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,9 +515,9 @@ static uint32_t cpa_mds_svc_evt(CPA_CB * /* Populate & Send the Open Event to CPND */ memset(&evt, 0, sizeof(CPSV_EVT)); evt.type = CPSV_EVT_TYPE_CPND; - evt.info.cpnd.type = CPND_EVT_A2ND_CKPT_LIST_UPDATE; evt.info.cpnd.info.ckptListUpdate.client_hdl = lc_node->cl_hdl; osaf_extended_name_lend(lc_node->ckpt_name, &evt.info.cpnd.info.ckptListUpdate.ckpt_name); + evt.info.cpnd.type = CPND_EVT_A2ND_CKPT_LIST_UPDATE; proc_rc = cpa_mds_msg_send(cb->cpa_mds_hdl, &cb->cpnd_mds_dest, &evt, NCSMDS_SVC_ID_CPND); 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 @@ -2378,6 +2378,7 @@ static uint32_t cpsv_encode_extended_nam 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_proc.c b/osaf/services/saf/cpsv/cpd/cpd_proc.c --- a/osaf/services/saf/cpsv/cpd/cpd_proc.c +++ b/osaf/services/saf/cpsv/cpd/cpd_proc.c @@ -61,9 +61,9 @@ uint32_t cpd_noncolloc_ckpt_rep_create(C /* Send the Replica create info to CPND */ memset(&send_evt, 0, sizeof(CPSV_EVT)); send_evt.type = CPSV_EVT_TYPE_CPND; - send_evt.info.cpnd.type = CPND_EVT_D2ND_CKPT_CREATE; osaf_extended_name_lend(map_info->ckpt_name, &send_evt.info.cpnd.info.ckpt_create.ckpt_name); + send_evt.info.cpnd.type = CPND_EVT_D2ND_CKPT_CREATE; d2nd_info = &send_evt.info.cpnd.info.ckpt_create.ckpt_info; diff --git a/osaf/services/saf/cpsv/cpnd/cpnd_evt.c b/osaf/services/saf/cpsv/cpnd/cpnd_evt.c --- a/osaf/services/saf/cpsv/cpnd/cpnd_evt.c +++ b/osaf/services/saf/cpsv/cpnd/cpnd_evt.c @@ -4638,6 +4638,8 @@ uint32_t cpnd_evt_destroy(CPSV_EVT *evt) if (osaf_is_an_extended_name(&evt->info.cpnd.info.ckptListUpdate.ckpt_name)) free((void *)osaf_extended_name_borrow(&evt->info.cpnd.info.ckptListUpdate.ckpt_name)); } else if (evt->info.cpnd.type == CPND_EVT_D2ND_CKPT_CREATE) { + if (evt->info.cpnd.info.ckpt_create.ckpt_info.dest_list != NULL) + m_MMGR_FREE_CPSV_SYS_MEMORY(evt->info.cpnd.info.ckpt_create.ckpt_info.dest_list); if (osaf_is_an_extended_name(&evt->info.cpnd.info.ckpt_create.ckpt_name)) free((void *)osaf_extended_name_borrow(&evt->info.cpnd.info.ckpt_create.ckpt_name)); } diff --git a/osaf/services/saf/cpsv/cpnd/cpnd_proc.c b/osaf/services/saf/cpsv/cpnd/cpnd_proc.c --- a/osaf/services/saf/cpsv/cpnd/cpnd
[devel] [PATCH 8 of 8] cpnd: add support for shm recovery for in-service update without restarting node [#1574] v1
osaf/libs/common/cpsv/include/cpsv_shm.h | 18 + osaf/services/saf/cpsv/cpnd/cpnd_proc.c |1 - osaf/services/saf/cpsv/cpnd/cpnd_res.c | 821 +++--- 3 files changed, 633 insertions(+), 207 deletions(-) diff --git a/osaf/libs/common/cpsv/include/cpsv_shm.h b/osaf/libs/common/cpsv/include/cpsv_shm.h --- a/osaf/libs/common/cpsv/include/cpsv_shm.h +++ b/osaf/libs/common/cpsv/include/cpsv_shm.h @@ -74,6 +74,24 @@ typedef struct ckpt_info { int32_t next; } CKPT_INFO; +typedef struct ckpt_info_v0 { + SaNameT ckpt_name; + SaCkptCheckpointHandleT ckpt_id; + uint32_t maxSections; + SaSizeT maxSecSize; + NODE_ID node_id; + int32_t offset; + uint32_t client_bitmap; + int32_t is_valid; + uint32_t bm_offset; + bool is_unlink; + bool is_close; + bool cpnd_rep_create; + bool is_first; + SaTimeT close_time; + int32_t next; +} CKPT_INFO_V0; + typedef struct client_info { SaCkptHandleT ckpt_app_hdl; uint32_t ckpt_open_ref_cnt; diff --git a/osaf/services/saf/cpsv/cpnd/cpnd_proc.c b/osaf/services/saf/cpsv/cpnd/cpnd_proc.c --- a/osaf/services/saf/cpsv/cpnd/cpnd_proc.c +++ b/osaf/services/saf/cpsv/cpnd/cpnd_proc.c @@ -1813,7 +1813,6 @@ uint32_t cpnd_ckpt_hdr_update(CPND_CKPT_ memset(&write_req, '\0', sizeof(write_req)); memset(&ckpt_hdr, '\0', sizeof(CPSV_CKPT_HDR)); ckpt_hdr.ckpt_id = cp_node->ckpt_id; - strncpy(ckpt_hdr.ckpt_name, cp_node->ckpt_name, kOsafMaxDnLength); ckpt_hdr.create_attrib = cp_node->create_attrib; ckpt_hdr.open_flags = cp_node->open_flags; ckpt_hdr.is_unlink = cp_node->is_unlink; diff --git a/osaf/services/saf/cpsv/cpnd/cpnd_res.c b/osaf/services/saf/cpsv/cpnd/cpnd_res.c --- a/osaf/services/saf/cpsv/cpnd/cpnd_res.c +++ b/osaf/services/saf/cpsv/cpnd/cpnd_res.c @@ -40,6 +40,8 @@ #define m_CPND_CKPTINFO_READ(ckpt_info,addr,offset) memcpy(&ckpt_info,addr+offset,sizeof(CKPT_INFO)) +#define m_CPND_CKPTINFO_V0_READ(ckpt_info,addr,offset) memcpy(&ckpt_info,addr+offset,sizeof(CKPT_INFO_V0)) + #define m_CPND_CKPTINFO_UPDATE(addr,ckpt_info,offset) memcpy(addr+offset,&ckpt_info,sizeof(CKPT_INFO)) #define m_CPND_CKPTHDR_UPDATE(ckpt_hdr,offset) memcpy(offset,&ckpt_hdr,sizeof(CKPT_HDR)) @@ -48,6 +50,13 @@ static uint32_t cpnd_res_ckpt_sec_add(CP static bool cpnd_find_exact_ckptinfo(CPND_CB *cb, CKPT_INFO *ckpt_info, uint32_t bitmap_offset, uint32_t *offset, uint32_t *prev_offset); static void cpnd_clear_ckpt_info(CPND_CB *cb, CPND_CKPT_NODE *cp_node, uint32_t curr_offset, uint32_t prev_offset); +static uint32_t cpnd_restore_client_info(CPND_CB *cb, uint8_t *cli_addr); +static uint32_t cpnd_restore_ckpt_info_v1(CPND_CB *cb, uint8_t *ckpt_addr, SaClmNodeIdT nodeid); +static uint32_t cpnd_restore_ckpt_info_v0(CPND_CB *cb, uint8_t *ckpt_addr, SaClmNodeIdT nodeid); +static void cpnd_destroy_shm_cpnd_cp_info(NCS_OS_POSIX_SHM_REQ_OPEN_INFO *open_req); +static void *cpnd_create_shm_cpnd_cp_info(NCS_OS_POSIX_SHM_REQ_INFO *req_info); +static void cpnd_update_shm_cpnd_cp_info(CPND_CB *cb); +static void cpnd_convert_cp_info_v0(CKPT_INFO_V0 *cp_info_v0, CKPT_INFO *cp_info); /*** * * Name : cpnd_client_extract_bits @@ -315,24 +324,10 @@ void cpnd_restart_update_timer(CPND_CB * void *cpnd_restart_shm_create(NCS_OS_POSIX_SHM_REQ_INFO *cpnd_open_req, CPND_CB *cb, SaClmNodeIdT nodeid) { - uint32_t counter = 0, count, num_bitset = 0, n_clients, rc = NCSCC_RC_SUCCESS, bit_position; - uint64_t i_offset; - int32_t next_offset; - CPND_CKPT_CLIENT_NODE *cl_node = NULL; - CPND_CKPT_NODE *cp_node = NULL; - CLIENT_INFO cl_info; - CLIENT_HDR cli_hdr; - CKPT_INFO cp_info, tmp_cp_info; - SaCkptHandleT client_hdl; + uint32_t rc = NCSCC_RC_SUCCESS; char *buf = NULL, *buffer = NULL; uint8_t size = 0, total_length; GBL_SHM_PTR gbl_shm_addr = {0, 0, 0, 0, 0}; - memset(&cp_info, '\0', sizeof(CKPT_INFO)); - NCS_OS_POSIX_SHM_REQ_INFO ckpt_rep_open; - SaTimeT presentTime, timeout = 0; - int64_t now, diff_time, giga_sec; - uint32_t max_client_hdl = 0; - SaTimeT tmpTime = 0; CPND_SHM_VERSION cpnd_shm_version; TRACE_ENTER(); @@ -371,18 +366,15 @@ void *cpnd_restart_shm_create(NCS_OS_POS if (rc == NCSCC_RC_FAILURE) { /* INITIALLY IT FAILS SO CREATE A SHARED MEMORY */ TRACE_1("cpnd comming up first time"); - cpnd_open_req->info.open.i_flags = O_CREAT | O_RDWR; - rc = ncs_os_posix_shm(cpnd_open_req); - if (NCSCC_RC_FAILURE == rc) { + + if (NULL == cpnd_create_shm_cpnd_cp_info(cpnd_open_req)) { LOG_ER("cpnd open request fail for RDWR mode %s",buf);
[devel] [PATCH 1 of 8] cpd: Add support for extended SaNameT [#1574] v3
osaf/libs/common/cpsv/include/cpd.h |1 + osaf/libs/common/cpsv/include/cpd_cb.h | 17 +- osaf/libs/common/cpsv/include/cpd_imm.h |4 +- osaf/libs/common/cpsv/include/cpd_mem.h | 25 ++- osaf/libs/common/cpsv/include/cpd_proc.h |2 +- osaf/services/saf/cpsv/cpd/Makefile.am |1 + osaf/services/saf/cpsv/cpd/cpd_amf.c |7 +- osaf/services/saf/cpsv/cpd/cpd_db.c | 95 +- osaf/services/saf/cpsv/cpd/cpd_evt.c | 103 +++ osaf/services/saf/cpsv/cpd/cpd_imm.c | 268 +- osaf/services/saf/cpsv/cpd/cpd_main.c|7 + osaf/services/saf/cpsv/cpd/cpd_mbcsv.c |9 +- osaf/services/saf/cpsv/cpd/cpd_proc.c| 178 ++-- osaf/services/saf/cpsv/cpd/cpd_red.c |6 +- osaf/services/saf/cpsv/cpd/cpd_sbevt.c | 57 ++--- 15 files changed, 474 insertions(+), 306 deletions(-) diff --git a/osaf/libs/common/cpsv/include/cpd.h b/osaf/libs/common/cpsv/include/cpd.h --- a/osaf/libs/common/cpsv/include/cpd.h +++ b/osaf/libs/common/cpsv/include/cpd.h @@ -33,6 +33,7 @@ #ifndef CPD_H #define CPD_H +#include "osaf_extended_name.h" #include "cpsv.h" #include "ncssysf_def.h" #include "ncs_main_papi.h" diff --git a/osaf/libs/common/cpsv/include/cpd_cb.h b/osaf/libs/common/cpsv/include/cpd_cb.h --- a/osaf/libs/common/cpsv/include/cpd_cb.h +++ b/osaf/libs/common/cpsv/include/cpd_cb.h @@ -78,7 +78,7 @@ typedef struct cpsv_node_ref_info { typedef struct cpd_ckpt_info_node { NCS_PATRICIA_NODE patnode; SaCkptCheckpointHandleT ckpt_id; - SaNameT ckpt_name; + SaConstStringT ckpt_name; uint32_t dest_cnt; CPD_NODE_REF_INFO *node_list; bool is_unlink_set; @@ -123,8 +123,7 @@ typedef struct cpd_cpnd_info_node { uint32_t timer_state; bool ckpt_cpnd_scxb_exist; /* for imm */ - SaNameT node_name; - SaNameT ckpt_name; + SaConstStringT node_name; uint32_t rep_type; } CPD_CPND_INFO_NODE; @@ -132,15 +131,15 @@ typedef struct cpd_cpnd_info_node { typedef struct cpd_ckpt_map_info { NCS_PATRICIA_NODE patnode; - SaNameT ckpt_name; + SaConstStringT ckpt_name; SaCkptCheckpointHandleT ckpt_id; SaCkptCheckpointCreationAttributesT attributes; SaVersionT client_version; } CPD_CKPT_MAP_INFO; typedef struct cpd_rep_key_info { - SaNameT ckpt_name; - SaNameT node_name; + SaConstStringT ckpt_name; + SaConstStringT node_name; } CPD_REP_KEY_INFO; typedef struct cpd_ckpt_reploc_info { @@ -219,7 +218,7 @@ typedef struct cpd_cb_tag { #define CPD_CB_NULL ((CPD_CB *)0) /* Function Declarations */ -CPD_CKPT_INFO_NODE *cpd_find_add_ckpt_name(CPD_CB *cpd_cb, SaNameT ckpt_name); +CPD_CKPT_INFO_NODE *cpd_find_add_ckpt_name(CPD_CB *cpd_cb, SaConstStringT ckpt_name); void cpd_free_ckpt_node(CPD_CB *gld_cb, CPD_CKPT_INFO_NODE *ckpt_info); @@ -248,9 +247,9 @@ void cpd_ckpt_reploc_tree_destroy(CPD_CB uint32_t cpd_ckpt_map_tree_init(CPD_CB *cb); uint32_t cpd_ckpt_map_node_get(NCS_PATRICIA_TREE *ckpt_map_tree, -SaNameT *ckpt_name, CPD_CKPT_MAP_INFO **ckpt_map_node); +SaConstStringT ckpt_name, CPD_CKPT_MAP_INFO **ckpt_map_node); void cpd_ckpt_map_node_getnext(NCS_PATRICIA_TREE *ckpt_map_tree, - SaNameT *ckpt_name, CPD_CKPT_MAP_INFO **ckpt_map_node); + SaConstStringT *ckpt_name, CPD_CKPT_MAP_INFO **ckpt_map_node); uint32_t cpd_ckpt_map_node_add(NCS_PATRICIA_TREE *ckpt_map_tree, CPD_CKPT_MAP_INFO *ckpt_map_node); uint32_t cpd_ckpt_map_node_delete(CPD_CB *cb, CPD_CKPT_MAP_INFO *ckpt_map_node); diff --git a/osaf/libs/common/cpsv/include/cpd_imm.h b/osaf/libs/common/cpsv/include/cpd_imm.h --- a/osaf/libs/common/cpsv/include/cpd_imm.h +++ b/osaf/libs/common/cpsv/include/cpd_imm.h @@ -4,7 +4,9 @@ extern SaAisErrorT cpd_imm_init(SaImmOiH extern void cpd_imm_reinit_bg(CPD_CB * cb); extern void cpd_imm_declare_implementer(SaImmOiHandleT* immOiHandle, SaSelectionObjectT* imm_sel_obj); extern SaAisErrorT create_runtime_ckpt_object(CPD_CKPT_INFO_NODE *ckpt_node, SaImmOiHandleT immOiHandle); +extern SaAisErrorT delete_runtime_ckpt_object(CPD_CKPT_INFO_NODE *ckpt_node, SaImmOiHandleT immOiHandle); extern SaAisErrorT create_runtime_replica_object(CPD_CKPT_REPLOC_INFO *ckpt_reploc_node, SaImmOiHandleT immOiHandle); -extern void cpd_create_association_class_dn(const SaNameT *child_dn, const SaNameT *parent_dn, const char *rdn_tag, SaNameT *dn); +extern SaAisErrorT delete_runtime_replica_object(CPD_CKPT_REPLOC_INFO *ckpt_reploc_node, SaImmOiHandleT immOiHandle); +extern void cpd_create_association_class_dn(const char *child_dn, const char *parent_dn, const char *rdn_tag, char **dn); extern SaAisErrorT cpd_clean_checkpoint_objects(CPD_CB *cb); extern SaUint32T cpd_get_scAbsenceAllowed_attr(); diff --git a/osaf/libs
[devel] [PATCH 4 of 8] cpsv: Add new message to support extended SaNameT [#1574] v3
osaf/libs/common/cpsv/cpsv_evt.c | 439 +- osaf/libs/common/cpsv/include/cpsv_evt.h | 10 + osaf/services/saf/cpsv/cpd/cpd_mds.c | 84 +- osaf/services/saf/cpsv/cpnd/cpnd_mds.c | 86 +- 4 files changed, 581 insertions(+), 38 deletions(-) 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 @@ -30,11 +30,14 @@ #include "cpsv.h" #include "cpa_tmr.h" +#include "osaf_extended_name.h" FUNC_DECLARATION(CPSV_CKPT_DATA); static SaCkptSectionIdT *cpsv_evt_dec_sec_id(NCS_UBAID *i_ub, uint32_t svc_id); static uint32_t cpsv_evt_enc_sec_id(NCS_UBAID *o_ub, SaCkptSectionIdT *sec_id); static void cpsv_convert_sec_id_to_string(char *sec_id_str, SaCkptSectionIdT *section_id); +static uint32_t cpsv_encode_extended_name_flat(NCS_UBAID *uba, SaNameT *name); +static uint32_t cpsv_decode_extended_name_flat(NCS_UBAID *uba, SaNameT *name); const char *cpa_evt_str[] = { "STRING_0", @@ -254,8 +257,8 @@ char* cpsv_evt_str(CPSV_EVT *evt, char * case CPND_EVT_A2ND_CKPT_OPEN: { CPSV_A2ND_OPEN_REQ *info = &evt->info.cpnd.info.openReq; - snprintf(o_evt_str, len, "CPND_EVT_A2ND_CKPT_OPEN(hdl=%llu, %s)", - info->client_hdl, info->ckpt_name.value); + snprintf(o_evt_str, len, "CPND_EVT_A2ND_CKPT_OPEN_2(hdl=%llu, %s)", + info->client_hdl, osaf_extended_name_borrow(&info->ckpt_name)); break; } case CPND_EVT_A2ND_CKPT_CLOSE: @@ -268,7 +271,7 @@ char* cpsv_evt_str(CPSV_EVT *evt, char * case CPND_EVT_A2ND_CKPT_UNLINK: { CPSV_A2ND_CKPT_UNLINK *info = &evt->info.cpnd.info.ulinkReq; - snprintf(o_evt_str, len, "CPND_EVT_A2ND_CKPT_UNLINK(%s)", info->ckpt_name.value); + snprintf(o_evt_str, len, "CPND_EVT_A2ND_CKPT_UNLINK_2(%s)", osaf_extended_name_borrow(&info->ckpt_name)); break; } case CPND_EVT_A2ND_CKPT_RDSET: @@ -513,12 +516,22 @@ char* cpsv_evt_str(CPSV_EVT *evt, char * case CPND_EVT_D2ND_CKPT_CREATE: { CPSV_D2ND_CKPT_CREATE *info = &evt->info.cpnd.info.ckpt_create; - snprintf(o_evt_str, len, "[%llu] CPND_EVT_D2ND_CKPT_CREATE(%s, create_rep=%s, active=0x%X)", - info->ckpt_info.ckpt_id, info->ckpt_name.value, + snprintf(o_evt_str, len, "[%llu] CPND_EVT_D2ND_CKPT_CREATE_2(%s, create_rep=%s, is_act=%s, active=0x%X, dest_cnt=%d)", + info->ckpt_info.ckpt_id, osaf_extended_name_borrow(&info->ckpt_name), info->ckpt_info.ckpt_rep_create ? "true" : "false", - m_NCS_NODE_ID_FROM_MDS_DEST(info->ckpt_info.active_dest)); + info->ckpt_info.is_active_exists ? "true" : "false", + m_NCS_NODE_ID_FROM_MDS_DEST(info->ckpt_info.active_dest), + info->ckpt_info.dest_cnt); + + SaCkptCheckpointCreationAttributesT *attr = &info->ckpt_info.attributes; + TRACE("mSecS=%lld, flags=%d, mSec=%d, mSecIdS=%lld, ret=%lld, ckptS=%lld", attr->maxSectionSize, + attr->creationFlags, attr->maxSections, attr->maxSectionIdSize, attr->retentionDuration, + attr->checkpointSize); + for (int i = 0; i < info->ckpt_info.dest_cnt; i++) + TRACE("dest[%d] = 0x%" PRIX64 " ", i, info->ckpt_info.dest_list[i].dest); break; } + case CPND_EVT_D2ND_CKPT_DESTROY: { snprintf(o_evt_str, len, "[%llu] CPND_EVT_D2ND_CKPT_DESTROY", evt->info.cpnd.info.ckpt_destroy.ckpt_id); @@ -608,8 +621,8 @@ char* cpsv_evt_str(CPSV_EVT *evt, char * case CPND_EVT_A2ND_CKPT_LIST_UPDATE: { CPSV_A2ND_CKPT_LIST_UPDATE *info = &evt->info.cpnd.info.ckptListUpdate; - snprintf(o_evt_str, len, "CPND_EVT_A2ND_CKPT_LIST_UPDATE(hdl=%llu, %s)", - info->client_hdl, info->ckpt_name.value); + snprintf(o_evt_str, len, "CPND_EVT_A2ND_CKPT_LIST_UPDATE_2(hdl=%llu, %s)", + info->client_hdl, osaf_extended_name_borrow(&info->ckpt_name)); break; } case CPND_EVT_A2ND_ARRIVAL_CB_UNREG: @@ -813,13 +826,20 @@ char* cpsv_evt_str(CPSV_EVT *evt, char * case CPD_EVT_ND2D_CKPT_CREATE: {
[devel] [PATCH 2 of 8] cpnd: Add support for extended SaNameT [#1574] v3
osaf/libs/common/cpsv/include/cpnd.h | 1 + osaf/libs/common/cpsv/include/cpnd_cb.h | 5 +- osaf/libs/common/cpsv/include/cpnd_init.h | 3 +- osaf/libs/common/cpsv/include/cpsv_shm.h | 6 +- osaf/services/saf/cpsv/cpnd/Makefile.am | 1 + osaf/services/saf/cpsv/cpnd/cpnd_db.c | 6 +- osaf/services/saf/cpsv/cpnd/cpnd_evt.c| 71 ++ osaf/services/saf/cpsv/cpnd/cpnd_main.c | 7 ++ osaf/services/saf/cpsv/cpnd/cpnd_proc.c | 83 ++ osaf/services/saf/cpsv/cpnd/cpnd_res.c| 20 +++--- 10 files changed, 143 insertions(+), 60 deletions(-) diff --git a/osaf/libs/common/cpsv/include/cpnd.h b/osaf/libs/common/cpsv/include/cpnd.h --- a/osaf/libs/common/cpsv/include/cpnd.h +++ b/osaf/libs/common/cpsv/include/cpnd.h @@ -34,6 +34,7 @@ #define CPND_H #include +#include "osaf_extended_name.h" #include "ncssysf_def.h" #include "ncs_main_papi.h" #include "ncssysf_tsk.h" diff --git a/osaf/libs/common/cpsv/include/cpnd_cb.h b/osaf/libs/common/cpsv/include/cpnd_cb.h --- a/osaf/libs/common/cpsv/include/cpnd_cb.h +++ b/osaf/libs/common/cpsv/include/cpnd_cb.h @@ -34,6 +34,9 @@ extern uint32_t gl_cpnd_cb_hdl; #define m_CPND_GIVEUP_CPND_CBncshm_give_hdl(gl_cpnd_cb_hdl) #define CPND_MAX_REPLICAS 1000 +#define CPND_MAX_REPLICA_NAME_LENGTH 255 +#define CPND_REP_NAME_MAX_CKPT_NAME_LENGTH (CPND_MAX_REPLICA_NAME_LENGTH - 32) + #define CPSV_GEN_SECTION_ID_SIZE 4 #define CPSV_WAIT_TIME 1000 @@ -169,7 +172,7 @@ typedef struct cpnd_all_repl_write_evt_n typedef struct cpnd_ckpt_node { NCS_PATRICIA_NODE patnode; SaCkptCheckpointHandleT ckpt_id;/* index for identifying the checkpoint */ - SaNameT ckpt_name; + SaConstStringT ckpt_name; SaCkptCheckpointCreationAttributesT create_attrib; SaCkptCheckpointOpenFlagsT open_flags; uint32_t ckpt_lcl_ref_cnt; diff --git a/osaf/libs/common/cpsv/include/cpnd_init.h b/osaf/libs/common/cpsv/include/cpnd_init.h --- a/osaf/libs/common/cpsv/include/cpnd_init.h +++ b/osaf/libs/common/cpsv/include/cpnd_init.h @@ -130,6 +130,7 @@ uint32_t cpnd_all_repl_rsp_expiry(CPND_C uint32_t cpnd_open_active_sync_expiry(CPND_CB *cb, CPND_TMR_INFO *tmr_info); void cpnd_proc_free_read_data(CPSV_EVT *evt); SaUint32T cpnd_get_scAbsenceAllowed_attr(); +SaUint32T cpnd_get_longDnsAllowed_attr(); /* End cpnd_proc.c */ /* File : --- cpnd_amf.c */ @@ -163,7 +164,7 @@ void cpnd_evt_node_get(CPND_CB *cb, SaCk void cpnd_evt_node_getnext(CPND_CB *cb, SaCkptCheckpointHandleT lcl_ckpt_id, CPSV_CPND_ALL_REPL_EVT_NODE **evt_node); uint32_t cpnd_evt_node_add(CPND_CB *cb, CPSV_CPND_ALL_REPL_EVT_NODE *evt_node); uint32_t cpnd_evt_node_del(CPND_CB *cb, CPSV_CPND_ALL_REPL_EVT_NODE *evt_node); -CPND_CKPT_NODE *cpnd_ckpt_node_find_by_name(CPND_CB *cpnd_cb, SaNameT ckpt_name); +CPND_CKPT_NODE *cpnd_ckpt_node_find_by_name(CPND_CB *cpnd_cb, SaConstStringT ckpt_name); CPND_CKPT_SECTION_INFO *cpnd_ckpt_sec_add(CPND_CKPT_NODE *cp_node, SaCkptSectionIdT *id, SaTimeT exp_time, uint32_t gen_flag); void cpnd_evt_backup_queue_add(CPND_CKPT_NODE *cp_node, CPND_EVT *evt); diff --git a/osaf/libs/common/cpsv/include/cpsv_shm.h b/osaf/libs/common/cpsv/include/cpsv_shm.h --- a/osaf/libs/common/cpsv/include/cpsv_shm.h +++ b/osaf/libs/common/cpsv/include/cpsv_shm.h @@ -18,6 +18,8 @@ #ifndef CPSV_SHM_H #define CPSV_SHM_H +#include "osaf_extended_name.h" + #define MAX_CLIENTS 1000 #define MAX_CKPTS 2000 #define MAX_SIZE 30 @@ -29,7 +31,7 @@ typedef struct cpsv_ckpt_hdr { SaCkptCheckpointHandleT ckpt_id;/* Index for identifying the checkpoint */ - SaNameT ckpt_name; + char ckpt_name[kOsafMaxDnLength]; SaCkptCheckpointCreationAttributesT create_attrib; SaCkptCheckpointOpenFlagsT open_flags; uint32_t ckpt_lcl_ref_cnt; @@ -55,7 +57,7 @@ typedef struct cpsv_sect_hdr { } CPSV_SECT_HDR; typedef struct ckpt_info { - SaNameT ckpt_name; + char ckpt_name[kOsafMaxDnLength]; SaCkptCheckpointHandleT ckpt_id; uint32_t maxSections; SaSizeT maxSecSize; diff --git a/osaf/services/saf/cpsv/cpnd/Makefile.am b/osaf/services/saf/cpsv/cpnd/Makefile.am --- a/osaf/services/saf/cpsv/cpnd/Makefile.am +++ b/osaf/services/saf/cpsv/cpnd/Makefile.am @@ -26,6 +26,7 @@ osaf_execbin_PROGRAMS = osafckptnd osafckptnd_CPPFLAGS = \ -DSA_CLM_B01=1 \ -DNCS_CPND=1 \ + -DSA_EXTENDED_NAME_SOURCE \ $(AM_CPPFLAGS) \ -I$(top_srcdir)/osaf/libs/common/immsv/include \ -I$(top_srcdir)/osaf/libs/common/cpsv/include diff --git a/osaf/services/saf/cpsv/cpnd/cpnd_db.c b/osaf/services/saf/cpsv/cpnd/cpnd_db.c --- a/osaf/services/saf/cpsv/cpnd/cpnd_db.c +++ b/osaf/services/saf/cpsv/cpnd/cpnd_db.c @@ -158,6 +158,8 @@ void cpnd_ckpt_node_destroy(CPND_CB *cb, cpnd_ckpt_sec_map_destroy(&cp_node->replica_info); + free((void *)cp_
[devel] [PATCH 3 of 8] cpa: Add support for extended SaNameT [#1574] v1
osaf/libs/agents/saf/cpa/Makefile.am | 1 + osaf/libs/agents/saf/cpa/cpa_api.c | 36 osaf/libs/agents/saf/cpa/cpa_db.c| 2 + osaf/libs/agents/saf/cpa/cpa_mds.c | 2 +- osaf/libs/agents/saf/cpa/cpa_proc.c | 2 +- osaf/libs/common/cpsv/include/cpa.h | 1 + osaf/libs/common/cpsv/include/cpa_cb.h | 2 +- osaf/libs/common/cpsv/include/cpa_proc.h | 2 +- 8 files changed, 26 insertions(+), 22 deletions(-) diff --git a/osaf/libs/agents/saf/cpa/Makefile.am b/osaf/libs/agents/saf/cpa/Makefile.am --- a/osaf/libs/agents/saf/cpa/Makefile.am +++ b/osaf/libs/agents/saf/cpa/Makefile.am @@ -22,6 +22,7 @@ noinst_LTLIBRARIES = libcpa.la libcpa_la_CPPFLAGS = \ -DNCS_CPA=1 \ + -DSA_EXTENDED_NAME_SOURCE \ $(AM_CPPFLAGS) \ -I$(top_srcdir)/osaf/libs/common/cpsv/include 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 @@ -870,19 +870,20 @@ SaAisErrorT saCkptCheckpointOpen(SaCkptH bool locked = false; uint32_t time_out=0; CPA_GLOBAL_CKPT_NODE *gc_node = NULL; + SaConstStringT ckpt_name = NULL; TRACE_ENTER2("SaCkptCheckpointHandleT passed is %llx",ckptHandle); - if ((checkpointName == NULL) || (checkpointHandle == NULL) || (checkpointName->length == 0)) { + if ((checkpointName == NULL) || (checkpointHandle == NULL) || (osaf_extended_name_length(checkpointName) == 0)) { TRACE_4("Cpa CkptOpen Api failed with return value:%d,ckptHandle:%llx", SA_AIS_ERR_INVALID_PARAM, ckptHandle); TRACE_LEAVE2("API return code = %u", rc); return SA_AIS_ERR_INVALID_PARAM; } - m_CPSV_SET_SANAMET(checkpointName); + ckpt_name = osaf_extended_name_borrow(checkpointName); /* SA_AIS_ERR_INVALID_PARAM, bullet 4 in SAI-AIS-CKPT-B.02.02 Section 3.6.1 saCkptCheckpointOpen() and saCkptCheckpointOpenAsync(), Return Values */ -if (strncmp((const char *)checkpointName->value, "safCkpt=", 8) != 0) { +if (strncmp(ckpt_name, "safCkpt=", 8) != 0) { TRACE_4("Cpa CkptOpen:DN failed with return value:%d,ckptHandle:%llx", SA_AIS_ERR_INVALID_PARAM, ckptHandle); TRACE_LEAVE2("API return code = %u", rc); return SA_AIS_ERR_INVALID_PARAM; @@ -909,7 +910,7 @@ SaAisErrorT saCkptCheckpointOpen(SaCkptH /* Draft Validations */ - rc = cpa_open_attr_validate(checkpointCreationAttributes, checkpointOpenFlags, checkpointName); + rc = cpa_open_attr_validate(checkpointCreationAttributes, checkpointOpenFlags); if (rc != SA_AIS_OK) { /* No need to log, already logged inside the cpa_open_attr_validate */ goto done; @@ -965,7 +966,7 @@ SaAisErrorT saCkptCheckpointOpen(SaCkptH lc_node->cl_hdl = ckptHandle; lc_node->open_flags = checkpointOpenFlags; - lc_node->ckpt_name = *checkpointName; + lc_node->ckpt_name = strdup(ckpt_name); /* Add CPA_LOCAL_CKPT_NODE to lcl_ckpt_hdl_tree */ proc_rc = cpa_lcl_ckpt_node_add(&cb->lcl_ckpt_tree, lc_node); @@ -984,7 +985,7 @@ SaAisErrorT saCkptCheckpointOpen(SaCkptH evt.info.cpnd.info.openReq.client_hdl = ckptHandle; evt.info.cpnd.info.openReq.lcl_ckpt_hdl = lc_node->lcl_ckpt_hdl; - evt.info.cpnd.info.openReq.ckpt_name = *checkpointName; + osaf_extended_name_lend(ckpt_name, &evt.info.cpnd.info.openReq.ckpt_name); if (checkpointCreationAttributes) { evt.info.cpnd.info.openReq.ckpt_attrib = *checkpointCreationAttributes; @@ -1128,6 +1129,7 @@ gl_node_add_fail: lc_node_add_fail: if (lc_node != NULL) { + free((void *)lc_node->ckpt_name); m_MMGR_FREE_CPA_LOCAL_CKPT_NODE(lc_node); } @@ -1179,6 +1181,7 @@ SaAisErrorT saCkptCheckpointOpenAsync(Sa CPA_LOCAL_CKPT_NODE *lc_node = NULL; CPA_CLIENT_NODE *cl_node = NULL; uint32_t proc_rc = NCSCC_RC_SUCCESS; + SaConstStringT ckpt_name = NULL; TRACE_ENTER2("SaCkptCheckpointHandleT passed is %llx",ckptHandle); @@ -1188,19 +1191,17 @@ SaAisErrorT saCkptCheckpointOpenAsync(Sa return SA_AIS_ERR_INVALID_PARAM; } - /* Draft Validations */ - - m_CPSV_SET_SANAMET(checkpointName); + ckpt_name = osaf_extended_name_borrow(checkpointName); /* SA_AIS_ERR_INVALID_PARAM, bullet 4 in SAI-AIS-CKPT-B.02.02 Section 3.6.1 saCkptCheckpointOpen() and saCkptCheckpointOpenAsync(), Return Values */ -if (strncmp((const char *)checkpointName->value, "safCkpt=", 8) != 0) { +if (strncmp(ckpt_name, "safCkpt=", 8) != 0) { TRACE_4("cpa CkptOpen:DN Api failed with return value:%d,ckptHandle:%llx", SA_AIS_ERR_INVALID_PARAM