Fix PATH issue

This commit is contained in:
Fabian Stamm 2022-08-16 23:27:24 +02:00
parent 2e6826a414
commit 789bd294c3
2 changed files with 3 additions and 1 deletions

View File

@ -15,7 +15,7 @@ import subprocess
gluster_host = os.environ["GLUSTER_HOST"]
gluster_volume = os.environ["GLUSTER_VOLUME"]
csi_sock_full_path = os.environ.get("CSI_PATH", "/csi/csi.sock")
csi_sock_full_path = os.environ.get("CSI_PATH", "/csi/") + "csi.sock"
def unmount(path):
@ -33,6 +33,8 @@ def mount(volume, path):
# Might be a stale mount, unmount and try again
if p.returncode == 32:
return True
print("Mounting failed with return code:", p.returncode)
return p