Ack , code review only. Thanks, Praveen
On 27-Apr-15 2:49 PM, [email protected] wrote: > osaf/services/saf/amf/amfd/chkop.cc | 4 ++++ > osaf/services/saf/amf/amfd/main.cc | 6 +++++- > 2 files changed, 9 insertions(+), 1 deletions(-) > > > Act Amfd initialization is said to be completed when > it completes its initialization with imm. > Apart from initializing with imm, Standby Amfd > also need to get run time data from Act Amfd using cold sync. > So, Standby Amfd initialization is said to be completed when > it completes its initialization with imm and it completes its > cold sync with Act Amfd. > In the present code, Standby is sending response to nid without > cold sync complete. > So, code has been added to send nid response only when Amfd > completes its initialization. > > diff --git a/osaf/services/saf/amf/amfd/chkop.cc > b/osaf/services/saf/amf/amfd/chkop.cc > --- a/osaf/services/saf/amf/amfd/chkop.cc > +++ b/osaf/services/saf/amf/amfd/chkop.cc > @@ -40,6 +40,7 @@ > > #include "logtrace.h" > #include "amfd.h" > +#include <nid_api.h> > > static uint32_t avsv_mbcsv_cb(NCS_MBCSV_CB_ARG *arg); > static uint32_t avsv_mbcsv_process_enc_cb(AVD_CL_CB *cb, NCS_MBCSV_CB_ARG > *arg); > @@ -444,6 +445,9 @@ ignore_msg: > ** when in a more critical state */ > saflog(LOG_NOTICE, amfSvcUsrName, "Cold sync > complete at %x", cb->node_id_avd); > cb->stby_sync_state = AVD_STBY_IN_SYNC; > + /* It is important for Standby Amfd to inform > nid after it is > + ready for Act controller failover and accept > Act role. */ > + (void) nid_notify(const_cast<char*>("AMFD"), > NCSCC_RC_SUCCESS, NULL); > } > > cb->synced_reo_type = arg->info.decode.i_reo_type; > diff --git a/osaf/services/saf/amf/amfd/main.cc > b/osaf/services/saf/amf/amfd/main.cc > --- a/osaf/services/saf/amf/amfd/main.cc > +++ b/osaf/services/saf/amf/amfd/main.cc > @@ -831,7 +831,11 @@ int main(int argc, char *argv[]) > exit(EXIT_FAILURE); > } > > - (void) nid_notify(const_cast<char*>("AMFD"), NCSCC_RC_SUCCESS, NULL); > + /* Act Amfd need to inform nid after it has initialized itself, while > + Stanby Amfd need to inform nid after it has done cold sync. */ > + if (avd_cb->avail_state_avd == SA_AMF_HA_ACTIVE) { > + (void) nid_notify(const_cast<char*>("AMFD"), NCSCC_RC_SUCCESS, > NULL); > + } > > main_loop(); > > ------------------------------------------------------------------------------ One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y _______________________________________________ Opensaf-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/opensaf-devel
