Hi Thang,
I found an old commit that may lead to your ticket.
Can you check if your changes bring old issue back?
----------
amfd: allow lock on su after issue of shutdown [#582]
Shutdown operation was rejected because shitdown operation was going on. Amf
should respect lock
operation as per Specs. Now, if lock is issued on su when shutdown is going
on, then Amf will send response for shutdown first and then start lock
operation. Once lock operation is completed, then Amf will respond to imm
for lock operation.
/* Avoid multiple admin operations on other SUs belonging to the same
SG. */
for (su_ptr = su->sg_of_su->list_of_su; su_ptr != NULL; su_ptr =
su_ptr->sg_list_su_next) {
- if (su_ptr->pend_cbk.invocation != 0) {
+ /* su's sg_fsm_state is checked below, just check other su. */
+ if ((su != su_ptr) && (su_ptr->pend_cbk.invocation != 0)) {
----------
Another concern that why you move your checking to before
check "Admin operation on Active middleware SU is not allowed"?
Why not keep it after this check?
Best Regards,
ThuanTr
-----Original Message-----
From: thang.d.nguyen <[email protected]>
Sent: Wednesday, December 25, 2019 9:37 AM
To: [email protected]; [email protected]
Cc: [email protected]
Subject: [devel] [PATCH 1/1] amfd: one adm op activa on SU at a time [#3132]
Not allow admin op on SU if other is activating.
---
src/amf/amfd/su.cc | 26 +++++++++++++++++---------
1 file changed, 17 insertions(+), 9 deletions(-)
diff --git a/src/amf/amfd/su.cc b/src/amf/amfd/su.cc
index e1da8f726..6223cd9e4 100644
--- a/src/amf/amfd/su.cc
+++ b/src/amf/amfd/su.cc
@@ -1337,6 +1337,23 @@ static void su_admin_op_cb(SaImmOiHandleT immoi_handle,
goto done;
}
+ node = su->get_node_ptr();
+ if (node->admin_node_pend_cbk.admin_oper != 0) {
+ report_admin_op_error(
+ immoi_handle, invocation, SA_AIS_ERR_TRY_AGAIN, nullptr,
+ "Node'%s' hosting SU'%s', undergoing admin operation'%u'",
+ node->name.c_str(), su->name.c_str(),
+ node->admin_node_pend_cbk.admin_oper);
+ goto done;
+ }
+ if (su->pend_cbk.invocation != 0) {
+ report_admin_op_error(
+ immoi_handle, invocation, SA_AIS_ERR_TRY_AGAIN, nullptr,
+ "SU'%s', undergoing admin operation'%u'",
+ su->name.c_str(), su->pend_cbk.admin_oper);
+ goto done;
+ }
+
if ((su->sg_of_su->sg_ncs_spec == true) &&
(cb->node_id_avd == su->su_on_node->node_info.nodeId)) {
report_admin_op_error(
@@ -1469,15 +1486,6 @@ static void su_admin_op_cb(SaImmOiHandleT immoi_handle,
goto done;
}
}
- node = su->get_node_ptr();
- if (node->admin_node_pend_cbk.admin_oper != 0) {
- report_admin_op_error(
- immoi_handle, invocation, SA_AIS_ERR_TRY_AGAIN, nullptr,
- "Node'%s' hosting SU'%s', undergoing admin operation'%u'",
- node->name.c_str(), su->name.c_str(),
- node->admin_node_pend_cbk.admin_oper);
- goto done;
- }
/* Validation has passed and admin operation should be done. Proceed with
* it... */
--
2.17.1
_______________________________________________
Opensaf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel
_______________________________________________
Opensaf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel