-
Notifications
You must be signed in to change notification settings - Fork 34
Fix csi manila upgrade case #748
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
base: main
Are you sure you want to change the base?
Conversation
13590c1 to
660cb46
Compare
| "kind": objects.StorageClass.kind, | ||
| "metadata": { | ||
| "name": "share-%s" | ||
| "name": "share-nfs-%s" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The good thing is that we can delete SC(StorageClass) in use without any issue.
So I'd prefer to check current SC's provisioner field and delete if that is old one(without proto prefix). And create a new one. And all those operations in the code, not manual.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The upgrade is stuck with existing PVs that already have "provisioner" defined and which cannot be easily modified.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ricolin i am a bit lost, PV doesn't have provisioner field. It only includes StorageClass field.
So once you delete old storageclass and create new one using the same name, it should be ok, no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@okozachenko1203
It's in PVC on
kind: PersistentVolumeClaim
metadata:
annotations:
...
volume.beta.kubernetes.io/storage-provisioner: manila.csi.openstack.org
volume.kubernetes.io/storage-provisioner: manila.csi.openstack.org
...
And here in PV
apiVersion: v1
kind: PersistentVolume
metadata:
annotations:
pv.kubernetes.io/provisioned-by: manila.csi.openstack.org
spec:
...
csi:
...
driver: manila.csi.openstack.org
...
volumeAttributes:
...
storage.kubernetes.io/csiProvisionerIdentity: 1722446784123-8081-manila.csi.openstack.org
...
|
Also currently possible workaround is to recreate PVC with new storage driver and move PV to bond with new PVC as follow: |
Signed-off-by: ricolin <[email protected]>
`provisioner` is immutable. for PV. PV in cluster that build with storageclass that change only provisioner will not be able to upgrade. Signed-off-by: ricolin <[email protected]>
660cb46 to
1a788a1
Compare
Fix manila storageclass upgrade
provisioneris immutable. for PV. PV in cluster that is built with storageclass that changesprovisionerwill not be able to upgrade to new storageclass. As we use same storageclass name, old cluster is forcing to upgrade to new storageclass and fail as it ask forprovisionerchange in PV.Fix cinder_csi_enabled and manila_csi_enabled type
These two type are passing as string in cluster.labels not bool.
Relate to #740