Merge pull request #1476 from jarrpa/jarrpa-patch-1

gluster_volume: allow probing ourselves
reviewable/pr18780/r1
Brian Coca 9 years ago
commit a42203bdb3

@ -249,8 +249,8 @@ def wait_for_peer(host):
def probe(host, myhostname): def probe(host, myhostname):
global module global module
run_gluster([ 'peer', 'probe', host ]) out = run_gluster([ 'peer', 'probe', host ])
if not wait_for_peer(host): if not out.find('localhost') and not wait_for_peer(host):
module.fail_json(msg='failed to probe peer %s on %s' % (host, myhostname)) module.fail_json(msg='failed to probe peer %s on %s' % (host, myhostname))
changed = True changed = True
@ -258,9 +258,7 @@ def probe_all_peers(hosts, peers, myhostname):
for host in hosts: for host in hosts:
host = host.strip() # Clean up any extra space for exact comparison host = host.strip() # Clean up any extra space for exact comparison
if host not in peers: if host not in peers:
# dont probe ourselves probe(host, myhostname)
if myhostname != host:
probe(host, myhostname)
def create_volume(name, stripe, replica, transport, hosts, bricks, force): def create_volume(name, stripe, replica, transport, hosts, bricks, force):
args = [ 'volume', 'create' ] args = [ 'volume', 'create' ]

Loading…
Cancel
Save