Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions crmsh/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,8 @@ def _validate_nodes_option(self):
"""
Validate -N/--nodes option
"""
if self.user_at_node_list and not self.yes_to_all:
utils.fatal("Can't use -N/--nodes option without -y/--yes option")
if self.user_at_node_list and self.stage:
utils.fatal("Can't use -N/--nodes option and stage({}) together".format(self.stage))
me = utils.this_node()
Expand Down
2 changes: 2 additions & 0 deletions test/features/bootstrap_options.feature
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ Feature: crmsh bootstrap process - options
"""
When Try "crm cluster init sbd -x -y" on "hanode1"
Then Expected "-x option or SKIP_CSYNC2_SYNC can't be used with any stage" in stderr
When Try "crm cluster init -N hanode2" on "hanode1"
Then Expected "Can't use -N/--nodes option without -y/--yes option" in stderr
When Try "crm cluster init sbd -N hanode1 -N hanode2 -y" on "hanode1"
Then Expected "Can't use -N/--nodes option and stage(sbd) together" in stderr
When Try "crm corosync link help add" on "hanode1"
Expand Down