Yes, we can consider syslog messages with severity error (and critical) 
in the same way as core dumps - they indicate a bug /in the program that 
dumped core or produced the syslog message/. If I find a core dump of an 
OpenSAF service, I can write a defect ticket on that service. In the 
same way, if I find an ER syslog message, I can write a defect ticket on 
the service that logged the message. If the cause of the error is within 
an application which is using OpenSAF, then OpenSAF should not dump core 
or log to syslog with ER severity. Instead, OpenSAF should send an error 
code to the application and it is the responsibility of the application 
to log an error message to syslog.

regards,

Anders Widell


On 12/01/2016 07:50 AM, Hans Nordebäck wrote:
> HI Nagu,
>
> One strategy is in case if an error code is returned to the application, it 
> is the application to select (or not) to log this as an error/notify etc.
>
> /Thanks HansN
>
> -----Original Message-----
> From: Nagendra Kumar [mailto:nagendr...@oracle.com]
> Sent: den 1 december 2016 07:38
> 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 had proposed this long time back in the ticket:
>
> " Nagendra Kumar - 2015-08-07
>
> As part of ticket cleanup, evaluated and decided to keep it as enhancement.
> The logging should not be heavy and should only stick to state to the level 
> of providing hints to the user. Perhaps, the log should fall under Error 
> category."
>
>>> 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?
> If there are error situation like the log added, Errors should come into 
> syslog. All negative test cases should result into Error, shouldn't they ?
>
> Thanks
> -Nagu
>
>> -----Original Message-----
>> From: Hans Nordebäck [mailto:hans.nordeb...@ericsson.com]
>> Sent: 01 December 2016 11:40
>> To: Nagendra Kumar; Praveen Malviya; Minh Hon Chau; Gary Lee
>> Cc: opensaf-devel@lists.sourceforge.net
>> Subject: RE: [PATCH 1 of 1] amfnd: add logs for HC start failures
>> [#340]
>>
>> 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
>



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

Reply via email to