-
Notifications
You must be signed in to change notification settings - Fork 27
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
Volumes with csi- prefix stoped working (volume not present in storage backend) #7
Comments
I've more investigated in this, I have the next behavior: If
Otherwise if
It tries to call:
that's weird because linstor know this resource as
|
can I get the output of |
@haySwim sure: |
Alright, I understand the issue. Give me a day or so to think about how to solve it in an intelligent way. |
Hi @haySwim, I solved this problem by modifying metadata of my old volumes, what have been done:
{
"name": "pvc-a4303601-3ab0-11e9-baf1-22b1a44f6c4f",
- "id": "9b527570-bedb-438b-9745-3bada7bbc83e",
+ "id": "csi-9b527570-bedb-438b-9745-3bada7bbc83e",
"createdBy": "io.drbd.linstor-csi",
"creationTime": "2019-02-27T16:57:52.909364881Z",
"sizeBytes": 52428800,
"readonly": false,
"parameters": {
"ReplicasOnDifferen": "side",
"autoPlace": "2",
"storagePool": "pve"
}
}
apiVersion: v1
kind: PersistentVolume
metadata:
annotations:
pv.kubernetes.io/provisioned-by: io.drbd.linstor-csi
creationTimestamp: "2019-03-29T00:00:49Z"
finalizers:
- kubernetes.io/pv-protection
name: pvc-a4303601-3ab0-11e9-baf1-22b1a44f6c4f
resourceVersion: "41688434"
selfLink: /api/v1/persistentvolumes/pvc-a4303601-3ab0-11e9-baf1-22b1a44f6c4f
uid: b61f757e-51b5-11e9-b606-52b5c95dfe5c
spec:
accessModes:
- ReadWriteOnce
capacity:
storage: 50Mi
claimRef:
apiVersion: v1
kind: PersistentVolumeClaim
name: foo
namespace: default
resourceVersion: "29068421"
uid: a4303601-3ab0-11e9-baf1-22b1a44f6c4f
csi:
driver: io.drbd.linstor-csi
fsType: ext4
volumeAttributes:
storage.kubernetes.io/csiProvisionerIdentity: 1551278453900-8081-io.drbd.linstor-csi
- volumeHandle: 9b527570-bedb-438b-9745-3bada7bbc83e
+ volumeHandle: csi-9b527570-bedb-438b-9745-3bada7bbc83e
persistentVolumeReclaimPolicy: Delete
storageClassName: linstor-basic-storage
volumeMode: Filesystem
status:
phase: Bound After these changes old csi volumes attachment started working properly. For automate process I've prepared small script for generate right commands: https://github.com/kvaps/linstor-csi-migrator I want to know your opinion: What do you think, is it correct way for solve this problem? |
I think this is a good solution and I'm happy that you found a workaround. Right now we're at major version 0 and development is pretty active, so we're not trying especially hard to maintain backwards compatibility. I think ultimately the way that this metadata is stored is going to get changed in breaking way soon-ish, but should stabilize afterwards. |
OK, great! Hopefully next changes will be more portable to existing volumes. |
Hi, I've just updated csi-provisioner, which is probably implements this fix #3.
Now when I can create new PVCs, volumes are creating for them with the name like:
pvc-bbd4682a-5024-11e9-82fd-c2b1dc5386a1
- this is working fine.But old volumes with the name like
csi-0964269a-b154-43a1-876c-d15989446479
are stopped working at all:csi-attacher log:
Example PV:
Linstor does not provides any opportunity for rename already created resources, and Kubernetes does not provides to change
spec.csi.volumeHandle
for the already created PV.Does it mean, that this situation have no other solution than manually edit linstor database for remove
csi-
prefix?The text was updated successfully, but these errors were encountered: