Ack code review only.
Thanks,
Praveen
On 24-Oct-16 10:27 AM, Minh Hon Chau wrote:
> osaf/services/saf/amf/amfd/role.cc | 20 ++++++++++----------
> 1 files changed, 10 insertions(+), 10 deletions(-)
>
>
> After headless, for some reasons the SU read from IMM does not gaurantee
> to be the same order as they were added via ccb. That will not maintain
> the mapping between node and su, which later would cause a crash of amfnd
>
> After headless, saAmfSUHostedByNode is read empty so map_su_to_node()
> does re-mapping which is a wrong one, and su_add_to_model() also updated
> this wrong mapping to IMM. The only right mapping exists in the sync
> information where amfd retrieves from avd_susi_recreate(). But this is
> also where the problem comes, because payload will reuse the order before
> headless and that possibly cause a node mapped to two different SU(s).
>
> Patch makes active/standby amfd becoming early implementer/applier so
> that saAmfSUHostedByNode is read non-empty, and there will not be a re-map
> due to blank saAmfSUHostedByNode inside function map_su_to_node().
>
> diff --git a/osaf/services/saf/amf/amfd/role.cc
> b/osaf/services/saf/amf/amfd/role.cc
> --- a/osaf/services/saf/amf/amfd/role.cc
> +++ b/osaf/services/saf/amf/amfd/role.cc
> @@ -260,6 +260,11 @@ uint32_t avd_active_role_initialization(
>
> TRACE_ENTER();
>
> + if (avd_imm_impl_set() != SA_AIS_OK) {
> + LOG_ER("avd_imm_impl_set FAILED");
> + goto done;
> + }
> +
> if (avd_imm_config_get() != NCSCC_RC_SUCCESS) {
> LOG_ER("avd_imm_config_get FAILED");
> goto done;
> @@ -267,11 +272,6 @@ uint32_t avd_active_role_initialization(
>
> cb->init_state = AVD_CFG_DONE;
>
> - if (avd_imm_impl_set() != SA_AIS_OK) {
> - LOG_ER("avd_imm_impl_set FAILED");
> - goto done;
> - }
> -
> avd_imm_update_runtime_attrs();
>
> status = NCSCC_RC_SUCCESS;
> @@ -294,6 +294,11 @@ uint32_t avd_standby_role_initialization
>
> TRACE_ENTER();
>
> + if (avd_imm_applier_set() != SA_AIS_OK) {
> + LOG_ER("avd_imm_applier_set FAILED");
> + goto done;
> + }
> +
> if (avd_imm_config_get() != NCSCC_RC_SUCCESS) {
> LOG_ER("avd_imm_config_get FAILED");
> goto done;
> @@ -301,11 +306,6 @@ uint32_t avd_standby_role_initialization
>
> cb->init_state = AVD_CFG_DONE;
>
> - if (avd_imm_applier_set() != SA_AIS_OK) {
> - LOG_ER("avd_imm_applier_set FAILED");
> - goto done;
> - }
> -
> status = NCSCC_RC_SUCCESS;
> done:
> TRACE_LEAVE();
>
------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
_______________________________________________
Opensaf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel