Fix module failure with pacemaker_cluster: state=cleanup (#27846)
* Fix module failure with pacemaker_cluster: state=cleanup If state=cleanup was used, set_cluster() was being called with 'cleanup' state which it doesn't handle. Instead use existing clean_cluster() method. Fixes #27799 * get and return cluster_state on state=clean as well
This commit is contained in:
parent
52a8ed55ee
commit
767cd82e42
1 changed files with 3 additions and 2 deletions
|
@ -219,9 +219,10 @@ def main():
|
|||
module.fail_json(msg="Failed during the restart of the cluster, the cluster can't be stopped")
|
||||
|
||||
if state in ['cleanup']:
|
||||
set_cluster(module, state, timeout, force)
|
||||
clean_cluster(module, timeout)
|
||||
cluster_state = get_cluster_status(module)
|
||||
module.exit_json(changed=True,
|
||||
out=cluster_state)
|
||||
out=cluster_state)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
Loading…
Reference in a new issue