-
Notifications
You must be signed in to change notification settings - Fork 95
Fix: ui_cluster: Return when cluster service on all nodes are already startd (bsc#1241358) #1746
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix: ui_cluster: Return when cluster service on all nodes are already startd (bsc#1241358) #1746
Conversation
c23c4fa to
cede171
Compare
crmsh/ui_cluster.py
Outdated
| logger.error('%s', msg) | ||
| logger.info("Please try 'crm cluster start' on each node") | ||
| return False | ||
| return |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is NoSSHEror also changed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It makes sense to me to stay as "1"
adm@tw-1:~> sudo crm cluster start --all; echo $?
INFO: The cluster stack already started on tw-1
ERROR: cluster.start: Failed to run command systemctl is-active 'pacemaker.service' on adm@tw-2: adm@tw-2: Permission denied (publickey,password,keyboard-interactive). Environment variable SSH_AUTH_SOCK does not exist. Please check whether ssh-agent is available and consider using "sudo --preserve-env=SSH_AUTH_SOCK".
1
adm@tw-1:~> sudo crm cluster stop --all; echo $?
ERROR: cluster.stop: Failed to run command systemctl is-active 'corosync.service' on adm@tw-2: adm@tw-2: Permission denied (publickey,password,keyboard-interactive). Environment variable SSH_AUTH_SOCK does not exist. Please check whether ssh-agent is available and consider using "sudo --preserve-env=SSH_AUTH_SOCK".
1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And, all the following should return "0"
adm@tw-1:~> sudo crm cluster stop; echo $?
INFO: The cluster stack stopped on tw-1
0
adm@tw-1:~> sudo crm cluster start; echo $?
INFO: Starting pacemaker.service on tw-1
INFO: The cluster stack started on tw-1
0
adm@tw-1:~> sudo crm cluster start; echo $?
INFO: The cluster stack already started on tw-1
0 # <-- only fix here
709bee9 to
6c67963
Compare
… startd (bsc#1241358)
6c67963 to
4c358ca
Compare
…Error To keep consistency with the return value of `crm cluster start` when raise NoSSHError
4c358ca to
f76f6b7
Compare
When cluster is already started, the return value of
crm cluster startis 1, which was expected as 0This regression was introduced from #1692