Skip to content

Commit

Permalink
fix task name
Browse files Browse the repository at this point in the history
  • Loading branch information
wayyoungboy committed Jun 11, 2024
1 parent 1599662 commit 52589dd
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 12 deletions.
9 changes: 7 additions & 2 deletions common/scene.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,20 @@ def filter_by_version(scene, cluster, stdio=None):
stdio.verbose("version_int is {0} steps_versions is {1}".format(version_real, steps_versions))

steps_versions = steps_versions.replace(" ", "")
steps_versions = steps_versions[1:-1]
steps_versions_list = steps_versions.split(",")
steps_versions_data = steps_versions[1:-1]
steps_versions_list = steps_versions_data.split(",")
minVersion = steps_versions_list[0]
maxVersion = steps_versions_list[1]
# min
if minVersion == "*":
minVersion = "-1"
if maxVersion == "*":
maxVersion = "999"
stdio.verbose("minVersion is {0}, maxVersion is {1}".format(minVersion, maxVersion))
if steps_versions[0] == "[" and version_real == minVersion:
break
if steps_versions[-1] == "]" and version_real == maxVersion:
break
if StringUtils.compare_versions_greater(version_real, minVersion) and StringUtils.compare_versions_greater(maxVersion, version_real):
break
else:
Expand Down
3 changes: 1 addition & 2 deletions handler/checker/check_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ def handle(self):
package_name = None
if self.check_target_type == "obproxy" and Util.get_option(self.options, 'obproxy_cases'):
package_name = Util.get_option(self.options, 'obproxy_cases')

if self.check_target_type == "observer" and Util.get_option(self.options, 'cases'):
package_name = Util.get_option(self.options, 'cases')
if Util.get_option(self.options, 'store_dir'):
Expand Down Expand Up @@ -152,7 +151,7 @@ def handle(self):
end_tasks[package_task] = self.tasks[package_task]
for task_name, value in self.tasks.items():
if re.match(package_task, task_name):
end_tasks[package_task] = self.tasks[task_name]
end_tasks[task_name] = self.tasks[task_name]
self.tasks = end_tasks
else:
self.stdio.verbose("tasks_package is all")
Expand Down
1 change: 0 additions & 1 deletion handler/checker/check_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ def execute(self):
self.stdio.verbose("filter_by_version is return {0}".format(steps_nu))
if len(self.nodes) == 0:
raise Exception("node is not exist")
# TODO: 这里的逻辑需要优化,如果一个节点执行失败了,那么后续的步骤就不会被执行了。
work_threads = []
for node in self.nodes:
t = threading.Thread(target=self.execute_one_node, args=(steps_nu, node))
Expand Down
7 changes: 0 additions & 7 deletions handler/checker/tasks/observer/system/dependent_software.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
info: 'To detect dependent software, refer to: https://www.oceanbase.com/docs/enterprise-oceanbase-ocp-cn-1000000000125643'
task:
- steps:
- type: ssh
ssh: 'swapon --summary | grep -q "^" && echo "used" || echo "not used"'
result:
set_value: swapon_switch
report_type: warning
verify: '[ "not used" == "${swapon_switch}" ]'
err_msg: 'swapon need be closed. Now , it is #{swapon_switch}.'
- type: ssh
ssh: "getenforce"
result:
Expand Down

0 comments on commit 52589dd

Please sign in to comment.