gluster_volume: Improved parsing of cluster parameter list

pull/18777/head
Otto Kekäläinen 10 years ago committed by Matt Clay
parent d76cd4c299
commit c05d2875d1

@ -256,6 +256,7 @@ def probe(host, myhostname):
def probe_all_peers(hosts, peers, myhostname):
for host in hosts:
host = host.strip() # Clean up any extra space for exact comparison
if host not in peers:
# dont probe ourselves
if myhostname != host:
@ -347,6 +348,11 @@ def main():
if not myhostname:
myhostname = socket.gethostname()
# Clean up if last element is empty. Consider that yml can look like this:
# cluster="{% for host in groups['glusterfs'] %}{{ hostvars[host]['private_ip'] }},{% endfor %}"
if cluster != None and cluster[-1] == '':
cluster = cluster[0:-1]
if brick_paths != None and "," in brick_paths:
brick_paths = brick_paths.split(",")
else:

Loading…
Cancel
Save