Skip to content

Add /var and /root free space checks to weka_upgrade_checker#575

Open
manmeet-weka wants to merge 2 commits into
masterfrom
cst-manmeet-var-root-space-check
Open

Add /var and /root free space checks to weka_upgrade_checker#575
manmeet-weka wants to merge 2 commits into
masterfrom
cst-manmeet-var-root-space-check

Conversation

@manmeet-weka

Copy link
Copy Markdown

Summary

  • Adds pre-upgrade checks for free space on /var and /root partitions across all backend hosts
  • Warns if a partition is less than 20% free; passes if above the threshold
  • Reuses a new shared helper free_space_check_path() to avoid duplicating the log-space check logic

Test plan

  • Tested against LAB cluster — warnings correctly flagged on hosts with ~6-7% free on both /var and /root
  • Verify passes cleanly on a cluster with healthy disk space

🤖 Generated with Claude Code

Mirrors the existing logs partition check (warn if < 20% free). Motivated
by WEKAPP-627335 where /var at 100% on SMBW nodes caused drive build
failures and blocked upgrade.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@vrragosta

Copy link
Copy Markdown
Contributor

There are a couple of minimal changes that need to accompany every upgrade checker PR:

  • Bump the version string in version.txt

  • Bump the pg_version in weka_upgrade_checker.py, to match that of version.txt

  • Compile the weka_upgrade_checker.py on host 172.29.5.93 -- scp the weka_upgrade_checker.py file to root@172.29.5.93:, ssh into 172.29.5.93 and run the buildit.sh script. Transfer the compiled file, at root@172.29.5.93:~/dist/weka_upgrade_checker to your local branch

Please make these changes and I will continue with a review.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@manmeet-weka

Copy link
Copy Markdown
Author

Done — bumped version to 1.12.2 in both version.txt and pg_version, and updated the compiled binary from 172.29.5.93.

INFO("CHECKING /root DIRECTORY SPACE USAGE ON BACKENDS")
results = parallel_execution(
ssh_bk_hosts,
["df -m /root | awk 'NR==2 {print $3, $4}'"],

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you want to check the actual root, no? df -m /

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants