Hi, This patch/ticket is a candidate for RC of 4.3.1 and 4.2.4. I have received ack from Nagendra till now. It appears that AndersBj and Ingvar are on vacation. Waiting for an ack from AndersW on behalf of them. Please note, this patch should be seen as a correction and improvement to the existing behavior of terminate callbacks of the OpenSAF Node Directors and as such does not introduce a new behavior. In the long run and an ideal behavior would be that these services implement a mechanism to graceful mechanism to Shutdown themselves. This shutdown mechanism could be could be like - cleaning up the system resources these components are using, synchronized cancel of their threads and child processes, etc.
The ticket #521 https://sourceforge.net/p/opensaf/tickets/521/ has been raised as a reference for this purpose. Thanks, Mathi. > -----Original Message----- > From: Mathivanan Naickan Palanivelu > Sent: Monday, July 22, 2013 5:33 PM > To: [email protected]; [email protected]; > Nagendra Kumar; Ramesh Babu Betham > Cc: [email protected] > Subject: [devel] [PATCH 1 of 1] cpnd, glnd, immnd, mqnd, smfnd: remove > sleep in NDs to support amf-adm comp restart [#501] > > osaf/services/saf/cpsv/cpnd/cpnd_amf.c | 5 +++-- > osaf/services/saf/glsv/glnd/glnd_amf.c | 6 +++--- > osaf/services/saf/immsv/immnd/immnd_amf.c | 12 +++++++++--- > osaf/services/saf/mqsv/mqnd/mqnd_amf.c | 5 ++--- > osaf/services/saf/smfsv/smfnd/smfnd_amf.c | 6 +++--- > 5 files changed, 20 insertions(+), 14 deletions(-) > > > diff --git a/osaf/services/saf/cpsv/cpnd/cpnd_amf.c > b/osaf/services/saf/cpsv/cpnd/cpnd_amf.c > --- a/osaf/services/saf/cpsv/cpnd/cpnd_amf.c > +++ b/osaf/services/saf/cpsv/cpnd/cpnd_amf.c > @@ -241,9 +241,10 @@ void cpnd_amf_comp_terminate_callback(Sa > } > saAmfResponse(cb->amf_hdl, invocation, saErr); > ncshm_give_hdl(gl_cpnd_cb_hdl); > - sleep(1); > LOG_NO("Received AMF component terminate callback, exiting"); > - exit(0); > + TRACE_LEAVE(); > + > + _Exit(EXIT_SUCCESS); > } > > > /********************************************************** > ****************** > diff --git a/osaf/services/saf/glsv/glnd/glnd_amf.c > b/osaf/services/saf/glsv/glnd/glnd_amf.c > --- a/osaf/services/saf/glsv/glnd/glnd_amf.c > +++ b/osaf/services/saf/glsv/glnd/glnd_amf.c > @@ -125,10 +125,10 @@ void glnd_amf_comp_terminate_callback(Sa > /* giveup the handle */ > m_GLND_GIVEUP_GLND_CB; > } > + LOG_NO("Received AMF component terminate callback, exiting"); > TRACE_LEAVE(); > - sleep(1); > - LOG_NO("Received AMF component terminate callback, exiting"); > - exit(0); > + > + _Exit(EXIT_SUCCESS); > } > > > /********************************************************** > ****************** > diff --git a/osaf/services/saf/immsv/immnd/immnd_amf.c > b/osaf/services/saf/immsv/immnd/immnd_amf.c > --- a/osaf/services/saf/immsv/immnd/immnd_amf.c > +++ b/osaf/services/saf/immsv/immnd/immnd_amf.c > @@ -73,10 +73,16 @@ static void immnd_amf_comp_terminate_cal { > TRACE_ENTER(); > saAmfResponse(immnd_cb->amf_hdl, invocation, SA_AIS_OK); > - sleep(1); > + > + if (immnd_cb->pbePid > 0) > + kill(immnd_cb->pbePid, SIGTERM); > + if (immnd_cb->syncPid > 0) > + kill(immnd_cb->syncPid, SIGTERM); > + > + LOG_NO("Received AMF component terminate callback, exiting"); > TRACE_LEAVE(); > - LOG_NO("Received AMF component terminate callback, exiting"); > - exit(0); > + > + _Exit(EXIT_SUCCESS); > } > > > /********************************************************** > ****************** > diff --git a/osaf/services/saf/mqsv/mqnd/mqnd_amf.c > b/osaf/services/saf/mqsv/mqnd/mqnd_amf.c > --- a/osaf/services/saf/mqsv/mqnd/mqnd_amf.c > +++ b/osaf/services/saf/mqsv/mqnd/mqnd_amf.c > @@ -241,11 +241,10 @@ static void mqnd_amf_comp_terminate_call > > /* giveup the handle */ > ncshm_give_hdl(cb_hdl); > + LOG_NO("Received AMF component terminate callback, exiting"); > TRACE_LEAVE(); > - LOG_NO("Received AMF component terminate callback, exiting"); > - sleep(1); > - exit(0); > > + _Exit(EXIT_SUCCESS); > } > > static void mqnd_amf_CSI_set_callback(SaInvocationT invocation, diff --git > a/osaf/services/saf/smfsv/smfnd/smfnd_amf.c > b/osaf/services/saf/smfsv/smfnd/smfnd_amf.c > --- a/osaf/services/saf/smfsv/smfnd/smfnd_amf.c > +++ b/osaf/services/saf/smfsv/smfnd/smfnd_amf.c > @@ -110,10 +110,10 @@ static void amf_comp_terminate_callback( > > saAmfResponse(smfnd_cb->amf_hdl, invocation, SA_AIS_OK); > > + LOG_NO("Received AMF component terminate callback, exiting"); > TRACE_LEAVE(); > - sleep(1); > - LOG_NO("Received AMF component terminate callback, exiting"); > - exit(0); > + > + _Exit(EXIT_SUCCESS); > } > > > /********************************************************** > ****************** > > ------------------------------------------------------------------------------ > See everything from the browser to the database with AppDynamics Get > end-to-end visibility with application monitoring from AppDynamics Isolate > bottlenecks and diagnose root cause in seconds. > Start your free trial of AppDynamics Pro today! > http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clk > trk > _______________________________________________ > Opensaf-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/opensaf-devel ------------------------------------------------------------------------------ See everything from the browser to the database with AppDynamics Get end-to-end visibility with application monitoring from AppDynamics Isolate bottlenecks and diagnose root cause in seconds. Start your free trial of AppDynamics Pro today! http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk _______________________________________________ Opensaf-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/opensaf-devel
