Skip to content

Commit f997b97

Browse files
authored
csi: Fix g_host parsing (kadalu#636)
Signed-off-by: Shree Vatsa N <[email protected]>
1 parent c57130d commit f997b97

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

csi/volumeutils.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1012,7 +1012,7 @@ def mount_glusterfs(volume, mountpoint, is_client=False):
10121012
secret_username = os.environ.get('SECRET_GLUSTERQUOTA_SSH_USERNAME', None)
10131013

10141014
# SSH into only first reachable host in volume['g_host'] entry
1015-
g_host = reachable_host(volume['g_host'].strip().split(','))
1015+
g_host = reachable_host(volume['g_host'])
10161016

10171017
if g_host is None:
10181018
logging.error(logf("All hosts are not reachable"))

lib/kadalulib.py

+1
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ def is_host_reachable(hosts, port):
9898

9999
def reachable_host(hosts):
100100
"""Return first reachable host for dir-quota SSH"""
101+
hosts = hosts.strip().split(',')
101102
for host in hosts:
102103
host = host.strip()
103104
if is_host_reachable([host], 22):

0 commit comments

Comments
 (0)