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
4 changes: 2 additions & 2 deletions crmsh/ui_cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ def do_start(self, context, *args):
logger.info("Please try 'crm cluster start' on each node")
return False
if not node_list:
return False
return

if start_qdevice:
service_manager.start_service("corosync-qdevice", node_list=node_list)
Expand Down Expand Up @@ -249,7 +249,7 @@ def do_stop(self, context, *args):
except utils.NoSSHError as msg:
logger.error('%s', msg)
logger.info("Please try 'crm cluster stop' on each node")
return
return False
if not node_list:
return
logger.debug(f"stop node list: {node_list}")
Expand Down
10 changes: 10 additions & 0 deletions test/features/cluster_api.feature
Original file line number Diff line number Diff line change
Expand Up @@ -130,3 +130,13 @@ Feature: Functional test to cover SAP clusterAPI
And Directory "hanode2" in "/tmp/report.tar.bz2"
And File "pacemaker.log" in "/tmp/report.tar.bz2"
And File "corosync.conf" in "/tmp/report.tar.bz2"

@clean
Scenario: crm cluster start should return 0 for successful repeated execution (bsc#1241358)
When Run "crm cluster start" on "hanode1"
Then Expected return code is "0"
Then Expected "The cluster stack already started on hanode1" in stdout
When Run "crm cluster stop" on "hanode1"
And Run "crm cluster stop" on "hanode1"
Then Expected return code is "0"
Then Expected "The cluster stack already stopped on hanode1" in stdout
4 changes: 2 additions & 2 deletions test/features/cluster_blocking_ssh.feature
Original file line number Diff line number Diff line change
Expand Up @@ -73,5 +73,5 @@ Feature: cluster testing with ssh blocked
Then Directory "/tmp/report/hanode2" not created
Then Expected "ERROR: ssh-related operations are disabled. crmsh works in local mode." in stderr
Then Run "crm status" OK on "hanode1"
When Run "crm cluster stop --all" on "hanode1"
Then Expected "ERROR: ssh-related operations are disabled. crmsh works in local mode." in stderr
When Try "crm cluster stop --all"
Then Except "ERROR: ssh-related operations are disabled. crmsh works in local mode." in stderr
Loading