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.
This commit is contained in:
parent
c8a700834c
commit
cb765ce590
1 changed files with 1 additions and 1 deletions
|
@ -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…
Reference in a new issue