Hi Thuan,
See my comment inline.

-----Original Message-----
From: Tran Thuan <thuan.t...@dektech.com.au> 
Sent: Tuesday, December 31, 2019 3:04 PM
To: 'Thang' <thang.d.ngu...@dektech.com.au>; gary....@dektech.com.au;
minh.c...@dektech.com.au
Cc: opensaf-devel@lists.sourceforge.net
Subject: RE: [PATCH 1/1] amfd: not allow unlock if su is under restarting
[#3132]

Hi Thang,

Is there any how admin op should be rejected NOT_SUPPORT but it reject
TRY_AGAIN with your patch?
[Thang]: NOT_SUPPORT is not suitable here. NOT_SUPPORT means only single
admin op not support.
I have just detect other similar issue and need updating the patch. 

That's why I think it should place after that IF block. If you assure that
won't happen then no more comment from me.

Best Regards,
ThuanTr

-----Original Message-----
From: Thang <thang.d.ngu...@dektech.com.au>
Sent: Tuesday, December 31, 2019 8:36 AM
To: 'Tran Thuan' <thuan.t...@dektech.com.au>; gary....@dektech.com.au;
minh.c...@dektech.com.au
Cc: opensaf-devel@lists.sourceforge.net
Subject: RE: [PATCH 1/1] amfd: not allow unlock if su is under restarting
[#3132]

Hi Thuan,

I think there is no issue.

B.R/Thang

-----Original Message-----
From: Tran Thuan <thuan.t...@dektech.com.au>
Sent: Monday, December 30, 2019 4:24 PM
To: 'thang.d.nguyen' <thang.d.ngu...@dektech.com.au>;
gary....@dektech.com.au; minh.c...@dektech.com.au
Cc: opensaf-devel@lists.sourceforge.net
Subject: RE: [PATCH 1/1] amfd: not allow unlock if su is under restarting
[#3132]

Hi Thang,

One comment inline.

Best Regards,
ThuanTr

-----Original Message-----
From: thang.d.nguyen <thang.d.ngu...@dektech.com.au>
Sent: Monday, December 30, 2019 2:12 PM
To: gary....@dektech.com.au; minh.c...@dektech.com.au;
thuan.t...@dektech.com.au
Cc: opensaf-devel@lists.sourceforge.net; thang.d.nguyen
<thang.d.ngu...@dektech.com.au>
Subject: [PATCH 1/1] amfd: not allow unlock if su is under restarting
[#3132]

Not allow unlock if su is under restarting.
---
 src/amf/amfd/su.cc | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/src/amf/amfd/su.cc b/src/amf/amfd/su.cc index
e1da8f726..82e2b457f 100644
--- a/src/amf/amfd/su.cc
+++ b/src/amf/amfd/su.cc
@@ -1337,6 +1337,15 @@ static void su_admin_op_cb(SaImmOiHandleT
immoi_handle,
     goto done;
   }
 
+  if ((su->pend_cbk.admin_oper == SA_AMF_ADMIN_RESTART) &&
+      (op_id == SA_AMF_ADMIN_UNLOCK)) {
+    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;
+  }
+
[Thuan] I think should move new check to after below IF

   if ((su->sg_of_su->sg_ncs_spec == true) &&
       (cb->node_id_avd == su->su_on_node->node_info.nodeId)) {
     report_admin_op_error(
--
2.17.1







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

Reply via email to