Skip to content

Dev: sbd: Give a warning and return True when need to skip check and fix#2113

Open
liangxin1300 wants to merge 1 commit into
ClusterLabs:masterfrom
liangxin1300:20260512_fix_sbd_skip
Open

Dev: sbd: Give a warning and return True when need to skip check and fix#2113
liangxin1300 wants to merge 1 commit into
ClusterLabs:masterfrom
liangxin1300:20260512_fix_sbd_skip

Conversation

@liangxin1300

@liangxin1300 liangxin1300 commented May 12, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

@liangxin1300
liangxin1300 force-pushed the 20260512_fix_sbd_skip branch from 1e7203c to 8a5f2c0 Compare May 12, 2026 13:26
@liangxin1300
liangxin1300 marked this pull request as ready for review May 12, 2026 13:27
@codecov

codecov Bot commented May 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.34%. Comparing base (e4dd350) to head (85348e1).
⚠️ Report is 45 commits behind head on master.

Additional details and impacted files
Flag Coverage Δ
integration 55.30% <0.00%> (-0.01%) ⬇️
unit 52.28% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
crmsh/bootstrap.py 87.70% <100.00%> (+<0.01%) ⬆️
crmsh/sbd.py 77.36% <100.00%> (+0.02%) ⬆️

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@nicholasyang2022 nicholasyang2022 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

It is good to return success without running the checks when SBD it not configured. But should we return success when SBD is configured and the checks are skipped?

@liangxin1300
liangxin1300 force-pushed the 20260512_fix_sbd_skip branch 3 times, most recently from 0c42e09 to a6842c5 Compare May 19, 2026 03:08
@liangxin1300
liangxin1300 force-pushed the 20260512_fix_sbd_skip branch from a6842c5 to 85348e1 Compare May 19, 2026 03:14
@liangxin1300 liangxin1300 changed the title Dev: sbd: Define FixSkipped exception to skip sbd check and fix Dev: sbd: Give a warning and return True when need to skip check and fix May 19, 2026
@liangxin1300

Copy link
Copy Markdown
Collaborator Author

It's enough to raise utils.TerminateSubCommand, no need to create a new class

Comment thread crmsh/bootstrap.py
Comment on lines +261 to +262
logger.warning("Can't configure stage sbd: sbd.service already running! Please use crm option '-F' if need to redeploy")
raise utils.TerminateSubCommand(success=True)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This change is not related to the topic of this pull request.

Comment thread crmsh/sbd.py
Comment on lines 669 to +673
if self.fix:
raise FixAborted("%s is not active, skip fixing SBD timeout issues" % constants.SBD_SERVICE)
raise FixAborted(f"{constants.SBD_SERVICE} is not active, skip fixing SBD timeout issues")
elif not SBDUtils.diskbased_sbd_configured() and not SBDUtils.diskless_sbd_configured():
raise FixAborted("Neither disk-based nor disk-less SBD is configured, skip checking SBD timeout issues")
logger.warning("Neither disk-based nor diskless SBD is configured, skip checking SBD timeout issues")
raise utils.TerminateSubCommand(success=True)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think we should check whether SBD is configured prior to checking flag self.fix. If it is not configured, there is nothing needing fix, and fix should return success.

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