-
Notifications
You must be signed in to change notification settings - Fork 16
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
when changing storageclass, it doesn't change volume type in Openstack #113
Comments
Velero conf for changing storageclass as reference: apiVersion: v1
kind: ConfigMap
metadata:
name: change-storageclass
namespace: velero
labels:
velero.io/plugin-config: ""
velero.io/change-storage-class: RestoreItemAction
data:
foo: bar |
Hello @mikkeschiren, I will look into this soon. |
Hello again, When restore is executed it should do following (correct me if I'm wrong please):
logWithFields := b.log.WithFields(logrus.Fields{
"snapshotID": snapshotID,
"volumeType": volumeType,
"volumeAZ": volumeAZ,
"snapshotTimeout": b.snapshotTimeout,
"volumeTimeout": b.volumeTimeout,
"method": b.config["method"],
})
logWithFields.Info("BlockStore.CreateVolumeFromSnapshot called")
I remember this older issue #46 also had problem with a storage-class rename. I will need to dig into the code again to explore what's happening. It would be however nice if you could try to tell me what does Velero log say about volumeType when volume from snapshot is created. I bet Velero sends unchanged storage class name (unchanged |
I will do a new try in a day or two, and will come back with the output. |
Here is the output:
Some extra information that could help:
|
Here is the helm values I use, with secrets removed: credentials:
extraSecretRef: "velero-credentials"
extraEnvVars:
OS_AUTH_URL:
[...]
configuration:
backupStorageLocation:
- name: swift
provider: community.openstack.org/openstack
bucket: velero
volumeSnapshotLocation:
- name: cinder
provider: community.openstack.org/openstack-cinder
config:
cloud: ""
region: ""
method: snapshot
volumeTimeout: 5m
snapshotTimeout: 5m
cloneTimeout: 5m
backupTimeout: 5m
imageTimeout: 5m
ensureDeleted: "true"
ensureDeletedDelay: 10s
cascadeDelete: "true"
initContainers:
- name: velero-plugin-openstack
image: lirt/velero-plugin-for-openstack:v0.7.0
imagePullPolicy: IfNotPresent
volumeMounts:
- mountPath: /target
name: plugins
snapshotsEnabled: true
backupsEnabled: true |
I will need more time to look into this. Thank you for patience. |
I created issue in Velero - vmware-tanzu/velero#8164. I'm afraid based on the code I studied that it is impossible in current Velero code to change volume type of restored volume using |
Describe the bug
When using snapshots, and adding config for changing storageclass when restoring, in Kubernetes it looks like it has the right storageclass, but in reality, when checking in openstack, it has the same volume type as before.
Steps to reproduce the behavior
Create a Velero backup from a namespace using snapshot as method for volumeSnapshotLocation. Existing volumeclass is "foo", apply velero config for changing storageclass on restore to "bar".
Delete volume and deployment using that volume.
Restore the namespace.
New volume created using storageclass bar.
Check in openstack, volume has volume type foo.
Expected behavior
When using restore and you have configured a different restore storageclass, the restore should be using that volume type in openstack.
Used versions
velero version
): 1.13.2kubectl describe pod velero-...
): v0.7.0kubectl version
): v1.26.15If this is expected behaviour, that we can't change storageclass when using snapshots, it should be documented.
The text was updated successfully, but these errors were encountered: