- **status**: review --> fixed
- **assigned_to**: Minh Hon Chau -->  nobody 



---

** [tickets:#1938] AMFD: Incorrect setting SU readiness state**

**Status:** fixed
**Milestone:** 5.0.1
**Created:** Mon Aug 08, 2016 08:01 AM UTC by Minh Hon Chau
**Last Updated:** Tue Aug 09, 2016 12:22 PM UTC
**Owner:** nobody


In SU repair scenario, the SU's readiness state is currently set to IN_SERVICE 
in avd_data_update_req_evh()

                        case saAmfSUOperState_ID:
                                TRACE("oper pres state");
                                if 
(n2d_msg->msg_info.n2d_data_req.param_info.value_len == sizeof(uint32_t)) {
                                        l_val = ntohl(*((uint32_t 
*)&n2d_msg->msg_info.n2d_data_req.param_info.value[0]));
                                        su->set_oper_state(l_val);
                                }

                                if (su->is_in_service() == true) {
                                        
su->set_readiness_state(SA_AMF_READINESS_IN_SERVICE);
                                }

And later on, avd_su_oper_state_evh() set SU's readiness state back to 
OUT_OF_SERVICE. 

                        if (avd_cb->scs_absence_max_duration > 0 &&
                                su->saAmfSUPresenceState == 
SA_AMF_PRESENCE_UNINSTANTIATED &&
                                su->saAmfSUPreInstantiable == false) {
                                // this is to allow non NPI SUs to be repaired 
if
                                // headless mode is enabled. Otherwise, the code
                                // following will assume the SU is already in 
service
                                // when it failed to instantiate while headless

                                if (cb->init_state == AVD_APP_STATE) {
                                        LOG_NO("Setting NPI SU '%s' to OOS 
after headless state", su->name.value);
                                        
su->set_readiness_state(SA_AMF_READINESS_OUT_OF_SERVICE);
                                }
                        }
            
This logic is redundant and SU's readiness state should not be set while 
updating SU' oper state to align with non-headless's logic consistency


---

Sent from sourceforge.net because [email protected] is 
subscribed to https://sourceforge.net/p/opensaf/tickets/

To unsubscribe from further messages, a project admin can change settings at 
https://sourceforge.net/p/opensaf/admin/tickets/options.  Or, if this is a 
mailing list, you can unsubscribe from the mailing list.
------------------------------------------------------------------------------
_______________________________________________
Opensaf-tickets mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-tickets

Reply via email to