[devel] [PATCH 0/1] Review Request for amf: return unstable if SG is under unlock admin op [#2982]
Summary: amf: return unstable if SG is under unlock admin op [#2982] Review request for Ticket(s): 2982 Peer Reviewer(s): Gary, Minh Pull request to: Gary, Minh Affected branch(es): develop Development branch: ticket-2982 Base revision: 9a730d22b0580e6e3c54fd3a4fd5bb4cf82c Personal repository: git://git.code.sf.net/u/thangng/review 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): - revision 0e2a0384aaa9ddbe9374edcf58496be8c5b6abcc Author: thang.nguyen Date: Thu, 6 Dec 2018 12:44:49 +0700 amf: return unstable if SG is under unlock admin op [#2982] WHile SG is under unlock admin operation. If AMFD receives SU instantiated event/message must be return SG unstable to not reply admin op done to IMM. Complete diffstat: -- src/amf/amfd/sg.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) Testing Commands: - N/A. Testing, Expected Results: -- N/A. Conditions of Submission: - ACKed from reviewers. 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 ~/.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. ___ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel
[devel] [PATCH 1/1] amf: return unstable if SG is under unlock admin op [#2982]
WHile SG is under unlock admin operation. If AMFD receives SU instantiated event/message must be return SG unstable to not reply admin op done to IMM. --- src/amf/amfd/sg.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/amf/amfd/sg.cc b/src/amf/amfd/sg.cc index fa011ec..b3fed1a 100644 --- a/src/amf/amfd/sg.cc +++ b/src/amf/amfd/sg.cc @@ -2064,8 +2064,8 @@ bool sg_stable_after_lock_in_or_unlock_in(AVD_SG *sg) { break; default: - TRACE("Called for wrong admin operation"); - break; + TRACE("Called for wrong admin operation %d", sg->adminOp); + return false; } return true; -- 2.7.4 ___ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel
[devel] [PATCH 0/1] Review Request for amf: disallow delete csi that another csi is dependent on [#2969]
Summary: amf: disallow delete csi that another csi is dependent on [#2969] Review request for Ticket(s): 2969 Peer Reviewer(s): Gary, Minh Pull request to: Gary, Minh Affected branch(es): develop Development branch: ticket-2969 Base revision: 9a730d22b0580e6e3c54fd3a4fd5bb4cf82c Personal repository: git://git.code.sf.net/u/thangng/review 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): - revision c67b980b83eaa3fc466fd78e29c8c7fe4e86f136 Author: thang.nguyen Date: Thu, 6 Dec 2018 02:02:50 +0700 amf: disallow delete csi that another csi is dependent on [#2969] Disallow delete a csi that another csi is dependent on. If allowing it caused AMFD crashed or fallen in cyclic restart. Allow if csi(s) are deleted in same ccb. Complete diffstat: -- src/amf/amfd/csi.cc | 23 +++ 1 file changed, 23 insertions(+) Testing Commands: - N/A. Testing, Expected Results: -- N/A. Conditions of Submission: - ACKed from reviewers. 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 ~/.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. ___ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel
[devel] [PATCH 1/1] amf: disallow delete csi that another csi is dependent on [#2969]
Disallow delete a csi that another csi is dependent on. If allowing it caused AMFD crashed or fallen in cyclic restart. Allow if csi(s) are deleted in same ccb. --- src/amf/amfd/csi.cc | 23 +++ 1 file changed, 23 insertions(+) diff --git a/src/amf/amfd/csi.cc b/src/amf/amfd/csi.cc index 8282956..0a6c964 100644 --- a/src/amf/amfd/csi.cc +++ b/src/amf/amfd/csi.cc @@ -783,6 +783,7 @@ static SaAisErrorT csi_ccb_completed_delete_hdlr( CcbUtilOperationData_t *opdata) { SaAisErrorT rc = SA_AIS_ERR_BAD_OPERATION; AVD_CSI *csi; + AVD_CSI *t_csi; AVD_SU_SI_REL *t_sisu; const std::string object_name(Amf::to_string(>objectName)); @@ -851,6 +852,28 @@ static SaAisErrorT csi_ccb_completed_delete_hdlr( } } + t_csi = csi->si->list_of_csi; + + while (t_csi) { +AVD_CSI_DEPS *csidep; +/* Verify that there are no CSI dependencies to this CSI */ +for (csidep = t_csi->saAmfCSIDependencies; csidep != nullptr; + csidep = csidep->csi_dep_next) { + if (csidep->csi_dep_name_value.compare(csi->name) == 0) { +SaNameT csidepDn; +osaf_extended_name_lend(csidep->csi_dep_name_value.c_str(), ); +if (ccbutil_getCcbOpDataByDN(opdata->ccbId, ) == nullptr) { + report_ccb_validation_error( + opdata, "csi '%s' depends on '%s'", + t_csi->name.c_str(), csi->name.c_str()); + rc = SA_AIS_ERR_BAD_OPERATION; + goto done; +} + } +} +t_csi = t_csi->si_list_of_csi_next; + } /* while(t_csi) */ + rc = SA_AIS_OK; opdata->userData = csi; /* Save for later use in apply */ done: -- 2.7.4 ___ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel
[devel] [PATCH 1/1] amf: retry when implementer set returned ERR_EXIST [#2921]
In some condition, due to the AMF implementer released was not synced to the remain SC. So the ERR_EXIST returned when trying invoking implementer set on the remain SC. Add some retries on the ERR_EXIST. --- src/amf/amfd/role.cc | 27 --- src/clm/clmd/clms_imm.cc | 10 ++ 2 files changed, 34 insertions(+), 3 deletions(-) diff --git a/src/amf/amfd/role.cc b/src/amf/amfd/role.cc index 790983e..dc71665 100644 --- a/src/amf/amfd/role.cc +++ b/src/amf/amfd/role.cc @@ -49,12 +49,14 @@ #include "base/osaf_utility.h" #include "role.h" #include "nid/agent/nid_api.h" +#include "base/osaf_time.h" extern pthread_mutex_t imm_reinit_mutex; static uint32_t avd_role_failover(AVD_CL_CB *cb, SaAmfHAStateT role); static uint32_t avd_role_failover_qsd_actv(AVD_CL_CB *cb, SaAmfHAStateT role); static uint32_t avd_rde_set_role(SaAmfHAStateT role); +extern struct ImmutilWrapperProfile immutilWrapperProfile; /\ * Function: avd_role_change @@ -259,12 +261,31 @@ done: \**/ uint32_t avd_active_role_initialization(AVD_CL_CB *cb, SaAmfHAStateT role) { uint32_t status = NCSCC_RC_FAILURE; + SaAisErrorT rc = SA_AIS_OK; TRACE_ENTER(); - if (avd_imm_impl_set() != SA_AIS_OK) { -LOG_ER("avd_imm_impl_set FAILED"); -goto done; + struct timespec time = {0, 0}; + uint32_t no_of_retries = 0; + const uint32_t MAX_NO_RETRIES = immutilWrapperProfile.nTries; + osaf_millis_to_timespec(immutilWrapperProfile.retryInterval, ); + /* + * Some retries in case takeover with consensus + * when OI not released/synced yet + */ + while (++no_of_retries < MAX_NO_RETRIES) { +rc = avd_imm_impl_set(); +if (rc != SA_AIS_OK) { + if (rc == SA_AIS_ERR_EXIST) { +osaf_nanosleep(); +continue; + } else { +LOG_ER("avd_imm_impl_set FAILED"); +goto done; + } +} else { + break; +} } if (avd_imm_config_get() != NCSCC_RC_SUCCESS) { diff --git a/src/clm/clmd/clms_imm.cc b/src/clm/clmd/clms_imm.cc index 076890e..8c409cf 100644 --- a/src/clm/clmd/clms_imm.cc +++ b/src/clm/clmd/clms_imm.cc @@ -534,6 +534,16 @@ SaAisErrorT clms_imm_activate(CLMS_CB *cb) { } continue; } + /* + * Some retries in case takeover with consensus + * when OI not released/synced yet + */ + if (rc == SA_AIS_ERR_EXIST) { +LOG_WA("saImmOiImplementerSet returned %u", (unsigned)rc); +usleep(sleep_delay_ms * 1000); +msecs_waited += sleep_delay_ms; +continue; + } if (rc != SA_AIS_OK) { LOG_ER("saImmOiImplementerSet failed rc: %u", (unsigned)rc); goto done; -- 2.7.4 ___ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel
[devel] [PATCH 0/1] Review Request for amf: retry when implementer set returned ERR_EXIST [#2921] V2
Summary: amf: retry when implementer set returned ERR_EXIST [#2921] Review request for Ticket(s): 2921 Peer Reviewer(s): Gary, Minh Pull request to: Gary, Minh Affected branch(es): develop Development branch: ticket-2921 Base revision: a2b9cb812f5107a2b05e1eddab54a12456738173 Personal repository: git://git.code.sf.net/u/thangng/review 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): - revision 22a3814dd8cceb7e5e8f79f352a2d002c87453e8 Author: thang.nguyen Date: Mon, 8 Oct 2018 16:08:29 +0700 amf: retry when implementer set returned ERR_EXIST [#2921] In some condition, due to the AMF implementer released was not synced to the remain SC. So the ERR_EXIST returned when trying invoking implementer set on the remain SC. Add some retries on the ERR_EXIST. Complete diffstat: -- src/amf/amfd/role.cc | 27 --- src/clm/clmd/clms_imm.cc | 10 ++ 2 files changed, 34 insertions(+), 3 deletions(-) Testing Commands: - N/A Testing, Expected Results: -- N/A Conditions of Submission: - Acked from reviewers. 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 ~/.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. ___ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel
[devel] [PATCH 1/1] amf: retry when implementer set returned ERR_EXIST [#2921]
In some condition, due to the AMF implementer released was not synced to the remain SC. So the ERR_EXIST returned when trying invoking implementer set on the remain SC. Add some retries on the ERR_EXIST. --- src/amf/amfd/role.cc | 27 --- src/clm/clmd/clms_imm.cc | 25 - 2 files changed, 40 insertions(+), 12 deletions(-) diff --git a/src/amf/amfd/role.cc b/src/amf/amfd/role.cc index 790983e..dc71665 100644 --- a/src/amf/amfd/role.cc +++ b/src/amf/amfd/role.cc @@ -49,12 +49,14 @@ #include "base/osaf_utility.h" #include "role.h" #include "nid/agent/nid_api.h" +#include "base/osaf_time.h" extern pthread_mutex_t imm_reinit_mutex; static uint32_t avd_role_failover(AVD_CL_CB *cb, SaAmfHAStateT role); static uint32_t avd_role_failover_qsd_actv(AVD_CL_CB *cb, SaAmfHAStateT role); static uint32_t avd_rde_set_role(SaAmfHAStateT role); +extern struct ImmutilWrapperProfile immutilWrapperProfile; /\ * Function: avd_role_change @@ -259,12 +261,31 @@ done: \**/ uint32_t avd_active_role_initialization(AVD_CL_CB *cb, SaAmfHAStateT role) { uint32_t status = NCSCC_RC_FAILURE; + SaAisErrorT rc = SA_AIS_OK; TRACE_ENTER(); - if (avd_imm_impl_set() != SA_AIS_OK) { -LOG_ER("avd_imm_impl_set FAILED"); -goto done; + struct timespec time = {0, 0}; + uint32_t no_of_retries = 0; + const uint32_t MAX_NO_RETRIES = immutilWrapperProfile.nTries; + osaf_millis_to_timespec(immutilWrapperProfile.retryInterval, ); + /* + * Some retries in case takeover with consensus + * when OI not released/synced yet + */ + while (++no_of_retries < MAX_NO_RETRIES) { +rc = avd_imm_impl_set(); +if (rc != SA_AIS_OK) { + if (rc == SA_AIS_ERR_EXIST) { +osaf_nanosleep(); +continue; + } else { +LOG_ER("avd_imm_impl_set FAILED"); +goto done; + } +} else { + break; +} } if (avd_imm_config_get() != NCSCC_RC_SUCCESS) { diff --git a/src/clm/clmd/clms_imm.cc b/src/clm/clmd/clms_imm.cc index 076890e..bfb9441 100644 --- a/src/clm/clmd/clms_imm.cc +++ b/src/clm/clmd/clms_imm.cc @@ -516,21 +516,28 @@ SaAisErrorT clms_imm_activate(CLMS_CB *cb) { goto done; } + /* + * Some retries in case takeover with consensus + * when OI not released/synced yet + */ rc = immutil_saImmOiImplementerSet( cb->immOiHandle, const_cast(IMPLEMENTER_NAME)); - if (rc == SA_AIS_ERR_TIMEOUT || rc == SA_AIS_ERR_BAD_HANDLE) { + if (rc == SA_AIS_ERR_TIMEOUT || rc == SA_AIS_ERR_BAD_HANDLE + || rc == SA_AIS_ERR_EXIST) { LOG_WA("saImmOiImplementerSet returned %u", (unsigned)rc); usleep(sleep_delay_ms * 1000); msecs_waited += sleep_delay_ms; -saImmOiFinalize(cb->immOiHandle); -cb->immOiHandle = 0; -cb->imm_sel_obj = -1; -cb->is_impl_set = false; -if (clms_imm_init(clms_cb) != NCSCC_RC_SUCCESS) { - rc = SA_AIS_ERR_LIBRARY; - LOG_ER("clms_imm_init FAILED"); - goto done; +if (rc != SA_AIS_ERR_EXIST) { + saImmOiFinalize(cb->immOiHandle); + cb->immOiHandle = 0; + cb->imm_sel_obj = -1; + cb->is_impl_set = false; + if (clms_imm_init(clms_cb) != NCSCC_RC_SUCCESS) { +rc = SA_AIS_ERR_LIBRARY; +LOG_ER("clms_imm_init FAILED"); +goto done; + } } continue; } -- 2.7.4 -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel
[devel] [PATCH 0/1] Review Request for amf: retry when implementer set returned ERR_EXIST [#2921]
Summary: amf: retry when implementer set returned ERR_EXIST [#2921] Review request for Ticket(s): 2921 Peer Reviewer(s): Hans, Gary, Minh Pull request to: Gary, Minh Affected branch(es): develop Development branch: ticket-2921 Base revision: 1315ade5d2223ecb22cc3076da00d4cee09ec7f7 Personal repository: git://git.code.sf.net/u/thangng/review 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): - revision 56eedb3133013ca30f576dfa7fa28ba74169c16d Author: thang.nguyen Date: Fri, 31 Aug 2018 17:13:33 +0700 amf: retry when implementer set returned ERR_EXIST [#2921] In some condition, due to the AMF implementer released was not synced to the remain SC. So the ERR_EXIST returned when trying invoking implementer set on the remain SC. Add some retries on the ERR_EXIST. Complete diffstat: -- src/amf/amfd/role.cc | 27 --- src/clm/clmd/clms_imm.cc | 25 - 2 files changed, 40 insertions(+), 12 deletions(-) Testing Commands: - N/A. Testing, Expected Results: -- N/A. 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 ~/.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. -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel
[devel] [PATCH 0/1] Review Request for amf: remove assignment for NPI component with enable DisableRestart V2 [#2879]
Summary: amf: remove assignment for NPI component with enable DisableRestart [#2879] Review request for Ticket(s): 2879 Peer Reviewer(s): Hans, Gary, Minh Pull request to: Gary, Minh Affected branch(es): develop Development branch: ticket-2879 Base revision: 35d2f00b16066ae16307c5ed5a68171edc817dbf Personal repository: git://git.code.sf.net/u/thangng/review 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): - revision 04696975b6b995ceb6e53b2719cb11244dec2c31 Author: thang.nguyen Date: Wed, 8 Aug 2018 13:33:30 +0700 amf: remove assignment for NPI component with enable DisableRestart [#2879] With NPI component configured with saAmfCtDefDisableRestart=1. Once invoking restart admin op, amfnd does not remove the assignment and cause the crash. Remove assignment before change the pres state to TERMINATION in clc. Complete diffstat: -- src/amf/amfnd/clc.cc | 4 1 file changed, 4 insertions(+) Testing Commands: - Described on the ticket Testing, Expected Results: -- N/A. Conditions of Submission: - N/A. 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 ~/.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. -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel
[devel] [PATCH 1/1] amf: remove assignment for NPI component with enable DisableRestart [#2879]
With NPI component configured with saAmfCtDefDisableRestart=1. Once invoking restart admin op, amfnd does not remove the assignment and cause the crash. Remove assignment before change the pres state to TERMINATION in clc. --- src/amf/amfnd/clc.cc | 4 1 file changed, 4 insertions(+) diff --git a/src/amf/amfnd/clc.cc b/src/amf/amfnd/clc.cc index c8e60e6..126362b 100644 --- a/src/amf/amfnd/clc.cc +++ b/src/amf/amfnd/clc.cc @@ -2217,6 +2217,10 @@ uint32_t avnd_comp_clc_inst_restart_hdler(AVND_CB *cb, AVND_COMP *comp) { /* invoke terminate callback */ rc = avnd_comp_cbk_send(cb, comp, AVSV_AMF_COMP_TERM, 0, 0); else { + /* For NPI component with DisableRestart=1 */ + if (m_AVND_COMP_IS_RESTART_DIS(comp) && (comp->csi_list.n_nodes > 0)) { +su_send_suRestart_recovery_msg(comp->su); + } rc = avnd_comp_clc_cmd_execute(cb, comp, AVND_COMP_CLC_CMD_TYPE_TERMINATE); m_AVND_COMP_REG_PARAM_RESET(cb, comp); -- 2.7.4 -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel
[devel] [PATCH 1/1] amf: remove assignment for NPI component with enable DisableRestart [#2879]
With NPI component configured with saAmfCtDefDisableRestart=1. Once invoking restart admin op, amfnd does not remove the assignment and cause the crash. Remove assignment before change the pres state to TERMINATION in clc. --- src/amf/amfnd/clc.cc | 9 + 1 file changed, 9 insertions(+) diff --git a/src/amf/amfnd/clc.cc b/src/amf/amfnd/clc.cc index c8e60e6..df8356a 100644 --- a/src/amf/amfnd/clc.cc +++ b/src/amf/amfnd/clc.cc @@ -2217,6 +2217,15 @@ uint32_t avnd_comp_clc_inst_restart_hdler(AVND_CB *cb, AVND_COMP *comp) { /* invoke terminate callback */ rc = avnd_comp_cbk_send(cb, comp, AVSV_AMF_COMP_TERM, 0, 0); else { + if (m_AVND_COMP_IS_RESTART_DIS(comp) && (comp->csi_list.n_nodes > 0)) { +/* A NPI component with DisableRestart=1. Restart admin op on su or this +comp itself, first perform reassignment for this component to other SU +then term it. At present assignment of whole SU will be gracefully +reassigned instead of only this comp. +*/ +/*Send amfd to gracefully remove assignments for thus SU.*/ +su_send_suRestart_recovery_msg(comp->su); + } rc = avnd_comp_clc_cmd_execute(cb, comp, AVND_COMP_CLC_CMD_TYPE_TERMINATE); m_AVND_COMP_REG_PARAM_RESET(cb, comp); -- 2.7.4 -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel
[devel] [PATCH 0/1] Review Request for amf: remove assignment for NPI component with enable DisableRestart [#2879]
Summary: amf: remove assignment for NPI component with enable DisableRestart [#2879] Review request for Ticket(s): 2879 Peer Reviewer(s): Hans, Gary, Minh Pull request to: Hans, Gary, Minh Affected branch(es): develop Development branch: ticket-2879 Base revision: 8ef5d4862d94e8496df3f896463d034ae9f2b065 Personal repository: git://git.code.sf.net/u/thangng/review 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): - revision 67b4b7b2e9d5313631047b7e1692259a49a23dde Author: thang.nguyen Date: Thu, 28 Jun 2018 00:33:20 +0700 amf: remove assignment for NPI component with enable DisableRestart [#2879] With NPI component configured with saAmfCtDefDisableRestart=1. Once invoking restart admin op, amfnd does not remove the assignment and cause the crash. Remove assignment before change the pres state to TERMINATION in clc. Complete diffstat: -- src/amf/amfnd/clc.cc | 9 + 1 file changed, 9 insertions(+) Testing Commands: - Specify in the ticket. Testing, Expected Results: -- Specify in the ticket. 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 ~/.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. -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel
[devel] [PATCH 1/1] amf: correct changing attribute saAmfCtDefDisableRestart [#2876]
Currently changing attribute saAmfCtDefDisableRestart of SaAmfCompType object not affect to all components at runtime. Because the change does not broadcast to all nodes. Broadcast the change once it is updated. Similar fix for attribute saAmfCtDefInstantiationLevel. --- src/amf/amfd/comptype.cc | 198 ++- 1 file changed, 109 insertions(+), 89 deletions(-) diff --git a/src/amf/amfd/comptype.cc b/src/amf/amfd/comptype.cc index b6d4d6d..d0313ad 100644 --- a/src/amf/amfd/comptype.cc +++ b/src/amf/amfd/comptype.cc @@ -460,6 +460,7 @@ static void ccb_apply_modify_hdlr(const CcbUtilOperationData_t *opdata) { const SaImmAttrModificationT_2 *attr_mod; AVD_COMP_TYPE *comp_type; SaNameT comp_type_name; + SaBoolT ischanged; TRACE_ENTER2("CCB ID %llu, '%s'", opdata->ccbId, osaf_extended_name_borrow(>objectName)); @@ -488,97 +489,116 @@ static void ccb_apply_modify_hdlr(const CcbUtilOperationData_t *opdata) { comp = comp->comp_type_list_comp_next; } - std::set::iterator it; - for (it = node_set.begin(); it != node_set.end(); ++it) { -int i = 0; -while ((attr_mod = opdata->param.modify.attrMods[i++]) != nullptr) { - AVSV_PARAM_INFO param; - memset(, 0, sizeof(param)); - param.class_id = AVSV_SA_AMF_COMP_TYPE; - param.act = AVSV_OBJ_OPR_MOD; - param.name = opdata->objectName; - const SaImmAttrValuesT_2 *attribute = _mod->modAttr; - - if (!strcmp(attribute->attrName, "saAmfCtDefCallbackTimeout")) { -SaTimeT *param_val = (SaTimeT *)attribute->attrValues[0]; -TRACE( -"saAmfCtDefCallbackTimeout to '%llu' for compType '%s' on node '%s'", -*param_val, osaf_extended_name_borrow(>objectName), -(*it)->name.c_str()); -param.value_len = sizeof(*param_val); -memcpy(param.value, param_val, param.value_len); -param.attr_id = saAmfCtDefCallbackTimeout_ID; -avd_snd_op_req_msg(avd_cb, *it, ); - } else if (!strcmp(attribute->attrName, "saAmfCtDefClcCliTimeout")) { -SaTimeT *param_val = (SaTimeT *)attribute->attrValues[0]; -TRACE( -"saAmfCtDefClcCliTimeout to '%llu' for compType '%s' on node '%s'", -*param_val, osaf_extended_name_borrow(>objectName), -(*it)->name.c_str()); -param.value_len = sizeof(*param_val); -memcpy(param.value, param_val, param.value_len); -param.attr_id = saAmfCtDefClcCliTimeout_ID; -avd_snd_op_req_msg(avd_cb, *it, ); - } else if (!strcmp(attribute->attrName, - "saAmfCtDefQuiescingCompleteTimeout")) { -SaTimeT *param_val = (SaTimeT *)attribute->attrValues[0]; -TRACE( -"saAmfCtDefQuiescingCompleteTimeout to '%llu' for compType '%s' on node '%s'", -*param_val, osaf_extended_name_borrow(>objectName), -(*it)->name.c_str()); -param.value_len = sizeof(*param_val); -memcpy(param.value, param_val, param.value_len); -param.attr_id = saAmfCtDefQuiescingCompleteTimeout_ID; -avd_snd_op_req_msg(avd_cb, *it, ); - } else if (!strcmp(attribute->attrName, "saAmfCtDefInstantiationLevel")) { -SaUint32T param_val; -SaUint32T old_value = comp_type->saAmfCtDefInstantiationLevel; -if ((attr_mod->modType == SA_IMM_ATTR_VALUES_DELETE) || -(attribute->attrValues == nullptr)) { - param_val = 0; // Default value as per Section 8.13.1 (B0401) -} else { - param_val = *(SaUint32T *)attribute->attrValues[0]; -} -TRACE( -"saAmfCtDefInstantiationLevel to '%u' for compType '%s' on node '%s'", -param_val, osaf_extended_name_borrow(>objectName), -(*it)->name.c_str()); -param.value_len = sizeof(param_val); -memcpy(param.value, _val, param.value_len); -param.attr_id = saAmfCtDefInstantiationLevel_ID; + int i = 0; + while ((attr_mod = opdata->param.modify.attrMods[i++]) != nullptr) { +AVSV_PARAM_INFO param; +memset(, 0, sizeof(param)); +param.class_id = AVSV_SA_AMF_COMP_TYPE; +param.act = AVSV_OBJ_OPR_MOD; +param.name = opdata->objectName; +const SaImmAttrValuesT_2 *attribute = _mod->modAttr; +ischanged = SA_FALSE; + +if (!strcmp(attribute->attrName, "saAmfCtDefCallbackTimeout")) { + SaTimeT *param_val = (SaTimeT *)attribute->attrValues[0]; + SaTimeT old_value = comp_type->saAmfCtDefCallbackTimeout; + TRACE( + "saAmfCtDefCallbackTimeout to '%llu' for compType '%s'", + *param_val, osaf_extended_name_borrow(>objectName)); + param.value_len = sizeof(*param_val); + memcpy(param.value, param_val, param.value_len); + param.attr_id = saAmfCtDefCallbackTimeout_ID; + if (old_value != *param_val) { +comp_type->saAmfCtDefCallbackTimeout = *param_val; +ischanged = SA_TRUE; + } +} else if
[devel] [PATCH 0/1] Review Request for amf: correct changing attribute saAmfCtDefDisableRestart v3 [#2876]
Summary: amf: correct changing attribute saAmfCtDefDisableRestart [#2876] Review request for Ticket(s): 2876 Peer Reviewer(s): Gary, Minh Pull request to: Gary, Minh Affected branch(es): develop Development branch: ticket-2876 Base revision: 9df337b030ff51c05e5d9d95eca15efeb8641a0a Personal repository: git://git.code.sf.net/u/thangng/review 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): - revision 206579925f91abe9be5257ccef841e5b6c4cff0f Author: thang.nguyen Date: Thu, 21 Jun 2018 02:40:00 +0700 amf: correct changing attribute saAmfCtDefDisableRestart [#2876] Currently changing attribute saAmfCtDefDisableRestart of SaAmfCompType object not affect to all components at runtime. Because the change does not broadcast to all nodes. Broadcast the change once it is updated. Similar fix for attribute saAmfCtDefInstantiationLevel. Complete diffstat: -- src/amf/amfd/comptype.cc | 198 ++- 1 file changed, 109 insertions(+), 89 deletions(-) Testing Commands: - N/A. Testing, Expected Results: -- N/A. 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 ~/.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. -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel
[devel] [PATCH 0/1] Review Request for amf: correct changing attribute saAmfCtDefDisableRestart v2 [#2876]
Summary: amf: correct changing attribute saAmfCtDefDisableRestart [#2876] Review request for Ticket(s): 2876 Peer Reviewer(s): Gary, Minh Pull request to: Gary, Minh Affected branch(es): develop Development branch: ticket-2876 Base revision: 9df337b030ff51c05e5d9d95eca15efeb8641a0a Personal repository: git://git.code.sf.net/u/thangng/review 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): - revision 927cb1348b89133ee34704b9d60b7132a64bb5f7 Author: thang.nguyen Date: Wed, 20 Jun 2018 22:59:47 +0700 amf: correct changing attribute saAmfCtDefDisableRestart [#2876] Currently changing attribute saAmfCtDefDisableRestart of SaAmfCompType object not affect to all components at runtime. Because the change does not broadcast to all nodes. Broadcast the change once it is updated. Similar fix for attribute saAmfCtDefInstantiationLevel. Complete diffstat: -- src/amf/amfd/comptype.cc | 200 ++- 1 file changed, 110 insertions(+), 90 deletions(-) Testing Commands: - N/A. Testing, Expected Results: -- N/A. Conditions of Submission: - ACK from reviewer. 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 ~/.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. -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel
[devel] [PATCH 1/1] amf: correct changing attribute saAmfCtDefDisableRestart [#2876]
Currently changing attribute saAmfCtDefDisableRestart of SaAmfCompType object not affect to all components at runtime. Because the change does not broadcast to all nodes. Broadcast the change once it is updated. Similar fix for attribute saAmfCtDefInstantiationLevel. --- src/amf/amfd/comptype.cc | 200 ++- 1 file changed, 110 insertions(+), 90 deletions(-) diff --git a/src/amf/amfd/comptype.cc b/src/amf/amfd/comptype.cc index b6d4d6d..a77fdab 100644 --- a/src/amf/amfd/comptype.cc +++ b/src/amf/amfd/comptype.cc @@ -456,6 +456,15 @@ done1: return rc; } +static void broadcast_change_to_nodes( + std::set node_set, + AVSV_PARAM_INFO* param) { + std::set::iterator it; + for (it = node_set.begin(); it != node_set.end(); ++it) { +avd_snd_op_req_msg(avd_cb, *it, param); + } +} + static void ccb_apply_modify_hdlr(const CcbUtilOperationData_t *opdata) { const SaImmAttrModificationT_2 *attr_mod; AVD_COMP_TYPE *comp_type; @@ -488,98 +497,109 @@ static void ccb_apply_modify_hdlr(const CcbUtilOperationData_t *opdata) { comp = comp->comp_type_list_comp_next; } - std::set::iterator it; - for (it = node_set.begin(); it != node_set.end(); ++it) { -int i = 0; -while ((attr_mod = opdata->param.modify.attrMods[i++]) != nullptr) { - AVSV_PARAM_INFO param; - memset(, 0, sizeof(param)); - param.class_id = AVSV_SA_AMF_COMP_TYPE; - param.act = AVSV_OBJ_OPR_MOD; - param.name = opdata->objectName; - const SaImmAttrValuesT_2 *attribute = _mod->modAttr; - - if (!strcmp(attribute->attrName, "saAmfCtDefCallbackTimeout")) { -SaTimeT *param_val = (SaTimeT *)attribute->attrValues[0]; -TRACE( -"saAmfCtDefCallbackTimeout to '%llu' for compType '%s' on node '%s'", -*param_val, osaf_extended_name_borrow(>objectName), -(*it)->name.c_str()); -param.value_len = sizeof(*param_val); -memcpy(param.value, param_val, param.value_len); -param.attr_id = saAmfCtDefCallbackTimeout_ID; -avd_snd_op_req_msg(avd_cb, *it, ); - } else if (!strcmp(attribute->attrName, "saAmfCtDefClcCliTimeout")) { -SaTimeT *param_val = (SaTimeT *)attribute->attrValues[0]; -TRACE( -"saAmfCtDefClcCliTimeout to '%llu' for compType '%s' on node '%s'", -*param_val, osaf_extended_name_borrow(>objectName), -(*it)->name.c_str()); -param.value_len = sizeof(*param_val); -memcpy(param.value, param_val, param.value_len); -param.attr_id = saAmfCtDefClcCliTimeout_ID; -avd_snd_op_req_msg(avd_cb, *it, ); - } else if (!strcmp(attribute->attrName, - "saAmfCtDefQuiescingCompleteTimeout")) { -SaTimeT *param_val = (SaTimeT *)attribute->attrValues[0]; -TRACE( -"saAmfCtDefQuiescingCompleteTimeout to '%llu' for compType '%s' on node '%s'", -*param_val, osaf_extended_name_borrow(>objectName), -(*it)->name.c_str()); -param.value_len = sizeof(*param_val); -memcpy(param.value, param_val, param.value_len); -param.attr_id = saAmfCtDefQuiescingCompleteTimeout_ID; -avd_snd_op_req_msg(avd_cb, *it, ); - } else if (!strcmp(attribute->attrName, "saAmfCtDefInstantiationLevel")) { -SaUint32T param_val; -SaUint32T old_value = comp_type->saAmfCtDefInstantiationLevel; -if ((attr_mod->modType == SA_IMM_ATTR_VALUES_DELETE) || -(attribute->attrValues == nullptr)) { - param_val = 0; // Default value as per Section 8.13.1 (B0401) -} else { - param_val = *(SaUint32T *)attribute->attrValues[0]; -} -TRACE( -"saAmfCtDefInstantiationLevel to '%u' for compType '%s' on node '%s'", -param_val, osaf_extended_name_borrow(>objectName), -(*it)->name.c_str()); -param.value_len = sizeof(param_val); -memcpy(param.value, _val, param.value_len); -param.attr_id = saAmfCtDefInstantiationLevel_ID; + int i = 0; + while ((attr_mod = opdata->param.modify.attrMods[i++]) != nullptr) { +AVSV_PARAM_INFO param; +memset(, 0, sizeof(param)); +param.class_id = AVSV_SA_AMF_COMP_TYPE; +param.act = AVSV_OBJ_OPR_MOD; +param.name = opdata->objectName; +const SaImmAttrValuesT_2 *attribute = _mod->modAttr; + +if (!strcmp(attribute->attrName, "saAmfCtDefCallbackTimeout")) { + SaTimeT *param_val = (SaTimeT *)attribute->attrValues[0]; + SaTimeT old_value = comp_type->saAmfCtDefCallbackTimeout; + TRACE( + "saAmfCtDefCallbackTimeout to '%llu' for compType '%s'", + *param_val, osaf_extended_name_borrow(>objectName)); + param.value_len = sizeof(*param_val); + memcpy(param.value, param_val, param.value_len); + param.attr_id = saAmfCtDefCallbackTimeout_ID; + if (old_value !=