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.
pull/18777/head
Matthew Krupcale 8 years ago committed by Matt Clay
parent c8a700834c
commit cb765ce590

@ -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

Loading…
Cancel
Save