diff options
author | Matthew Krupcale <mkrupcale@matthewkrupcale.com> | 2016-11-17 13:15:11 -0500 |
---|---|---|
committer | Rene Moser <mail@renemoser.net> | 2016-11-17 19:31:30 +0100 |
commit | 01d79cf03a3dbbe333b6a78fa874cc85164632e5 (patch) | |
tree | bd862a9e8def13170bd0ce690e6c9d725b6b738f | |
parent | 742b79e8b8b3ee525071b1966b80b67dc84c5d73 (diff) | |
download | ansible-modules-extras-01d79cf03a3dbbe333b6a78fa874cc85164632e5.tar.gz |
gluster_volume: Fixes gluster peer probe / volume creation issue. (#3486)
* gluster_volume: Fixes issue when creating a new volume failing due to peers not being present. The peers which are not 'localhost' should invoke wait_for_peer, but the find method returns -1 (not 0) on non-localhost peers.
(cherry picked from commit 431a229069146b92945a04f0170c54077342964e)
-rw-r--r-- | system/gluster_volume.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/system/gluster_volume.py b/system/gluster_volume.py index 96174433..44ff2780 100644 --- a/system/gluster_volume.py +++ b/system/gluster_volume.py @@ -274,7 +274,7 @@ def wait_for_peer(host): def probe(host, myhostname): global module out = run_gluster([ 'peer', 'probe', host ]) - if not out.find('localhost') and not wait_for_peer(host): + if out.find('localhost') == -1 and not wait_for_peer(host): module.fail_json(msg='failed to probe peer %s on %s' % (host, myhostname)) changed = True |