osaf/services/saf/amf/amfd/sg.cc | 13 +++++++++++++ 1 files changed, 13 insertions(+), 0 deletions(-)
Problem: SG admin lock-in return immediately. Next admin unlock-in also succeed even if sus are not terminated yet. Analysis: If Amf could return try again to unlock-in admin op, then another admin operation could be avoided. Fix: Return try again for subsequent admin op because previous has not been completed yet. diff --git a/osaf/services/saf/amf/amfd/sg.cc b/osaf/services/saf/amf/amfd/sg.cc --- a/osaf/services/saf/amf/amfd/sg.cc +++ b/osaf/services/saf/amf/amfd/sg.cc @@ -1287,6 +1287,19 @@ static void sg_admin_op_cb(SaImmOiHandle goto done; } + /* If any su is in terminating state, that means lock-in op + has not completed. Allow su to move into permanent state + i.e. either in uninstanted or term failed state. */ + for (su = sg->list_of_su; su != NULL; su = su->sg_list_su_next) { + if (su->saAmfSUPresenceState == SA_AMF_PRESENCE_TERMINATING) { + report_admin_op_error(immOiHandle, invocation, + SA_AIS_ERR_TRY_AGAIN, NULL, + "su'%s' in terminating state", + su->name.value); + goto done; + } + } + avd_sg_admin_state_set(sg, SA_AMF_ADMIN_LOCKED); sg_app_sg_admin_unlock_inst(avd_cb, sg); ------------------------------------------------------------------------------ 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 Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel