question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Mounting existing PVC not possible.

See original GitHub issue

Hi all,

first of all thank you for this great project. I think it really adds a lot of value to the whole kubeflow experience. While playing around a bit with kale I experienced an issue while trying something out:

The idea was to see pipeline outputs as files directly in the jupyterlab. Therefore I mounted an RWX volume data-volume to my notebook pod in /home/jovyan/data. Then I wanted to pass the name of the volume to kale and define the mountpoint of the volume as /data. image

The code in my pipeline was prepared to write some output to /data/filename. As the volume is RWX I assumed that the output would be directly visible in my jupyterlab File Browser. I think this workflow would really add to the Data Science experience and the convenience of using pipelines.

However, running this pipeline I encountered an error in the first pipeline step. The step faild with the following message:

This step is in Error state with this message: Pod "rwx-test2-et0i4-tkphz-2706597555" is invalid: [spec.volumes[2].name: Invalid value: "pvolume-ca6c4cec0854efe7746ed49b8661abc2a924aef77f23218ad5c43fc8258b0dfe": must be no more than 63 characters, spec.containers[0].volumeMounts[2].name: Not found: "pvolume-ca6c4cec0854efe7746ed49b8661abc2a924aef77f23218ad5c43fc8258b0dfe", spec.containers[1].volumeMounts[0].name: Not found: "pvolume-ca6c4cec0854efe7746ed49b8661abc2a924aef77f23218ad5c43fc8258b0dfe"]

I was wondering why this happens as the volume name pvolume-ca6c4cec0854efe7746ed49b8661abc2a924aef77f23218ad5c43fc8258b0dfe was obviously not the one I specified. I tried to track down the problem and came across the part in the pipline.py file where you create the volume in the pipeline:

def auto_generated_pipeline(vol_data='data-volume'):
    pvolumes_dict = OrderedDict()

    annotations = {}

    volume = dsl.PipelineVolume(pvc=vol_data)
    ...

This looked fine to me so I was wondering whether something goes wrong in dsl.PipelineVolume and indeed there seems to be a problem with how you call the dsl.PipelineVolume. In https://github.com/kubeflow/pipelines/blob/df4bc2365e9bfe01e06fb12ce407130ec598d7ce/sdk/python/kfp/dsl/_pipeline_volume.py#L71 there seems to be checked for a kwargs parameter name. If this parameter is not given a new one with a hash is generated.

Right now I am not exactly sure whether this is a kale issue or a pipelines issue, but I guess this is not the behavior you expected, right?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
elikatsiscommented, Jan 22, 2020

Yes, PVCs cannot be mounted on pods living in a different namespace.

If I’m not wrong, with multi-user support, pipelines will be created in different namespaces (wherever the user has access to, e.g., kubeflow-user1 or kubeflow-myteam). Then, the steps will be able to mount PVCs in that same namespace.

I think I should close this issue. Feel free to reopen if anything occurs!

1reaction
elikatsiscommented, Jan 27, 2020

@h4gen @Felihong ,

I forgot to mention that this functionality is possible using Rok, which is included in MiniKF.

We overcome this issue by taking a snapshot of the PVC and then cloning it in kubeflow namespace as the first step of the pipeline, where the workflow is deployed.

You can try it out by deploying the latest MiniKF on GCP. Please find a tutorial exploiting this feature here.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Persistent Volumes | Kubernetes
Claims will be bound as matching volumes become available. For example, a cluster provisioned with many 50Gi PVs would not match a PVC...
Read more >
Kubernetes PVC Guide: Tutorials & Troubleshooting Tips
But it is also possible that the volume is available, but there was a specific issue mounting on the path required. Common causes....
Read more >
Understanding persistent storage - OpenShift Documentation
When a persistent volume claim (PVC) is deleted, the persistent volume (PV) still exists and is considered "released". However, the PV is not...
Read more >
Unable to mount the volume to the pod in kubernetes
you can not ideally If your mount mode is set to ReadWriteOnce. ... A PersistentVolumeClaim (PVC) is a request for storage by a...
Read more >
How Persistent Storage Works | Rancher Manager
To access persistent storage, a pod must have a PVC mounted as a volume. ... you've created, available from Resources > Workloads >...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found