From ff321fc55d9ba46199f74729cf9075307bbf4658 Mon Sep 17 00:00:00 2001 From: totaj Date: Thu, 4 May 2023 15:31:32 +0800 Subject: [PATCH] Fix gs_om failed when upper case attribute is on. --- script/gspylib/common/DbClusterInfo.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/script/gspylib/common/DbClusterInfo.py b/script/gspylib/common/DbClusterInfo.py index 5959f20..31e89c7 100644 --- a/script/gspylib/common/DbClusterInfo.py +++ b/script/gspylib/common/DbClusterInfo.py @@ -1357,14 +1357,14 @@ class dbClusterInfo(): roleStatus = "Unknown" dbState = "Unknown" else: - res = re.findall(r'local_role\s*:\s*(\w+)', output) + res = re.findall(r'local_role\s*:\s*(\w+)', output, re.IGNORECASE) roleStatus = res[0] - res = re.findall(r'db_state\s*:\s*(\w+)', output) + res = re.findall(r'db_state\s*:\s*(\w+)', output, re.IGNORECASE) dbState = res[0] if (dbState == "Need"): detailInformation = re.findall( - r'detail_information\s*:\s*(\w+)', output) + r'detail_information\s*:\s*(\w+)', output, re.IGNORECASE) dbState = "Need repair(%s)" % detailInformation[0] roleStatusArray.append(roleStatus) dbStateArray.append(dbState) -- Gitee