Skip to content

Unable to create PVCs as ReadOnlyMany with 1.4.0 #928

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
b-t-927 opened this issue Mar 14, 2022 · 2 comments
Closed

Unable to create PVCs as ReadOnlyMany with 1.4.0 #928

b-t-927 opened this issue Mar 14, 2022 · 2 comments

Comments

@b-t-927
Copy link

b-t-927 commented Mar 14, 2022

I've recently deployed a new GKE cluster which is running version 1.4.0 of the provided CSI driver and it seems I'm not able to create PVC with the access mode set to ReadOnlyMany.

This just leads to the error: failed to provision volume with StorageClass "gke-balanced": rpc error: code = InvalidArgument desc = VolumeContentSource must be provided when AccessMode is set to read only. No PV is created and the PVC stays stuck in pending.

ReadWriteOnce volumes seem to work just fine, but I noticed that the pending PVC doesn't create any entries in the CSI pod logs, thought the RWO volumes do.

On another cluster which is still running 1.3.4 the exact same PVC definition works properly with ROX.

My StorageClass is:

allowVolumeExpansion: true
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  annotations:
    storageclass.kubernetes.io/is-default-class: "true"
  name: gke-balanced
parameters:
  type: pd-balanced
provisioner: pd.csi.storage.gke.io
reclaimPolicy: Delete
volumeBindingMode: Immediate
@mattcary
Copy link
Contributor

mattcary commented Mar 14, 2022

Creating disks with access mode read-only many never actually worked in the PD layer: the disk was not actually created as read-only, and so would not be able to be attached to multiple nodes (which is a key use case for read-only disks). This was fixed in 1.4.0.

The right flow for read-only is described here: https://cloud.google.com/kubernetes-engine/docs/how-to/persistent-volumes/readonlymany-disks.

Since the driver now correctly creates disks as read-only, they must be created from a snapshot or clone. They can't be mounted writable and populated, because the underlying PD is now actually read-only.

More details in the changelog and the associated PR #869.

@ellamacrow98
Copy link

ellamacrow98 commented Sep 5, 2022

Hello, I want to add additional software to the live system. But after that, I want to use it like a normal live system (only readable) and don't want to store any temporary data on this drive.

I thought it might be somehow possible by creating a persistent volume and starting loading it into a ramdisk.
Do someone know if something like this is possible with any Linux live system?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants