Hi Thang,

ACK from me.

Best Regards,
Thien

-----Original Message-----
From: Thang Duc Nguyen <thang.d.ngu...@dektech.com.au> 
Sent: Monday, August 9, 2021 7:22 AM
To: Minh Hon Chau <minh.c...@dektech.com.au>; Thien Minh Huynh 
<thien.m.hu...@dektech.com.au>
Cc: opensaf-devel@lists.sourceforge.net; Thang Duc Nguyen 
<thang.d.ngu...@dektech.com.au>
Subject: [PATCH 1/1] pyosaf: correct retry on failed operation [#3276]

Only retry on SA_AIS_ERR_FAILED_OPERATION if the the ccb was resoure aborted 
and not in error state.
---
 python/pyosaf/utils/__init__.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/python/pyosaf/utils/__init__.py b/python/pyosaf/utils/__init__.py 
index 82741b111..724a03ba2 100644
--- a/python/pyosaf/utils/__init__.py
+++ b/python/pyosaf/utils/__init__.py
@@ -78,7 +78,8 @@ def check_resource_abort(ccb_handle):
             list_err_strings = unmarshalNullArray(c_error_strings)
             for c_error_string in list_err_strings:
                 if c_error_string.startswith("IMM: Resource abort: "):
-                    return True
+                    if "CCB is in an error state" not in c_error_string:
+                        return True
 
     return False
 
@@ -117,7 +118,8 @@ def decorate(func):
                 sleep_time_interval = 3 * RETRY_INTERVAL
             elif rc == eSaAisErrorT.SA_AIS_ERR_FAILED_OPERATION:
                 # Retry on getting FAILED_OPERATION only applies to IMM
-                # CCB-related operations in case of a resource abort;
+                # CCB-related operations in case of a resource abort
+                # and CCB not in error state.
                 ccb_handle = args[0]
                 resource_abort = check_resource_abort(ccb_handle)
                 if not resource_abort:
--
2.25.1



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

Reply via email to