+
Skip to content

fix: bg_task check, indentation and check #423

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 15 additions & 14 deletions weka_upgrade_checker/weka_upgrade_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -1729,20 +1729,21 @@ def validate_core_ids(containers):
printlist(override_list, 5)

if V(weka_version) >= V("4.0"):
INFO("CHECKING FOR WEKA CLUSTER TASKS")
bg_task = []
cluster_tasks = json.loads(
subprocess.check_output(["weka", "cluster", "tasks", "-J"])
)
INFO("CHECKING FOR WEKA CLUSTER TASKS")
bg_task = []
cluster_tasks = json.loads(
subprocess.check_output(["weka", "cluster", "tasks", "-J"])
)

for task in cluster_tasks:
if task["type"] != "FSCK":
WARN("There are active cluster tasks that should be considered before running the upgrade.")
bg_task += [task["type"], task["description"]]
printlist(bg_task, 2)
break
else:
GOOD("No unexpected Weka cluster tasks running")
for task in cluster_tasks:
if task["type"] != "FSCK":
WARN("There are active cluster tasks that should be considered before running the upgrade.")
bg_task += [task["type"], task["description"]]
printlist(bg_task, 2)
break

if len(bg_task) == 0:
GOOD("No unexpected Weka cluster tasks running")

INFO("CHECKING FOR WEKA BLACKLISTED NODES")
blacklist = []
Expand Down Expand Up @@ -3606,7 +3607,7 @@ def backend_host_checks(
INFO("VALIDATING CPU INSTRUCTION SET")
results = parallel_execution(
ssh_bk_hosts,
['grep "\<avx2\>" /proc/cpuinfo'],
r['grep "\<avx2\>" /proc/cpuinfo'],
use_check_output=True,
ssh_identity=ssh_identity,
)
Expand Down
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载