diff --git a/plugins/check/tasks/obproxy/version/old_version.yaml b/plugins/check/tasks/obproxy/version/old_version.yaml new file mode 100644 index 00000000..31864823 --- /dev/null +++ b/plugins/check/tasks/obproxy/version/old_version.yaml @@ -0,0 +1,9 @@ +info: 'Check obproxy version . Some versions of obproxy are not recommended' +task: + - steps: + - type: ssh + ssh: "export LD_LIBRARY_PATH=#{remote_home_path}/lib && #{remote_home_path}/bin/obproxy --version 2>&1 | grep \"obproxy (\" | awk '{print $3}'" + result: + set_value: obproxy_version + verify: '[[ ! "${obproxy_version}" == "4.0"* ]] && [[ ! "${obproxy_version}" == "4.1"* ]] && [[ ! "${obproxy_version}" == "4.2"* ]] && [[ ! "${obproxy_version}" == "4.3.0"* ]] && [[ ! "${obproxy_version}" == "3"* ]] && [[ ! "${obproxy_version}" == "4.3.1"* ]]' + err_msg: '#{obproxy_version} is not recommended, please upgrade to the bproxy' \ No newline at end of file diff --git a/plugins/check/tasks/observer/version/old_version.yaml b/plugins/check/tasks/observer/version/old_version.yaml index bcbc9b59..72135a38 100644 --- a/plugins/check/tasks/observer/version/old_version.yaml +++ b/plugins/check/tasks/observer/version/old_version.yaml @@ -7,6 +7,20 @@ task: set_value: observer_version verify: '[[ ! "#{observer_version}" == *"3.1."* ]] || [[ ! "#{observer_version}" == *"CE"* ]]' err_msg: 'Starting from June 30, 2024, OceanBase Database Community Edition V3.1.x will no longer receive any bug fixes or version updates.Please upgrade as soon as possible' + - type: ssh + ssh: "echo \"#{observer_version}\" | grep -oP '(?<=\()[^ ]+ \K[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+'" + result: + set_value: observer_version + verify: '[[ ! "${observer_version}" == "4.0"* ]] && [[ ! "${observer_version}" == "4.1"* ]] && [[ ! "${observer_version}" == "4.2.2"* ]] && [[ ! "${observer_version}" == "4.3.0"* ]] && [[ ! "${observer_version}" == "4.3.1"* ]]' + err_msg: '#{observer_version} is not recommended, please upgrade to the obcluster' + - type: ssh + ssh: "echo \"#{observer_version}\" | awk -F. '{print $NF}'" + result: + set_value: observer_version_end_str + verify: '[[ "$observer_version" == "4.2.1"* && "$observer_version_end_str" -ge 5 ]] || [[ ! "$observer_version" == "4.2.1"* ]]' + err_msg: '#{observer_version} is not recommended, please upgrade to the obcluster' + + diff --git a/plugins/rca/major_hold.py b/plugins/rca/major_hold.py index 5f60fa45..fd4b85a2 100644 --- a/plugins/rca/major_hold.py +++ b/plugins/rca/major_hold.py @@ -62,7 +62,7 @@ def execute(self): CDB_OB_MAJOR_COMPACTION_err_tenant_ids.append(str(data.get('TENANT_ID'))) self.record.add_record("CDB_OB_MAJOR_COMPACTION have IS_ERROR='YES',the tenant_ids are {0}".format(err_tenant_ids)) err_tenant_ids.extend(CDB_OB_MAJOR_COMPACTION_err_tenant_ids) - + self.record.add_record("check on CDB_OB_MAJOR_COMPACTION IS_ERROR is 'YES'.\n sql:{0}".format(sql), result=err_tenant_ids) except Exception as e: self.stdio.warn("MajorHoldScene execute CDB_OB_MAJOR_COMPACTION panic: {0}".format(e)) raise RCAExecuteException("MajorHoldScene execute CDB_OB_MAJOR_COMPACTION panic: {0}".format(e)) @@ -206,9 +206,9 @@ def execute(self): # all node execute for observer_node in self.observer_nodes: ssh_client = observer_node["ssher"] - ssh_client.exec_cmd("dmesg -T > /tmp/dmesg_{0}.log".format(observer_node.get_name())) - ssh_client.download("/tmp/dmesg_{0}.log".format(observer_node.get_name()), self.local_path + "/dmesg_log") - tenant_record.add_record("download /tmp/dmesg_{0}.log to {1}".format(observer_node.get_name(), self.local_path + "/dmesg_log")) + ssh_client.exec_cmd("dmesg -T > /tmp/dmesg_{0}.log".format(ssh_client.get_name())) + ssh_client.download("/tmp/dmesg_{0}.log".format(ssh_client.get_name()), self.local_path + "/dmesg_log") + tenant_record.add_record("download /tmp/dmesg_{0}.log to {1}".format(ssh_client.get_name(), self.local_path + "/dmesg_log")) except Exception as e: self.stdio.warn("MajorHoldScene execute 6 get dmesg exception: {0}".format(e)) tenant_record.add_suggest("send the {0} to the oceanbase community".format(self.local_path))