Since there can be many more reasons why the SI is not assigned, I don't think 
you should log any of what you have proposed in this part of the code. SG, SU 
can be locked. Node can be locked etc.

In other places in the code we could log more when we actually know more things.

/Hans

> -----Original Message-----
> From: [email protected] [mailto:[email protected]]
> Sent: den 7 maj 2014 07:03
> To: Hans Feldt; [email protected]
> Cc: [email protected]
> Subject: [PATCH 1 of 1] amfd: syslog no assignment of SI when it is unlocked 
> [#867]
> 
>  osaf/services/saf/amf/amfd/si.cc |  5 +++++
>  1 files changed, 5 insertions(+), 0 deletions(-)
> 
> 
> Problem: A SI is unlocked and it is not assigned to any SU. User
> does not have any clue for unassignment.
> 
> Reason: Reasons for unassignment can be many.Since admin operation
> is invoked on the SI and a SI can be unassigned because its sponsors
> are unassigned or no CSI has been configured for it. AMF can provide
> this information as a clue.
> 
> Fix: adding a log notice for unassignment of SI.
> 
> diff --git a/osaf/services/saf/amf/amfd/si.cc 
> b/osaf/services/saf/amf/amfd/si.cc
> --- a/osaf/services/saf/amf/amfd/si.cc
> +++ b/osaf/services/saf/amf/amfd/si.cc
> @@ -853,6 +853,11 @@ static void si_admin_op_cb(SaImmOiHandle
>               avd_si_admin_state_set(si, SA_AMF_ADMIN_UNLOCKED);
> 
>               err = si->sg_of_si->si_func(avd_cb, si);
> +             if (si->list_of_sisu == NULL)
> +                     LOG_NO("'%s' is not assigned. Either sponsors are "
> +                                     "unassigned or no CSI configured in 
> it.",
> +                                     si->name.value);
> +
>               if (err != NCSCC_RC_SUCCESS) {
>                       report_admin_op_error(immOiHandle, invocation, 
> SA_AIS_ERR_BAD_OPERATION, NULL,
>                                       "SI unlock of %s failed", 
> objectName->value);

------------------------------------------------------------------------------
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
• 3 signs your SCM is hindering your productivity
• Requirements for releasing software faster
• Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce
_______________________________________________
Opensaf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to