You can subscribe to this list here.
2013 |
Jan
|
Feb
|
Mar
(2) |
Apr
(442) |
May
(1532) |
Jun
(148) |
Jul
(178) |
Aug
(165) |
Sep
(196) |
Oct
(265) |
Nov
(230) |
Dec
(312) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2014 |
Jan
(328) |
Feb
(254) |
Mar
(141) |
Apr
(378) |
May
(441) |
Jun
(374) |
Jul
(235) |
Aug
(349) |
Sep
(396) |
Oct
(238) |
Nov
(138) |
Dec
(109) |
2015 |
Jan
(86) |
Feb
(81) |
Mar
(250) |
Apr
(180) |
May
(159) |
Jun
(106) |
Jul
(211) |
Aug
(248) |
Sep
(516) |
Oct
(297) |
Nov
(194) |
Dec
(196) |
2016 |
Jan
(232) |
Feb
(328) |
Mar
(422) |
Apr
(244) |
May
(281) |
Jun
(210) |
Jul
(211) |
Aug
(563) |
Sep
(440) |
Oct
(317) |
Nov
(405) |
Dec
(224) |
2017 |
Jan
(207) |
Feb
(399) |
Mar
(373) |
Apr
(206) |
May
(213) |
Jun
(215) |
Jul
(81) |
Aug
(151) |
Sep
(126) |
Oct
(336) |
Nov
(179) |
Dec
(149) |
2018 |
Jan
(194) |
Feb
(118) |
Mar
(234) |
Apr
(190) |
May
(103) |
Jun
(100) |
Jul
(162) |
Aug
(139) |
Sep
(140) |
Oct
(140) |
Nov
(181) |
Dec
(54) |
2019 |
Jan
(94) |
Feb
(76) |
Mar
(49) |
Apr
(46) |
May
(52) |
Jun
(79) |
Jul
(43) |
Aug
(97) |
Sep
(88) |
Oct
(138) |
Nov
(104) |
Dec
(66) |
2020 |
Jan
(85) |
Feb
(107) |
Mar
(68) |
Apr
(61) |
May
(52) |
Jun
(23) |
Jul
(118) |
Aug
(67) |
Sep
(27) |
Oct
(33) |
Nov
(41) |
Dec
(24) |
2021 |
Jan
(19) |
Feb
(11) |
Mar
(47) |
Apr
(39) |
May
(51) |
Jun
(18) |
Jul
(19) |
Aug
(16) |
Sep
(35) |
Oct
(15) |
Nov
(10) |
Dec
(21) |
2022 |
Jan
(12) |
Feb
(11) |
Mar
(30) |
Apr
(6) |
May
(10) |
Jun
(12) |
Jul
(13) |
Aug
(10) |
Sep
(3) |
Oct
(4) |
Nov
(24) |
Dec
(25) |
2023 |
Jan
(3) |
Feb
(3) |
Mar
(11) |
Apr
(8) |
May
(2) |
Jun
|
Jul
(4) |
Aug
(5) |
Sep
(2) |
Oct
|
Nov
|
Dec
(2) |
2024 |
Jan
(9) |
Feb
(1) |
Mar
(2) |
Apr
(8) |
May
(8) |
Jun
(5) |
Jul
(6) |
Aug
(3) |
Sep
(3) |
Oct
(3) |
Nov
|
Dec
|
From: thang.d.nguyen <tha...@de...> - 2023-09-19 07:25:27
|
With 2N app model with NPI SU in PI SU, the PI components is terminated following by lock command on SU. The SU will be in uninstantiated presence state. And there is no action can repair the SU. This issue due to during lock the SU, the NPI component terminated while the SU in restarting. And it will force to terminate all the PI componentsin the SU and move the SU to uninstantiated pres state. The fix is to remove this force. --- src/amf/amfnd/avnd_su.h | 2 ++ src/amf/amfnd/clc.cc | 13 +++++++++++++ src/amf/amfnd/susm.cc | 33 ++------------------------------- 3 files changed, 17 insertions(+), 31 deletions(-) diff --git a/src/amf/amfnd/avnd_su.h b/src/amf/amfnd/avnd_su.h index 46a711fc9..7abfbab64 100644 --- a/src/amf/amfnd/avnd_su.h +++ b/src/amf/amfnd/avnd_su.h @@ -262,6 +262,8 @@ typedef struct avnd_su_tag { (SA_AMF_PRESENCE_INSTANTIATED == (x)->pres) #define m_AVND_SU_PRES_STATE_IS_INSTANTIATING(x) \ (SA_AMF_PRESENCE_INSTANTIATING == (x)->pres) +#define m_AVND_SU_PRES_STATE_IS_UNINSTANTIATED(x) \ + (SA_AMF_PRESENCE_UNINSTANTIATED == (x)->pres) /* pre-configured su params */ #define AVND_SU_FLAG_RESTART_DIS 0x00000001 diff --git a/src/amf/amfnd/clc.cc b/src/amf/amfnd/clc.cc index 0b0d62634..3fdfa8061 100644 --- a/src/amf/amfnd/clc.cc +++ b/src/amf/amfnd/clc.cc @@ -336,6 +336,7 @@ uint32_t avnd_evt_clc_resp_evh(AVND_CB *cb, AVND_EVT *evt) { AVND_COMP_CLC_PRES_FSM_EV ev = AVND_COMP_CLC_PRES_FSM_EV_MAX; AVND_CLC_EVT *clc_evt = &evt->info.clc; AVND_COMP *comp = 0; + AVND_SU *su = 0; uint32_t rc = NCSCC_RC_SUCCESS; TRACE_ENTER(); @@ -347,6 +348,18 @@ uint32_t avnd_evt_clc_resp_evh(AVND_CB *cb, AVND_EVT *evt) { goto done; } + if (comp) { + su = avnd_sudb_rec_get(cb->sudb, comp->su->name); + if (su && m_AVND_SU_PRES_STATE_IS_UNINSTANTIATED(su) && + (clc_evt->cmd_type == AVND_COMP_CLC_CMD_TYPE_INSTANTIATE)) { + LOG_NO("Ignore Inst respond command. Component should be terminated"); + rc = avnd_comp_clc_cmd_execute(cb, comp, AVND_COMP_CLC_CMD_TYPE_TERMINATE); + m_AVND_COMP_REG_PARAM_RESET(cb, comp); + + goto done; + } + } + TRACE("'%s', command type:%s", comp->name.c_str(), clc_cmd_type[clc_evt->cmd_type]); diff --git a/src/amf/amfnd/susm.cc b/src/amf/amfnd/susm.cc index 4f946b996..a4f0fdb88 100644 --- a/src/amf/amfnd/susm.cc +++ b/src/amf/amfnd/susm.cc @@ -3586,8 +3586,8 @@ done: /**************************************************************************** Name : avnd_su_pres_restart_compterming_hdler - Description : This routine processes the `SU Terminate` event in - `Instantiating` state. + Description : This routine processes the `Comp Terminating` event in + `Restarting` state. Arguments : cb - ptr to the AvND control block su - ptr to the su @@ -3602,7 +3602,6 @@ done: ******************************************************************************/ uint32_t avnd_su_pres_restart_compterming_hdler(AVND_CB *cb, AVND_SU *su, AVND_COMP *comp) { - AVND_COMP *curr_comp = 0; uint32_t rc = NCSCC_RC_SUCCESS; const std::string compname = comp ? comp->name : "none"; TRACE_ENTER2("SUTerminate event in the Instantiating state:'%s' : '%s'", @@ -3619,34 +3618,6 @@ uint32_t avnd_su_pres_restart_compterming_hdler(AVND_CB *cb, AVND_SU *su, goto done; } - /* - * If pi su, pick all the instantiated/instantiating pi comps & - * trigger their FSM with TermEv. - */ - for (curr_comp = m_AVND_COMP_FROM_SU_DLL_NODE_GET( - m_NCS_DBLIST_FIND_FIRST(&su->comp_list)); - curr_comp; curr_comp = m_AVND_COMP_FROM_SU_DLL_NODE_GET( - m_NCS_DBLIST_FIND_NEXT(&curr_comp->su_dll_node))) { - /* skip the npi comps */ - if (!m_AVND_COMP_TYPE_IS_PREINSTANTIABLE(curr_comp)) continue; - - /* terminate the non-uninstantiated pi comp */ - if (!m_AVND_COMP_PRES_STATE_IS_UNINSTANTIATED(curr_comp) && - (!m_AVND_COMP_PRES_STATE_IS_TERMINATING(curr_comp))) { - /* mark the comp failed */ - m_AVND_COMP_FAILED_SET(curr_comp); - - /* update comp oper state */ - m_AVND_COMP_OPER_STATE_SET(curr_comp, SA_AMF_OPERATIONAL_DISABLED); - rc = avnd_comp_oper_state_avd_sync(cb, curr_comp); - if (NCSCC_RC_SUCCESS != rc) goto done; - - rc = avnd_comp_clc_fsm_run(cb, curr_comp, - AVND_COMP_CLC_PRES_FSM_EV_CLEANUP); - if (NCSCC_RC_SUCCESS != rc) goto done; - } - } /* for */ - /* transition to terminating state */ avnd_su_pres_state_set(cb, su, SA_AMF_PRESENCE_TERMINATING); -- 2.25.1 |
From: thang.d.nguyen <tha...@de...> - 2023-09-19 07:25:25
|
Summary: amf: fix SU in unhealthy state [#3343] Review request for Ticket(s): 3343 Peer Reviewer(s): *** LIST THE TECH REVIEWER(S) / MAINTAINER(S) HERE *** Pull request to: *** LIST THE PERSON WITH PUSH ACCESS HERE *** Affected branch(es): develop Development branch: ticket-3343 Base revision: b0f9985b8f37a93afa28c76ed409bf4847d6487e Personal repository: git://git.code.sf.net/u/thangng/review -------------------------------- Impacted area Impact y/n -------------------------------- Docs n Build system n RPM/packaging n Configuration files n Startup scripts n SAF services n OpenSAF services n Core libraries n Samples n Tests n Other n NOTE: Patch(es) contain lines longer than 80 characers Comments (indicate scope for each "y" above): --------------------------------------------- revision 444dac6f8da5c65517c719a5a0a16340db55f3b4 Author: thang.d.nguyen <tha...@de...> Date: Sat, 16 Sep 2023 08:04:16 +0700 amf: fix SU in unhealthy state [#3343] With 2N app model with NPI SU in PI SU, the PI components is terminated following by lock command on SU. The SU will be in uninstantiated presence state. And there is no action can repair the SU. This issue due to during lock the SU, the NPI component terminated while the SU in restarting. And it will force to terminate all the PI componentsin the SU and move the SU to uninstantiated pres state. The fix is to remove this force. Complete diffstat: ------------------ src/amf/amfnd/avnd_su.h | 2 ++ src/amf/amfnd/clc.cc | 13 +++++++++++++ src/amf/amfnd/susm.cc | 33 ++------------------------------- 3 files changed, 17 insertions(+), 31 deletions(-) Testing Commands: ----------------- N/A Testing, Expected Results: -------------------------- N/A Conditions of Submission: ------------------------- Ack from reviwer Arch Built Started Linux distro ------------------------------------------- mips n 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 ~/.gitconfig file (i.e. user.name, user.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. |
From: Thien M. H. <thi...@de...> - 2023-08-22 10:26:34
|
Hi Thang, ACK with a minor comment. This comment should also be updated. /* this is be used only for ACK NACK for AVD */ if (msg->type != AVND_MSG_AVD) osafassert(0); Best Regards, Thien -----Original Message----- From: Thang Duc Nguyen <tha...@de...> Sent: Wednesday, August 16, 2023 7:55 PM To: Thien Minh Huynh <thi...@de...>; Dat Tran Quoc Phan <dat...@de...> Cc: ope...@li...; Thang Duc Nguyen <tha...@de...> Subject: [PATCH 1/1] amf: fix mismatch message id during sc fail-over [#3342] When SC fail-overs, the new AMFD active will send AVSV_D2N_DATA_VERIFY_MSG message event to AMFND. When AMFND processes this event, it also send the protection group (PG) start message to new active AMFD. In case MDS has not updated its tables by this time, then AMFND still send to old active AMFD. Solution in this case is to force AMFND send to specified AMFD. --- src/amf/amfd/sgproc.cc | 1 + src/amf/amfnd/di.cc | 3 ++- src/amf/amfnd/mds.cc | 14 +++++++------- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/amf/amfd/sgproc.cc b/src/amf/amfd/sgproc.cc index 665a7c2da..96972de18 100644 --- a/src/amf/amfd/sgproc.cc +++ b/src/amf/amfd/sgproc.cc @@ -1263,6 +1263,7 @@ void avd_su_si_assign_evh(AVD_CL_CB *cb, AVD_EVT *evt) { if ((node = avd_node_find_nodeid(node_id)) == nullptr) { LOG_WA("%s: invalid node ID (%x)", __FUNCTION__, node_id); } else { + LOG_WA("Sending node reboot order"); avd_d2n_reboot_snd(node); } goto done; diff --git a/src/amf/amfnd/di.cc b/src/amf/amfnd/di.cc index 01fd1ad14..cc402149e 100644 --- a/src/amf/amfnd/di.cc +++ b/src/amf/amfnd/di.cc @@ -1206,7 +1206,8 @@ uint32_t avnd_di_msg_send(AVND_CB *cb, AVND_MSG *msg) { TRACE("Msg type '%u'", msg->info.avd->msg_type); /* Verify Ack nack msgs are not buffered */ - if (m_AVSV_N2D_MSG_IS_VER_ACK_NACK(msg->info.avd)) { + if (m_AVSV_N2D_MSG_IS_VER_ACK_NACK(msg->info.avd) || + m_AVSV_N2D_MSG_IS_PG_TRACK_ACT(msg->info.avd)) { /*send the response to active AvD (In case MDS has not updated its tables by this time) */ TRACE_1("%s, Active AVD Adest: %" PRIu64, __FUNCTION__, diff --git a/src/amf/amfnd/mds.cc b/src/amf/amfnd/mds.cc index b1fc367a0..e7542d11d 100644 --- a/src/amf/amfnd/mds.cc +++ b/src/amf/amfnd/mds.cc @@ -1580,13 +1580,13 @@ done: Return Values : NCSCC_RC_SUCCESS/NCSCC_RC_FAILURE - Notes : This funtion as of now is only used to send the ACK-NACK msg - to AvD. This funtion is introduced to overcome the problem - of MDS dropping a msg when the role has changed but MDS in - AvND has not updated its tables about the role change. - Due to this problem MDS will try to send the msg to old - active which may not be there in the system and hence the - msg will be dropped. + Notes : This funtion as of now is only used to send the ACK-NACK or + TRACK-ACT msg to AvD. This funtion is introduced to overcome + the problem of MDS dropping a msg when the role has changed + but MDS in AvND has not updated its tables about the role + change. Due to this problem MDS will try to send the msg to + old active which may not be there in the system and hence + the msg will be dropped. With this funtion we are sending msg to the new active AvD directly, without looking for its MDS role as seen by AvND. ******************************************************************************/ -- 2.25.1 |
From: thang.d.nguyen <tha...@de...> - 2023-08-21 03:56:25
|
Summary: amf: fix mismatch message id during sc fail-over [#3342] Review request for Ticket(s): 3342 Peer Reviewer(s): *** LIST THE TECH REVIEWER(S) / MAINTAINER(S) HERE *** Pull request to: *** LIST THE PERSON WITH PUSH ACCESS HERE *** Affected branch(es): develop Development branch: ticket-3342 Base revision: 5e35305664437f1af0e887a525c8bddbb4248bdf Personal repository: git://git.code.sf.net/u/thangng/review -------------------------------- Impacted area Impact y/n -------------------------------- Docs n Build system n RPM/packaging n Configuration files n Startup scripts n SAF services y OpenSAF services n Core libraries n Samples n Tests n Other n Comments (indicate scope for each "y" above): --------------------------------------------- revision 7cade9c80a6a4370034198f65da628a47b3a34e2 Author: thang.d.nguyen <tha...@de...> Date: Wed, 16 Aug 2023 19:40:26 +0700 amf: fix mismatch message id during sc fail-over [#3342] When SC fail-overs, the new AMFD active will send AVSV_D2N_DATA_VERIFY_MSG message event to AMFND. When AMFND processes this event, it also send the protection group (PG) start message to new active AMFD. In case MDS has not updated its tables by this time, then AMFND still send to old active AMFD. Solution in this case is to force AMFND send to specified AMFD. Complete diffstat: ------------------ src/amf/amfd/sgproc.cc | 1 + src/amf/amfnd/di.cc | 3 ++- src/amf/amfnd/mds.cc | 14 +++++++------- 3 files changed, 10 insertions(+), 8 deletions(-) Testing Commands: ----------------- N/A Testing, Expected Results: -------------------------- N/A Conditions of Submission: ------------------------- Ack from reviewer Arch Built Started Linux distro ------------------------------------------- mips n 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 ~/.gitconfig file (i.e. user.name, user.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. |
From: thang.d.nguyen <tha...@de...> - 2023-08-21 03:56:00
|
When SC fail-overs, the new AMFD active will send AVSV_D2N_DATA_VERIFY_MSG message event to AMFND. When AMFND processes this event, it also send the protection group (PG) start message to new active AMFD. In case MDS has not updated its tables by this time, then AMFND still send to old active AMFD. Solution in this case is to force AMFND send to specified AMFD. --- src/amf/amfd/sgproc.cc | 1 + src/amf/amfnd/di.cc | 3 ++- src/amf/amfnd/mds.cc | 14 +++++++------- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/amf/amfd/sgproc.cc b/src/amf/amfd/sgproc.cc index 665a7c2da..96972de18 100644 --- a/src/amf/amfd/sgproc.cc +++ b/src/amf/amfd/sgproc.cc @@ -1263,6 +1263,7 @@ void avd_su_si_assign_evh(AVD_CL_CB *cb, AVD_EVT *evt) { if ((node = avd_node_find_nodeid(node_id)) == nullptr) { LOG_WA("%s: invalid node ID (%x)", __FUNCTION__, node_id); } else { + LOG_WA("Sending node reboot order"); avd_d2n_reboot_snd(node); } goto done; diff --git a/src/amf/amfnd/di.cc b/src/amf/amfnd/di.cc index 01fd1ad14..cc402149e 100644 --- a/src/amf/amfnd/di.cc +++ b/src/amf/amfnd/di.cc @@ -1206,7 +1206,8 @@ uint32_t avnd_di_msg_send(AVND_CB *cb, AVND_MSG *msg) { TRACE("Msg type '%u'", msg->info.avd->msg_type); /* Verify Ack nack msgs are not buffered */ - if (m_AVSV_N2D_MSG_IS_VER_ACK_NACK(msg->info.avd)) { + if (m_AVSV_N2D_MSG_IS_VER_ACK_NACK(msg->info.avd) || + m_AVSV_N2D_MSG_IS_PG_TRACK_ACT(msg->info.avd)) { /*send the response to active AvD (In case MDS has not updated its tables by this time) */ TRACE_1("%s, Active AVD Adest: %" PRIu64, __FUNCTION__, diff --git a/src/amf/amfnd/mds.cc b/src/amf/amfnd/mds.cc index b1fc367a0..e7542d11d 100644 --- a/src/amf/amfnd/mds.cc +++ b/src/amf/amfnd/mds.cc @@ -1580,13 +1580,13 @@ done: Return Values : NCSCC_RC_SUCCESS/NCSCC_RC_FAILURE - Notes : This funtion as of now is only used to send the ACK-NACK msg - to AvD. This funtion is introduced to overcome the problem - of MDS dropping a msg when the role has changed but MDS in - AvND has not updated its tables about the role change. - Due to this problem MDS will try to send the msg to old - active which may not be there in the system and hence the - msg will be dropped. + Notes : This funtion as of now is only used to send the ACK-NACK or + TRACK-ACT msg to AvD. This funtion is introduced to overcome + the problem of MDS dropping a msg when the role has changed + but MDS in AvND has not updated its tables about the role + change. Due to this problem MDS will try to send the msg to + old active which may not be there in the system and hence + the msg will be dropped. With this funtion we are sending msg to the new active AvD directly, without looking for its MDS role as seen by AvND. ******************************************************************************/ -- 2.25.1 |
From: thien.m.huynh <thi...@de...> - 2023-08-18 08:53:46
|
Summary: mbc: fix memleak detected by valgrind [#3341] Review request for Ticket(s): 3341 Peer Reviewer(s): Dat, Thang Pull request to: *** LIST THE PERSON WITH PUSH ACCESS HERE *** Affected branch(es): develop Development branch: ticket-3341 Base revision: 5e35305664437f1af0e887a525c8bddbb4248bdf Personal repository: git://git.code.sf.net/u/thienhuynh/review -------------------------------- Impacted area Impact y/n -------------------------------- Docs n Build system n RPM/packaging n Configuration files n Startup scripts n SAF services n OpenSAF services y Core libraries n Samples n Tests n Other n Comments (indicate scope for each "y" above): --------------------------------------------- *** EXPLAIN/COMMENT THE PATCH SERIES HERE *** revision 033fd576cf8bbc05b7574c0c5d1713dee3022d78 Author: thien.m.huynh <thi...@de...> Date: Fri, 18 Aug 2023 13:36:48 +0700 mbc: fix memleak detected by valgrind [#3341] Complete diffstat: ------------------ src/mbc/mbcsv_util.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) Testing Commands: ----------------- N/A Testing, Expected Results: -------------------------- N/A Conditions of Submission: ------------------------- ACK from reviewer Arch Built Started Linux distro ------------------------------------------- mips n 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 ~/.gitconfig file (i.e. user.name, user.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. |
From: thien.m.huynh <thi...@de...> - 2023-08-18 07:54:19
|
--- src/mbc/mbcsv_util.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/mbc/mbcsv_util.c b/src/mbc/mbcsv_util.c index 38a17cf17..8c2efaee6 100644 --- a/src/mbc/mbcsv_util.c +++ b/src/mbc/mbcsv_util.c @@ -1054,7 +1054,12 @@ uint32_t mbcsv_send_msg(PEER_INST *peer, MBCSV_EVT *evt_msg, uint8_t event) peer->peer_anchor) != NCSCC_RC_SUCCESS) { /* Failure implies communications are down */ - TRACE_LEAVE(); + if (evt_msg->info.peer_msg.info.client_msg.uba.ub != + NULL) + m_MMGR_FREE_BUFR_LIST( + evt_msg->info.peer_msg.info.client_msg.uba + .ub); + TRACE_LEAVE2("Unable to send async message to peer"); return NCSCC_RC_FAILURE; } } -- 2.40.1 |
From: Gary L. <gar...@de...> - 2023-07-30 06:55:39
|
The OpenSAF community is pleased to announce the availability of the OpenSAF 5.23.07 release. The source code for OpenSAF 5.23.07 and the corresponding documentation can be downloaded using the following links: http://sourceforge.net/projects/opensaf/files/releases/opensaf-5.23.07.tar.g z/download http://sourceforge.net/projects/opensaf/files/docs/opensaf-documentation-5.2 3.07.tar.gz/download For a complete list of new features in this release, please refer to the NEWS at the wiki: https://sourceforge.net/p/opensaf/wiki/NEWS-5.23.07/ See the ChangeLog for a full list of changes in this release: https://sourceforge.net/p/opensaf/wiki/ChangeLog-5.23.07/ Thank you for your continued interest in OpenSAF and to everyone who has contributed to this release. |
From: Thien M. H. <thi...@de...> - 2023-07-17 04:43:31
|
Hi Thang, See my comment inline [Thien]. Best Regards, Thien -----Original Message----- From: Thang Duc Nguyen <tha...@de...> Sent: Thursday, July 13, 2023 6:13 AM To: Thien Minh Huynh <thi...@de...>; Dat Tran Quoc Phan <dat...@de...> Cc: ope...@li...; Thang Duc Nguyen <tha...@de...> Subject: [PATCH 1/1] smf: Fix handling of MDS events in smfnd [#3340] The global smfd_dest (in cd struct) shall be restored with MDS event NCSMDS_UP and NCSMDS_NEW_ACTIVE (is set to 0 with event NCSMDS_DOWN). --- src/smf/smfnd/smfnd_mds.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/smf/smfnd/smfnd_mds.c b/src/smf/smfnd/smfnd_mds.c index 5f8ebb59b..4fba6669b 100644 --- a/src/smf/smfnd/smfnd_mds.c +++ b/src/smf/smfnd/smfnd_mds.c @@ -240,6 +240,15 @@ static uint32_t mds_svc_event(struct ncsmds_callback_info *info) switch (svc_evt->i_change) { case NCSMDS_NEW_ACTIVE: LOG_NO("MDS %s: NCSMDS_NEW_ACTIVE", __FUNCTION__); [Thien]: This is duplicate with NCSMDS_UP. Because NCSMDS_NEW_ACTIVE has no break, it will fall through NCSMDS_UP. This fix might not be different #2723. + /* Catch the vdest of SMFD*/ + if (m_MDS_DEST_IS_AN_ADEST(svc_evt->i_dest)) + return NCSCC_RC_SUCCESS; + osaf_mutex_lock_ordie(&cb->cb_lock); + cb->smfd_dest = svc_evt->i_dest; + osaf_mutex_unlock_ordie(&cb->cb_lock); + LOG_NO("MDS %s: NCSMDS_SVC_ID_SMFD " + "dest = 0x%" PRIx64, + __FUNCTION__, svc_evt->i_dest); case NCSMDS_UP: if (NCSMDS_SVC_ID_SMFA == svc_evt->i_svc_id) { osaf_mutex_lock_ordie(&cb->cb_lock); -- 2.25.1 |
From: thang.d.nguyen <tha...@de...> - 2023-07-14 02:36:25
|
The global smfd_dest (in cd struct) shall be restored with MDS event NCSMDS_UP and NCSMDS_NEW_ACTIVE (is set to 0 with event NCSMDS_DOWN). --- src/smf/smfnd/smfnd_mds.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/smf/smfnd/smfnd_mds.c b/src/smf/smfnd/smfnd_mds.c index 5f8ebb59b..4fba6669b 100644 --- a/src/smf/smfnd/smfnd_mds.c +++ b/src/smf/smfnd/smfnd_mds.c @@ -240,6 +240,15 @@ static uint32_t mds_svc_event(struct ncsmds_callback_info *info) switch (svc_evt->i_change) { case NCSMDS_NEW_ACTIVE: LOG_NO("MDS %s: NCSMDS_NEW_ACTIVE", __FUNCTION__); + /* Catch the vdest of SMFD*/ + if (m_MDS_DEST_IS_AN_ADEST(svc_evt->i_dest)) + return NCSCC_RC_SUCCESS; + osaf_mutex_lock_ordie(&cb->cb_lock); + cb->smfd_dest = svc_evt->i_dest; + osaf_mutex_unlock_ordie(&cb->cb_lock); + LOG_NO("MDS %s: NCSMDS_SVC_ID_SMFD " + "dest = 0x%" PRIx64, + __FUNCTION__, svc_evt->i_dest); case NCSMDS_UP: if (NCSMDS_SVC_ID_SMFA == svc_evt->i_svc_id) { osaf_mutex_lock_ordie(&cb->cb_lock); -- 2.25.1 |
From: thang.d.nguyen <tha...@de...> - 2023-07-14 02:36:25
|
Summary: smf: Fix handling of MDS events in smfnd [#3340] Review request for Ticket(s): 3340 Peer Reviewer(s): Thien, Dat Pull request to: *** LIST THE PERSON WITH PUSH ACCESS HERE *** Affected branch(es): develop Development branch: ticket-3340 Base revision: 85dd8cc29874861a911ae73f29ea068dbb6d25b7 Personal repository: git://git.code.sf.net/u/thangng/review -------------------------------- Impacted area Impact y/n -------------------------------- Docs n Build system n RPM/packaging n Configuration files n Startup scripts n SAF services y OpenSAF services n Core libraries n Samples n Tests n Other n Comments (indicate scope for each "y" above): --------------------------------------------- revision 2d600b27d045fcaafeb66e0e59d61cc64cce4842 Author: thang.d.nguyen <tha...@de...> Date: Thu, 13 Jul 2023 05:54:32 +0700 smf: Fix handling of MDS events in smfnd [#3340] The global smfd_dest (in cd struct) shall be restored with MDS event NCSMDS_UP and NCSMDS_NEW_ACTIVE (is set to 0 with event NCSMDS_DOWN). Complete diffstat: ------------------ src/smf/smfnd/smfnd_mds.c | 9 +++++++++ 1 file changed, 9 insertions(+) Testing Commands: ----------------- N/A Testing, Expected Results: -------------------------- N/A Conditions of Submission: ------------------------- Ack from reviewer Arch Built Started Linux distro ------------------------------------------- mips n 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 ~/.gitconfig file (i.e. user.name, user.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. |
From: Thang D. N. <tha...@de...> - 2023-05-26 06:57:15
|
ACK. -----Original Message----- From: Tai Huynh Nguyen <tai...@de...> Sent: Thursday, May 25, 2023 4:23 PM To: Dat Tran Quoc Phan <dat...@de...>; Thien Minh Huynh <thi...@de...>; Thang Duc Nguyen <tha...@de...> Cc: ope...@li...; Tai Huynh Nguyen <tai...@de...> Subject: [PATCH 1/1] amf: Fix errors reported by valgrind [#3339] Fix access uninitialised value --- src/amf/amfnd/avnd_comp.h | 2 +- src/amf/amfnd/cbq.cc | 16 +++++++++++----- src/amf/amfnd/comp.cc | 1 + 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/amf/amfnd/avnd_comp.h b/src/amf/amfnd/avnd_comp.h index bbc2aa0f3..c3339ac79 100644 --- a/src/amf/amfnd/avnd_comp.h +++ b/src/amf/amfnd/avnd_comp.h @@ -878,7 +878,7 @@ extern uint32_t avnd_dblist_hc_rec_cmp(uint8_t *key1, uint8_t *key2); extern void avnd_comp_hc_rec_del_all(struct avnd_cb_tag *, AVND_COMP *); extern void avnd_comp_cbq_del(struct avnd_cb_tag *, AVND_COMP *, bool); -extern void avnd_comp_cbq_rec_pop_and_del(struct avnd_cb_tag *, AVND_COMP *, +extern uint32_t avnd_comp_cbq_rec_pop_and_del(struct avnd_cb_tag *, +AVND_COMP *, uint32_t opq_hdl, bool); extern AVND_COMP_CBK *avnd_comp_cbq_rec_add(struct avnd_cb_tag *, AVND_COMP *, AVSV_AMF_CBK_INFO *, MDS_DEST *, diff --git a/src/amf/amfnd/cbq.cc b/src/amf/amfnd/cbq.cc index d2de58f28..6e18c8edc 100644 --- a/src/amf/amfnd/cbq.cc +++ b/src/amf/amfnd/cbq.cc @@ -247,6 +247,7 @@ uint32_t avnd_evt_ava_resp_evh(AVND_CB *cb, AVND_EVT *evt) { uint32_t rc = NCSCC_RC_SUCCESS; bool msg_from_avnd = false, int_ext_comp = false; SaAisErrorT amf_rc = SA_AIS_OK; + uint32_t cbk_rec_deleted = 0; TRACE_ENTER(); @@ -432,9 +433,12 @@ uint32_t avnd_evt_ava_resp_evh(AVND_CB *cb, AVND_EVT *evt) { LOG_ER("'%s', not found", osaf_extended_name_borrow( &cbk_rec->cbk_info->param.csi_attr_change.csi_name)); - avnd_comp_cbq_rec_pop_and_del(cb, comp, cbk_rec->opq_hdl, false); - if (m_AVND_TMR_IS_ACTIVE(cbk_rec->resp_tmr)) { - m_AVND_TMR_COMP_CBK_RESP_STOP(cb, *cbk_rec) + cbk_rec_deleted = + avnd_comp_cbq_rec_pop_and_del(cb, comp, cbk_rec->opq_hdl, false); + if (!cbk_rec_deleted) { + if (m_AVND_TMR_IS_ACTIVE(cbk_rec->resp_tmr)) { + m_AVND_TMR_COMP_CBK_RESP_STOP(cb, *cbk_rec) + } } if (SA_AIS_OK != resp->err) { // generate a failure report. @@ -943,11 +947,12 @@ void avnd_comp_cbq_del(AVND_CB *cb, AVND_COMP *comp, bool send_del_cbk) { send_del_cbk - true if the callback is tobe deleted and an event can be sent to another AvND. - Return Values : None. + Return Values : true if found and delete the record + false if not found the record. Notes : None. ******************************************************************************/ -void avnd_comp_cbq_rec_pop_and_del(AVND_CB *cb, AVND_COMP *comp, +uint32_t avnd_comp_cbq_rec_pop_and_del(AVND_CB *cb, AVND_COMP *comp, uint32_t opq_hdl, bool send_del_cbk) { uint32_t found; NODE_ID dest_node_id = 0; @@ -972,6 +977,7 @@ void avnd_comp_cbq_rec_pop_and_del(AVND_CB *cb, AVND_COMP *comp, } /* if(true == send_del_cbk) */ avnd_comp_cbq_rec_del(cb, comp, rec); } /* if(found) */ + return found; } /**************************************************************************** diff --git a/src/amf/amfnd/comp.cc b/src/amf/amfnd/comp.cc index 9e67cf388..8c0bf35ff 100644 --- a/src/amf/amfnd/comp.cc +++ b/src/amf/amfnd/comp.cc @@ -1993,6 +1993,7 @@ static void set_params_for_csi_attr_change_cbk(AVSV_AMF_CBK_INFO *cbk_info, /* copy the attributes */ memset(&attr, 0, sizeof(AVSV_CSI_ATTRS)); + memset(&csi_name, 0, sizeof(SaNameT)); if (csi_rec->attrs.number != 0) { attr.list = static_cast<AVSV_ATTR_NAME_VAL *>( calloc(csi_rec->attrs.number, sizeof(AVSV_ATTR_NAME_VAL))); -- 2.17.1 |
From: Thien M. H. <thi...@de...> - 2023-05-24 02:35:20
|
Hi Khanh, ACK from me. Best Regards, Thien ________________________________ From: Khanh Q Nguyen <kha...@de...> Sent: Monday, May 22, 2023 4:42 PM To: Thang Duc Nguyen <tha...@de...>; Thien Minh Huynh <thi...@de...> Cc: ope...@li... <ope...@li...>; Khanh Q Nguyen <kha...@de...> Subject: [PATCH 1/1] pyosaf: type conversion before converting a value to a ctypes value pointer [#3338] Pyosaf ccb fails to convert a value to a ctypes value pointer if the input value is a string. This fix will convert the input value to int or float if the input value type is a numeric type. --- python/pyosaf/utils/immom/ccb.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/python/pyosaf/utils/immom/ccb.py b/python/pyosaf/utils/immom/ccb.py index a23f777d3..cb6ec2e00 100644 --- a/python/pyosaf/utils/immom/ccb.py +++ b/python/pyosaf/utils/immom/ccb.py @@ -43,21 +43,21 @@ def _value_to_ctype_ptr(value_type, value): c_void_p: ctype pointer which points to value """ if value_type is eSaImmValueTypeT.SA_IMM_ATTR_SAINT32T: - ctypeptr = cast(pointer(SaInt32T(value)), c_void_p) + ctypeptr = cast(pointer(SaInt32T(int(value))), c_void_p) elif value_type is eSaImmValueTypeT.SA_IMM_ATTR_SAUINT32T: - ctypeptr = cast(pointer(SaUint32T(value)), c_void_p) + ctypeptr = cast(pointer(SaUint32T(int(value))), c_void_p) elif value_type is eSaImmValueTypeT.SA_IMM_ATTR_SAINT64T: - ctypeptr = cast(pointer(SaInt64T(value)), c_void_p) + ctypeptr = cast(pointer(SaInt64T(int(value))), c_void_p) elif value_type is eSaImmValueTypeT.SA_IMM_ATTR_SAUINT64T: - ctypeptr = cast(pointer(SaUint64T(value)), c_void_p) + ctypeptr = cast(pointer(SaUint64T(int(value))), c_void_p) elif value_type is eSaImmValueTypeT.SA_IMM_ATTR_SATIMET: - ctypeptr = cast(pointer(SaTimeT(value)), c_void_p) + ctypeptr = cast(pointer(SaTimeT(int(value))), c_void_p) elif value_type is eSaImmValueTypeT.SA_IMM_ATTR_SANAMET: ctypeptr = cast(pointer(SaNameT(value)), c_void_p) elif value_type is eSaImmValueTypeT.SA_IMM_ATTR_SAFLOATT: - ctypeptr = cast(pointer(SaFloatT(value)), c_void_p) + ctypeptr = cast(pointer(SaFloatT(float(value))), c_void_p) elif value_type is eSaImmValueTypeT.SA_IMM_ATTR_SADOUBLET: - ctypeptr = cast(pointer(SaDoubleT(value)), c_void_p) + ctypeptr = cast(pointer(SaDoubleT(float(value))), c_void_p) elif value_type is eSaImmValueTypeT.SA_IMM_ATTR_SASTRINGT: ctypeptr = cast(pointer(SaStringT(value)), c_void_p) elif value_type is eSaImmValueTypeT.SA_IMM_ATTR_SAANYT: -- 2.17.1 |
From: Thien M. H. <thi...@de...> - 2023-04-27 09:32:50
|
Hi Dat, ACK from me with a minor comment. In order to facilitate tracking, the incorrect ticket should be marked in the commit message or comment on #3337<https://sourceforge.net/p/opensaf/tickets/3337/>. Best Regards, Thien ________________________________ From: Dat Tran Quoc Phan <dat...@de...> Sent: Wednesday, April 26, 2023 5:12 PM To: Thang Duc Nguyen <tha...@de...>; Thien Minh Huynh <thi...@de...> Cc: ope...@li... <ope...@li...>; Dat Tran Quoc Phan <dat...@de...> Subject: [PATCH 1/1] mds: fix coredump when run mdstest using mds q_ownership [#3337] This fix will remove a wrong freeing when mds recevies message. Message buffer will only be freed by upper layer receiver. --- src/mds/mds_dt_common.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/mds/mds_dt_common.c b/src/mds/mds_dt_common.c index 67b70a42c..85784e4b6 100644 --- a/src/mds/mds_dt_common.c +++ b/src/mds/mds_dt_common.c @@ -575,7 +575,6 @@ uint32_t mdtm_process_recv_message_common(uint8_t flag, uint8_t *buffer, mds_mcm_ll_data_rcv(&reassem_queue->recv); /* Free Memory allocated to this structure */ - mdtm_free_reassem_msg_mem(&reassem_queue->recv.msg); m_MMGR_FREE_REASSEM_QUEUE(reassem_queue); return NCSCC_RC_SUCCESS; -- 2.17.1 |
From: Thien M. H. <thi...@de...> - 2023-04-20 07:03:05
|
Hi Khanh, ACK from me Best Regards, Thien -----Original Message----- From: Khanh Q Nguyen <kha...@de...> Sent: Monday, April 17, 2023 2:10 PM To: Thang Duc Nguyen <tha...@de...>; Thien Minh Huynh <thi...@de...> Cc: ope...@li...; Khanh Q Nguyen <kha...@de...> Subject: [PATCH 1/2] rde: fix pointer used after free [#3332] This fix moves the free function to a more appropriate position. --- src/rde/agent/rda_papi.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rde/agent/rda_papi.cc b/src/rde/agent/rda_papi.cc index ef5d8a962..80d98ca52 100644 --- a/src/rde/agent/rda_papi.cc +++ b/src/rde/agent/rda_papi.cc @@ -284,8 +284,8 @@ static PCSRDA_RETURN_CODE pcs_rda_reg_callback(uint32_t cb_handle, } if (m_NCS_TASK_START(rda_callback_cb->task_handle) != NCSCC_RC_SUCCESS) { - m_NCS_MEM_FREE(rda_callback_cb, 0, 0, 0); m_NCS_TASK_RELEASE(rda_callback_cb->task_handle); + m_NCS_MEM_FREE(rda_callback_cb, 0, 0, 0); rc = PCSRDA_RC_TASK_SPAWN_FAILED; break; } -- 2.17.1 |
From: Thang D. N. <tha...@de...> - 2023-04-19 01:23:04
|
Ack. -----Original Message----- From: Khanh Q Nguyen <kha...@de...> Sent: Monday, April 17, 2023 2:10 PM To: Thang Duc Nguyen <tha...@de...>; Thien Minh Huynh <thi...@de...> Cc: ope...@li...; Khanh Q Nguyen <kha...@de...> Subject: [PATCH 2/2] evt: fix pointer used after free [#3332] This fix moves the free function to a more appropriate position. --- src/evt/evtd/eds_amf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/evt/evtd/eds_amf.c b/src/evt/evtd/eds_amf.c index 97b71a5bd..ebadf9095 100644 --- a/src/evt/evtd/eds_amf.c +++ b/src/evt/evtd/eds_amf.c @@ -865,10 +865,10 @@ SaBoolT update_node_db(EDS_CB *cb, NODE_ID node_id, SaBoolT is_member) if (ncs_patricia_tree_add(&cb->eds_cluster_nodes_list, &cn->pat_node) != NCSCC_RC_SUCCESS) { - free(cn); LOG_ER( "Patricia add failed for cluster node %u", cn->node_id); + free(cn); TRACE_LEAVE(); return SA_FALSE; } else { -- 2.17.1 |
From: Thang D. N. <tha...@de...> - 2023-04-14 03:24:50
|
Looks good. Ack. -----Original Message----- From: Thien Minh Huynh <thi...@de...> Sent: Friday, April 7, 2023 2:22 PM To: Thang Duc Nguyen <tha...@de...>; Dat Tran Quoc Phan <dat...@de...> Cc: ope...@li...; Thien Minh Huynh <thi...@de...> Subject: [PATCH 1/1] log: check the queue capacity before retrieving an item [#3334] Osaflogd occasionally fails to keep synchronization in a pair of nodes. When received a pop request from active, standby will be coredump if retrieving a piece from an empty queue. This is done to avoid coredump by checking the queue capacity before retrieving an item. --- src/log/logd/lgs_mbcsv_v8.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/log/logd/lgs_mbcsv_v8.cc b/src/log/logd/lgs_mbcsv_v8.cc index 289a4f610..97671cf40 100644 --- a/src/log/logd/lgs_mbcsv_v8.cc +++ b/src/log/logd/lgs_mbcsv_v8.cc @@ -205,6 +205,9 @@ uint32_t ckpt_proc_push_async(lgs_cb_t* cb, void* data) { uint32_t ckpt_proc_pop_async(lgs_cb_t* cb, void* data) { TRACE_ENTER(); assert(lgs_is_peer_v8() && "The peer should run with V8 or beyond!"); + if (Cache::instance()->Size() == 0) { + return NCSCC_RC_FAILURE; + } auto data_v8 = static_cast<lgsv_ckpt_msg_v8_t*>(data); auto param = &data_v8->ckpt_rec.pop_async; uint64_t seq_id = param->seq_id; @@ -225,6 +228,11 @@ uint32_t ckpt_proc_pop_write_async(lgs_cb_t* cb, void* data) { assert(lgs_is_peer_v8() && "The peer should run with V8 or beyond!"); auto data_v8 = static_cast<lgsv_ckpt_msg_v8_t*>(data); auto param = &data_v8->ckpt_rec.pop_and_write_async; + if (Cache::instance()->Size() == 0) { + lgs_free_edu_mem(param->log_record); + lgs_free_edu_mem(param->log_file); + return NCSCC_RC_FAILURE; + } uint64_t seq_id = param->seq_id; auto top = Cache::instance()->Front(); if (top->seq_id_ != seq_id) { -- 2.40.0 |
From: Thien M. H. <thi...@de...> - 2023-04-14 03:23:32
|
Hi Dat, ACK from me with no comment. Best Regards, Thien -----Original Message----- From: Dat Tran Quoc Phan <dat...@de...> Sent: Friday, April 14, 2023 7:01 AM To: Thang Duc Nguyen <tha...@de...>; Thien Minh Huynh <thi...@de...> Cc: ope...@li...; Dat Tran Quoc Phan <dat...@de...> Subject: [PATCH 1/1] rde: fix errors reported by Valgrind [#3333] Fix memleak detected by Valgrind when receive rde message. Also fix the uninitialized value(s). --- src/rde/rded/rde_amf.cc | 1 + src/rde/rded/rde_mds.cc | 10 ++++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/rde/rded/rde_amf.cc b/src/rde/rded/rde_amf.cc index 5a80bc418..9ae8bbce2 100644 --- a/src/rde/rded/rde_amf.cc +++ b/src/rde/rded/rde_amf.cc @@ -151,6 +151,7 @@ uint32_t rde_amf_init(RDE_AMF_CB *rde_amf_cb) { NCSCC_RC_SUCCESS) return NCSCC_RC_FAILURE; + memset(&amfCallbacks, 0, sizeof(amfCallbacks)); amfCallbacks.saAmfHealthcheckCallback = rde_saf_health_chk_callback; amfCallbacks.saAmfCSISetCallback = rde_saf_CSI_set_callback; amfCallbacks.saAmfCSIRemoveCallback = rde_saf_CSI_rem_callback; diff --git a/src/rde/rded/rde_mds.cc b/src/rde/rded/rde_mds.cc index 4591d1996..42db8583a 100644 --- a/src/rde/rded/rde_mds.cc +++ b/src/rde/rded/rde_mds.cc @@ -48,10 +48,12 @@ static uint32_t msg_encode(MDS_CALLBACK_ENC_INFO *enc_info) { assert(data); ncs_encode_32bit(&data, msg->info.peer_info.ha_role); ncs_enc_claim_space(uba, sizeof(uint32_t)); - data = ncs_enc_reserve_space(uba, sizeof(uint64_t)); - assert(data); - ncs_encode_64bit(&data, msg->info.peer_info.promote_pending); - ncs_enc_claim_space(uba, sizeof(uint64_t)); + if (msg->info.peer_info.ha_role == PCS_RDA_UNDEFINED) { + data = ncs_enc_reserve_space(uba, sizeof(uint64_t)); + assert(data); + ncs_encode_64bit(&data, msg->info.peer_info.promote_pending); + ncs_enc_claim_space(uba, sizeof(uint64_t)); + } break; default: -- 2.17.1 |
From: Thien M. H. <thi...@de...> - 2023-04-11 10:25:06
|
Hi Dat, See my comments. Best Regards, Thien -----Original Message----- From: Dat Tran Quoc Phan <dat...@de...> Sent: Tuesday, March 28, 2023 10:44 AM To: Thang Duc Nguyen <tha...@de...>; Thien Minh Huynh <thi...@de...> Cc: ope...@li...; Dat Tran Quoc Phan <dat...@de...> Subject: [PATCH 1/1] rde: fix errors reported by Valgrind [#3333] Fix memleak detected by Valgrind when receive rde message. Also fix the uninitialized value(s). --- src/rde/rded/rde_amf.cc | 1 + src/rde/rded/rde_mds.cc | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/rde/rded/rde_amf.cc b/src/rde/rded/rde_amf.cc index 5a80bc418..a732f5a7b 100644 --- a/src/rde/rded/rde_amf.cc +++ b/src/rde/rded/rde_amf.cc @@ -151,6 +151,7 @@ uint32_t rde_amf_init(RDE_AMF_CB *rde_amf_cb) { NCSCC_RC_SUCCESS) return NCSCC_RC_FAILURE; + memset(&amfCallbacks,0,sizeof(amfCallbacks)); [Thien]: there should be a gap after each comma. amfCallbacks.saAmfHealthcheckCallback = rde_saf_health_chk_callback; amfCallbacks.saAmfCSISetCallback = rde_saf_CSI_set_callback; amfCallbacks.saAmfCSIRemoveCallback = rde_saf_CSI_rem_callback; diff --git a/src/rde/rded/rde_mds.cc b/src/rde/rded/rde_mds.cc index 4591d1996..1ed17ae00 100644 --- a/src/rde/rded/rde_mds.cc +++ b/src/rde/rded/rde_mds.cc @@ -106,6 +106,8 @@ static uint32_t msg_decode(MDS_CALLBACK_DEC_INFO *dec_info) { static_cast<uint64_t>(ncs_decode_64bit(&data)); ncs_dec_skip_space(uba, sizeof(uint64_t)); } + /* uba not used after */ + ncs_reset_uba(uba); [Thien]: ncs_dec_skip_space(uba, sizeof(uint64_t)); A better option would be to move the function outside of the "msg->info.peer_info.ha_role == PCS_RDA_UNDEFINED" scoop condition. break; default: -- 2.17.1 |
From: thien.m.huynh <thi...@de...> - 2023-04-07 07:23:03
|
Summary: log: check the queue capacity before retrieving an item [#3334] Review request for Ticket(s): 3334 Peer Reviewer(s): Thang, Dat Pull request to: *** LIST THE PERSON WITH PUSH ACCESS HERE *** Affected branch(es): develop Development branch: ticket-3334 Base revision: 4fa9d9045afa28c46c4afd8db2173064e5dbbfa2 Personal repository: git://git.code.sf.net/u/thienhuynh/review -------------------------------- Impacted area Impact y/n -------------------------------- Docs n Build system n RPM/packaging n Configuration files n Startup scripts n SAF services n OpenSAF services y Core libraries n Samples n Tests n Other n Comments (indicate scope for each "y" above): --------------------------------------------- *** EXPLAIN/COMMENT THE PATCH SERIES HERE *** revision 47dee89190f1be5714010b5e546dc6a3168a74f0 Author: thien.m.huynh <thi...@de...> Date: Thu, 6 Apr 2023 18:15:20 +0700 log: check the queue capacity before retrieving an item [#3334] Osaflogd occasionally fails to keep synchronization in a pair of nodes. When received a pop request from active, standby will be coredump if retrieving a piece from an empty queue. This is done to avoid coredump by checking the queue capacity before retrieving an item. Complete diffstat: ------------------ src/log/logd/lgs_mbcsv_v8.cc | 8 ++++++++ 1 file changed, 8 insertions(+) Testing Commands: ----------------- N/A Testing, Expected Results: -------------------------- N/A Conditions of Submission: ------------------------- ACK from reviewer Arch Built Started Linux distro ------------------------------------------- mips n 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 ~/.gitconfig file (i.e. user.name, user.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. |
From: thien.m.huynh <thi...@de...> - 2023-04-07 07:23:02
|
Osaflogd occasionally fails to keep synchronization in a pair of nodes. When received a pop request from active, standby will be coredump if retrieving a piece from an empty queue. This is done to avoid coredump by checking the queue capacity before retrieving an item. --- src/log/logd/lgs_mbcsv_v8.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/log/logd/lgs_mbcsv_v8.cc b/src/log/logd/lgs_mbcsv_v8.cc index 289a4f610..97671cf40 100644 --- a/src/log/logd/lgs_mbcsv_v8.cc +++ b/src/log/logd/lgs_mbcsv_v8.cc @@ -205,6 +205,9 @@ uint32_t ckpt_proc_push_async(lgs_cb_t* cb, void* data) { uint32_t ckpt_proc_pop_async(lgs_cb_t* cb, void* data) { TRACE_ENTER(); assert(lgs_is_peer_v8() && "The peer should run with V8 or beyond!"); + if (Cache::instance()->Size() == 0) { + return NCSCC_RC_FAILURE; + } auto data_v8 = static_cast<lgsv_ckpt_msg_v8_t*>(data); auto param = &data_v8->ckpt_rec.pop_async; uint64_t seq_id = param->seq_id; @@ -225,6 +228,11 @@ uint32_t ckpt_proc_pop_write_async(lgs_cb_t* cb, void* data) { assert(lgs_is_peer_v8() && "The peer should run with V8 or beyond!"); auto data_v8 = static_cast<lgsv_ckpt_msg_v8_t*>(data); auto param = &data_v8->ckpt_rec.pop_and_write_async; + if (Cache::instance()->Size() == 0) { + lgs_free_edu_mem(param->log_record); + lgs_free_edu_mem(param->log_file); + return NCSCC_RC_FAILURE; + } uint64_t seq_id = param->seq_id; auto top = Cache::instance()->Front(); if (top->seq_id_ != seq_id) { -- 2.40.0 |
From: Thang D. N. <tha...@de...> - 2023-03-30 08:01:25
|
Ack with minor comment. Use variable to store "Try '$(basename "$0") -h or --help' for more information" then use it. -----Original Message----- From: Khanh Q Nguyen <kha...@de...> Sent: Wednesday, March 29, 2023 3:41 PM To: Thang Duc Nguyen <tha...@de...>; Thien Minh Huynh <thi...@de...> Cc: ope...@li...; Khanh Q Nguyen <kha...@de...> Subject: [PATCH 1/1] clm: Add an operation to excute a script [#2696] Update the clm-adm command-line tool to support the new admin-ops added in ticket [#2649]. -o or --admin-op: operation name (mandatory) ... 'execute' for executing action on remote node/cluster -a or --action : action name is a script stored in /usr/lib/opensaf/clm-scripts directory started with prefix "osafclm_" --- src/clm/tools/clm-adm | 57 +++++++++++++++++++++++++++++++++++++++---- 1 file changed, 52 insertions(+), 5 deletions(-) mode change 100644 => 100755 src/clm/tools/clm-adm diff --git a/src/clm/tools/clm-adm b/src/clm/tools/clm-adm old mode 100644 new mode 100755 index 25445fff1..89aff15a0 --- a/src/clm/tools/clm-adm +++ b/src/clm/tools/clm-adm @@ -16,7 +16,7 @@ usage() { echo "" - echo "USAGE: $(basename "$0") [-t value] <-o op_name> <DN>" + echo "USAGE: $(basename "$0") [-t value] <-o op_name> [-a action_name] <DN>" echo "" echo "OPTIONS:" echo " -t or --timeout : command timeout in seconds (default=60) (optional)" @@ -24,13 +24,29 @@ usage() echo " 'lock' for admin lock " echo " 'unlock' for admin unlock " echo " 'shutdown' for admin shutdown " - echo " 'reset' for admin reset of cluster" + echo " 'reset' for admin reset of node/cluster" + echo " 'execute' for executing action on remote node/cluster" + echo " -a or --action : action name is a script stored in /usr/lib/opensaf/clm-scripts" + echo " directory started with prefix "osafclm_"" echo " DN : a valid DN name of CLM node or cluster (mandatory)" echo "" echo "" + echo "NOTES:" + echo " 1) -a is only mandatory with 'execute' operation" + echo "" + echo "" + echo "EXAMPLES:" + echo " clm-adm -o execute -a test safNode=SC-2,safCluster=myClmCluster" + echo " execute script locate on /usr/lib/opensaf/clm-scripts/osafclm_test on SC-2" + echo " clm-adm -o reset safCluster=myClmCluster" + echo " Cluster reboot" + echo " clm-adm -o reset safNode=SC-2,safCluster=myClmCluster" + echo " Node SC-2 reboot" + echo "" + echo "" } -options=$(getopt -o t:o:h -l timeout:,admin-op:,help -- "$@") +options=$(getopt -o t:o:a:h -l timeout:,admin-op:,action:,help -- "$@") status=$? if [ $status -ne 0 ] ; then echo "Try '$(basename "$0") -h or --help' for more information" @@ -41,6 +57,8 @@ eval set -- "$options" DN="" CMD="" TIMEOUT="" +ACTION="" +OPERATION="" while true; do case $1 in @@ -51,6 +69,7 @@ while true; do ;; -o|--admin-op) shift 1 + OPERATION=$1 if [ "$1" = "unlock" ]; then CMD=1 elif [ "$1" = "lock" ]; then @@ -59,12 +78,19 @@ while true; do CMD=3 elif [ "$1" = "reset" ]; then CMD=4 + elif [ "$1" = "execute" ]; then + CMD=5 else echo "Invalid operation name" exit 1 fi shift 1 ;; + -a|--action) + shift 1 + ACTION=$1 + shift 1 + ;; -h|--help) usage exit 0 @@ -86,9 +112,22 @@ if [ "$CMD" = "" ]; then exit 1 fi +if [ "$CMD" = "5" ] && [ "$ACTION" = "" ]; then + echo "action name is mandatory in 'execute' operation" + echo "Try '$(basename "$0") -h or --help' for more information" + exit 1 +fi + +if [ "$CMD" != "5" ] && [ "$ACTION" != "" ]; then + echo "-a option is redundant in '$OPERATION' operation" + echo "Try '$(basename "$0") -h or --help' for more information" + exit 1 +fi + shift $((OPTIND -1)) DN="$*" + if [ "$DN" = "" ]; then echo "DN name is mandatory" echo "Try '$(basename "$0") -h or --help' for more information" @@ -96,9 +135,17 @@ if [ "$DN" = "" ]; then fi if [ "$TIMEOUT" = "" ]; then - immadm -o "$CMD" "$DN" + if [ "$ACTION" != "" ]; then + immadm -o "$CMD" -p "saClmAction:SA_STRING_T:$ACTION" "$DN" + else + immadm -o "$CMD" "$DN" + fi else - immadm -t "$TIMEOUT" -o "$CMD" "$DN" + if [ "$ACTION" != "" ]; then + immadm -t "$TIMEOUT" -o "$CMD" -p "saClmAction:SA_STRING_T:$ACTION" "$DN" + else + immadm -t "$TIMEOUT" -o "$CMD" "$DN" + fi fi exit $? -- 2.17.1 |
From: Thang D. N. <tha...@de...> - 2023-03-28 02:43:39
|
Hi Dat, It's better to fix in new ticket. B.R/Thang -----Original Message----- From: Dat Tran Quoc Phan <dat...@de...> Sent: Monday, March 27, 2023 4:21 PM To: Thang Duc Nguyen <tha...@de...>; Thien Minh Huynh <thi...@de...> Cc: ope...@li...; Dat Tran Quoc Phan <dat...@de...> Subject: [PATCH 1/1] amf: Fix errors reported by valgrind (cont-part 3) [#3331] This is the continuous fix for valgrind report. The commit will free received rde msg if not fragmented. Also fix uninitialised value. --- src/rde/rded/rde_amf.cc | 1 + src/rde/rded/rde_mds.cc | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/rde/rded/rde_amf.cc b/src/rde/rded/rde_amf.cc index 5a80bc418..a732f5a7b 100644 --- a/src/rde/rded/rde_amf.cc +++ b/src/rde/rded/rde_amf.cc @@ -151,6 +151,7 @@ uint32_t rde_amf_init(RDE_AMF_CB *rde_amf_cb) { NCSCC_RC_SUCCESS) return NCSCC_RC_FAILURE; + memset(&amfCallbacks,0,sizeof(amfCallbacks)); amfCallbacks.saAmfHealthcheckCallback = rde_saf_health_chk_callback; amfCallbacks.saAmfCSISetCallback = rde_saf_CSI_set_callback; amfCallbacks.saAmfCSIRemoveCallback = rde_saf_CSI_rem_callback; diff --git a/src/rde/rded/rde_mds.cc b/src/rde/rded/rde_mds.cc index 4591d1996..1ed17ae00 100644 --- a/src/rde/rded/rde_mds.cc +++ b/src/rde/rded/rde_mds.cc @@ -106,6 +106,8 @@ static uint32_t msg_decode(MDS_CALLBACK_DEC_INFO *dec_info) { static_cast<uint64_t>(ncs_decode_64bit(&data)); ncs_dec_skip_space(uba, sizeof(uint64_t)); } + /* uba not used after */ + ncs_reset_uba(uba); break; default: -- 2.17.1 |
From: Gary L. <gar...@de...> - 2023-03-28 00:35:43
|
The OpenSAF community is pleased to announce the availability of the OpenSAF 5.23.03 release. The source code for OpenSAF 5.23.03 and the corresponding documentation can be downloaded using the following links: http://sourceforge.net/projects/opensaf/files/releases/opensaf-5.23.03.tar.g z/download http://sourceforge.net/projects/opensaf/files/docs/opensaf-documentation-5.2 3.03.tar.gz/download For a complete list of new features in this release, please refer to the NEWS at the wiki: https://sourceforge.net/p/opensaf/wiki/NEWS-5.23.03/ See the ChangeLog for a full list of changes in this release: https://sourceforge.net/p/opensaf/wiki/ChangeLog-5.23.03/ Thank you for your continued interest in OpenSAF and to everyone who has contributed to this release. |
From: Thang D. N. <tha...@de...> - 2023-03-27 04:00:07
|
Hi Khanh, Some comments inline from me. B.R/Thang -----Original Message----- From: Khanh Q Nguyen <kha...@de...> Sent: Friday, March 24, 2023 5:01 PM To: Thang Duc Nguyen <tha...@de...>; Thien Minh Huynh <thi...@de...> Cc: ope...@li...; Khanh Q Nguyen <kha...@de...> Subject: [PATCH 1/1] clm: Add an operation to excute a script [#2696] Update the clm-adm command-line tool to support the new admin-ops added in ticket [#2649]. -o or --admin-op: operation name (mandatory) ... 'execute' for executing action on remote nodei(s) -a or --action : action name is a script stored in /usr/lib/opensaf/clm-scripts directory started with prefix "osafclm_" --- src/clm/tools/clm-adm | 49 ++++++++++++++++++++++++++++++++++++++----- 1 file changed, 44 insertions(+), 5 deletions(-) mode change 100644 => 100755 src/clm/tools/clm-adm diff --git a/src/clm/tools/clm-adm b/src/clm/tools/clm-adm old mode 100644 new mode 100755 index 25445fff1..0122bf97f --- a/src/clm/tools/clm-adm +++ b/src/clm/tools/clm-adm @@ -16,7 +16,7 @@ usage() { echo "" - echo "USAGE: $(basename "$0") [-t value] <-o op_name> <DN>" + echo "USAGE: $(basename "$0") [-t value] <-o op_name> [-a action_name] <DN>" echo "" echo "OPTIONS:" echo " -t or --timeout : command timeout in seconds (default=60) (optional)" @@ -24,13 +24,29 @@ usage() echo " 'lock' for admin lock " echo " 'unlock' for admin unlock " echo " 'shutdown' for admin shutdown " - echo " 'reset' for admin reset of cluster" + echo " 'reset' for admin reset of node/cluster" + echo " 'execute' for executing action on remote nodei(s)" [Thang]: Suggest to replace "nodei(s)" by node/cluster. B/c it does not support on multiple nodes. One example, clm-adm -o reset -a init safNode=PL-4,safCluster=myClmCluster In this case command still work and option "-a init" is redundant. + echo " -a or --action : action name is a script stored in /usr/lib/opensaf/clm-scripts" + echo " directory started with prefix "osafclm_"" echo " DN : a valid DN name of CLM node or cluster (mandatory)" echo "" echo "" + echo "NOTES:" + echo " 1) -a is mandatory with 'execute' operation" + echo "" + echo "" + echo "EXAMPLES:" + echo " clm-adm -o execute -a test safNode=SC-2,safCluster=myClmCluster" + echo " execute script locate on /usr/lib/opensaf/clm-scripts/osafclm_test on SC-2" + echo " clm-adm -o reset safCluster=myClmCluster" + echo " Cluster reboot" + echo " clm-adm -o reset safNode=SC-2,safCluster=myClmCluster" + echo " Node SC-2 reboot" + echo "" + echo "" } -options=$(getopt -o t:o:h -l timeout:,admin-op:,help -- "$@") +options=$(getopt -o t:o:a:h -l timeout:,admin-op:,action:,help -- "$@") status=$? if [ $status -ne 0 ] ; then echo "Try '$(basename "$0") -h or --help' for more information" @@ -41,6 +57,7 @@ eval set -- "$options" DN="" CMD="" TIMEOUT="" +ACTION="" while true; do case $1 in @@ -59,12 +76,19 @@ while true; do CMD=3 elif [ "$1" = "reset" ]; then CMD=4 + elif [ "$1" = "execute" ]; then + CMD=5 else echo "Invalid operation name" exit 1 fi shift 1 ;; + -a|--action) + shift 1 + ACTION=$1 + shift 1 + ;; -h|--help) usage exit 0 @@ -86,9 +110,16 @@ if [ "$CMD" = "" ]; then exit 1 fi +if [ "$CMD" = "5" ] && [ "$ACTION" = "" ]; then + echo "action name is mandatory in 'execute' operation" + echo "Try '$(basename "$0") -h or --help' for more information" + exit 1 +fi + shift $((OPTIND -1)) DN="$*" + if [ "$DN" = "" ]; then echo "DN name is mandatory" echo "Try '$(basename "$0") -h or --help' for more information" @@ -96,9 +127,17 @@ if [ "$DN" = "" ]; then fi if [ "$TIMEOUT" = "" ]; then - immadm -o "$CMD" "$DN" + if [ "$ACTION" != "" ]; then + immadm -o "$CMD" -p "saClmAction:SA_STRING_T:$ACTION" "$DN" + else + immadm -o "$CMD" "$DN" + fi else - immadm -t "$TIMEOUT" -o "$CMD" "$DN" + if [ "$ACTION" != "" ]; then + immadm -t "$TIMEOUT" -o "$CMD" -p "saClmAction:SA_STRING_T:$ACTION" "$DN" + else + immadm -t "$TIMEOUT" -o "$CMD" "$DN" + fi fi exit $? -- 2.17.1 |