Hi Nagu,
Not sure, but if these errors are not OpenSAF errors, i.e. not depending on 
application configuration, use  etc. 
should they really be logged as errors? After running various OpenSAF tests 
there should be no errors in the syslog 
and there may be test case that will fail now, even though there are no OpenSAF 
errors?
/Regards HansN

-----Original Message-----
From: Nagendra Kumar [mailto:nagendr...@oracle.com] 
Sent: den 1 december 2016 06:37
To: Hans Nordebäck <hans.nordeb...@ericsson.com>; Praveen Malviya 
<praveen.malv...@oracle.com>; Minh Hon Chau <minh.c...@dektech.com.au>; Gary 
Lee <gary....@dektech.com.au>
Cc: opensaf-devel@lists.sourceforge.net
Subject: RE: [PATCH 1 of 1] amfnd: add logs for HC start failures [#340]

Hi Hans,
                I find it more appropriate here as we are returning Error codes 
so log the information as Error :)

Thanks
-Nagu
> -----Original Message-----
> From: Hans Nordeback [mailto:hans.nordeb...@ericsson.com]
> Sent: 29 November 2016 14:20
> To: Nagendra Kumar; Praveen Malviya; minh.c...@dektech.com.au; 
> gary....@dektech.com.au
> Cc: opensaf-devel@lists.sourceforge.net
> Subject: Re: [PATCH 1 of 1] amfnd: add logs for HC start failures 
> [#340]
> 
> Hi Nagu,
> 
> a question, why use LOG_ER and not LOG_WA below? /Thanks HansN
> 
> 
> On 11/04/2016 09:32 AM, nagendr...@oracle.com wrote:
> >   osaf/services/saf/amf/amfnd/chc.cc |  7 +++++++
> >   1 files changed, 7 insertions(+), 0 deletions(-)
> >
> >
> > diff --git a/osaf/services/saf/amf/amfnd/chc.cc
> b/osaf/services/saf/amf/amfnd/chc.cc
> > --- a/osaf/services/saf/amf/amfnd/chc.cc
> > +++ b/osaf/services/saf/amf/amfnd/chc.cc
> > @@ -315,6 +315,7 @@ void avnd_comp_hc_param_val(AVND_CB *cb,
> >
> >                     /* get the comp */
> >                     if ((*o_comp = avnd_compdb_rec_get(cb->compdb,
> Amf::to_string(&hc_start->comp_name))) == nullptr) {
> > +                           LOG_ER("Component '%s' doesn't exist in
> DB", osaf_extended_name_borrow(&hc_start->comp_name));
> >                             *o_amf_rc = SA_AIS_ERR_NOT_EXIST;
> >                             return;
> >                     }
> > @@ -324,6 +325,8 @@ void avnd_comp_hc_param_val(AVND_CB *cb,
> >
> m_AVND_COMP_PRES_STATE_IS_INSTANTIATIONFAILED(*o_comp) ||
> >
> m_AVND_COMP_PRES_STATE_IS_TERMINATING(*o_comp) ||
> >
> m_AVND_COMP_PRES_STATE_IS_TERMINATIONFAILED(*o_comp)) {
> > +                           LOG_ER("Component '%s' is not healthy (pres
> state '%u')", osaf_extended_name_borrow(&hc_start->comp_name),
> > +                                           (*o_comp)->pres);
> >                             *o_amf_rc = SA_AIS_ERR_TRY_AGAIN;
> >                             return;
> >                     }
> > @@ -347,6 +350,8 @@ void avnd_comp_hc_param_val(AVND_CB *cb,
> >                     if (0 == avnd_hcdb_rec_get(cb, &hlt_chk)) {
> >                             /* HC instance did not exist, look for HC type
> */
> >                             if (nullptr == avnd_hctypedb_rec_get(cb,
> (*o_comp)->saAmfCompType, &hc_start->hc_key)) {
> > +                                   LOG_ER("Health check is not
> configured for component '%s'",
> > +
>       osaf_extended_name_borrow(&hc_start->comp_name));
> >                                     *o_amf_rc =
> SA_AIS_ERR_NOT_EXIST;
> >                                     return;
> >                             }
> > @@ -356,6 +361,8 @@ void avnd_comp_hc_param_val(AVND_CB *cb,
> >                     tmp_hc_rec.req_hdl = hc_start->hdl;
> >                     /* determine if this healthcheck is already active */
> >                     if (0 != m_AVND_COMPDB_REC_HC_GET(**o_comp,
> tmp_hc_rec)) {
> > +                           LOG_ER("Health check is already active for
> component '%s'",
> > +
>       osaf_extended_name_borrow(&hc_start->comp_name));
> >                             *o_amf_rc = SA_AIS_ERR_EXIST;
> >                             return;
> >                     }
> 

------------------------------------------------------------------------------
_______________________________________________
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to