Dev: sbd: Give a warning and return True when need to skip check and fix#2113
Dev: sbd: Give a warning and return True when need to skip check and fix#2113liangxin1300 wants to merge 1 commit into
Conversation
1e7203c to
8a5f2c0
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
nicholasyang2022
left a comment
There was a problem hiding this comment.
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?
0c42e09 to
a6842c5
Compare
a6842c5 to
85348e1
Compare
|
It's enough to raise utils.TerminateSubCommand, no need to create a new class |
| 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) |
There was a problem hiding this comment.
This change is not related to the topic of this pull request.
| 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) |
There was a problem hiding this comment.
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.
No description provided.