I think we should create new utility functions. Function 1:
void immAdminOperationResult(SaInvocationT invocation,
SaAisErrorT result,
const char *format, ...);
the purpose of this one is to be used upfront at admin op validation. For
example:
immAdminOperationResult(inv, SA_AIS_ERR_NOT_SUPPORTED,
"Unsupported admin op for SU: %llu", op_id);
function 2:
void immAdminOperationResult2(AVD_ADMIN_OPER_CBK *info,
SaAisErrorT result,
const char *format, ...);
the purpose of this one is to be used to report the result and to get rid of
this pattern repeatedly found in the code:
avd_saImmOiAdminOperationResult(cb->immOiHandle,
su->su_on_node->admin_node_pend_cbk.invocation,
SA_AIS_ERR_REPAIR_PENDING);
su->su_on_node->admin_node_pend_cbk.invocation
= 0;
su->su_on_node->admin_node_pend_cbk.admin_oper
= static_cast<SaAmfAdminOperationIdT>(0);
su->su_on_node->su_cnt_admin_oper = 0;
for example:
immAdminOperationResult2(&su->su_on_node->admin_node_pend_cbk,
SA_AIS_ERR_REPAIR_PENDING, "SI assignment failed for '%u'", su->name.value);
I also think that admin ops should be responded to via the "job queue" so that
the main thread is not blocked in TRYAGAIN loops. This means that these new
functions should just create "jobs" and package data into it.
---
** [tickets:#85] AMF: admin ops should return error strings**
**Status:** accepted
**Created:** Mon May 13, 2013 04:44 AM UTC by Nagendra Kumar
**Last Updated:** Thu Sep 26, 2013 08:22 AM UTC
**Owner:** Nagendra Kumar
Migrated from http://devel.opensaf.org/ticket/2471
>From 4.2 IMM admin ops supports error strings in the admin op response. AMF
>should use that API and perhaps the syslogging of the same should be removed.
---
Sent from sourceforge.net because opensaf-tickets@lists.sourceforge.net is
subscribed to https://sourceforge.net/p/opensaf/tickets/
To unsubscribe from further messages, a project admin can change settings at
https://sourceforge.net/p/opensaf/admin/tickets/options. Or, if this is a
mailing list, you can unsubscribe from the mailing list.
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
_______________________________________________
Opensaf-tickets mailing list
Opensaf-tickets@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-tickets