Skip to content

Commit

Permalink
[Runtimes] Fix auto_mount precedence to PVC->V3IO (#944)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hedingber committed May 19, 2021
1 parent 1b6831e commit 17fd21e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mlrun/platforms/other.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,6 @@ def auto_mount(pvc_name="", volume_mount_path="", volume_name=None):
volume_mount_path=volume_mount_path,
volume_name=volume_name or "pvc",
)
if "V3IO_ACCESS_KEY" in os.environ:
return mount_v3io(name=volume_name or "v3io")
if "MLRUN_PVC_MOUNT" in os.environ:
mount = os.environ.get("MLRUN_PVC_MOUNT")
items = mount.split(":")
Expand All @@ -68,6 +66,8 @@ def auto_mount(pvc_name="", volume_mount_path="", volume_name=None):
volume_mount_path=items[1],
volume_name=volume_name or "pvc",
)
if "V3IO_ACCESS_KEY" in os.environ:
return mount_v3io(name=volume_name or "v3io")
raise ValueError("failed to auto mount, need to set env vars")


Expand Down

0 comments on commit 17fd21e

Please sign in to comment.