diff --git a/crmsh/bootstrap.py b/crmsh/bootstrap.py index ec0022f3d..674325672 100644 --- a/crmsh/bootstrap.py +++ b/crmsh/bootstrap.py @@ -210,6 +210,9 @@ def _validate_sbd_option(self): """ Validate sbd options """ + no_sbd_option = not self.sbd_devices and not self.diskless_sbd + if self.watchdog and no_sbd_option: + utils.fatal("-w option should be used with -s or -S option") if self.sbd_devices and self.diskless_sbd: utils.fatal("Can't use -s and -S options together") if self.stage == "sbd": diff --git a/crmsh/ui_cluster.py b/crmsh/ui_cluster.py index 47aa029eb..676023e7e 100644 --- a/crmsh/ui_cluster.py +++ b/crmsh/ui_cluster.py @@ -438,7 +438,7 @@ def do_init(self, context, *args): parser.add_argument("-S", "--enable-sbd", dest="diskless_sbd", action="store_true", help="Enable SBD even if no SBD device is configured (diskless mode)") parser.add_argument("-w", "--watchdog", dest="watchdog", metavar="WATCHDOG", - help="Use the given watchdog device or driver name") + help="Use the given watchdog device or driver name (only valid together with -s or -S option)") parser.add_argument("-x", "--skip-csync2-sync", dest="skip_csync2", action="store_true", help="Skip csync2 initialization (an experimental option)") parser.add_argument("--no-overwrite-sshkey", action="store_true", dest="no_overwrite_sshkey", diff --git a/test/features/steps/const.py b/test/features/steps/const.py index 9ae053d57..73d046964 100644 --- a/test/features/steps/const.py +++ b/test/features/steps/const.py @@ -76,7 +76,8 @@ -S, --enable-sbd Enable SBD even if no SBD device is configured (diskless mode) -w WATCHDOG, --watchdog WATCHDOG - Use the given watchdog device or driver name + Use the given watchdog device or driver name (only + valid together with -s or -S option) -x, --skip-csync2-sync Skip csync2 initialization (an experimental option) --no-overwrite-sshkey