Skip to content
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

Velero doesn't support OpenStack CSI topology #6440

Closed
kayrus opened this issue Jun 29, 2023 · 6 comments · Fixed by #6464
Closed

Velero doesn't support OpenStack CSI topology #6440

kayrus opened this issue Jun 29, 2023 · 6 comments · Fixed by #6464
Labels
Area/CSI Related to Container Storage Interface support Help wanted

Comments

@kayrus
Copy link
Contributor

kayrus commented Jun 29, 2023

What steps did you take and what happened:

Create a backup with a snapshot using https://github.com/Lirt/velero-plugin-for-openstack plugin
See level=info msg="zone info not available in nodeAffinity requirements" in logs.

What did you expect to happen:

Velero should have an ability to support OpenStack CSI topologies:

  • topology.cinder.csi.openstack.org/zone
  • topology.nfs.manila.csi.openstack.org/zone
  • topology.ceph.manila.csi.openstack.org/zone
  • topology.disk.csi.everest.io from Huawei cloud
  • any other custom topology, since CSI driver name depends on the FS type.

Ideally it should be nice to extend the snapshotter plugin interface with the GetVolumeTopologyKey method. So each velero plugin can share the topology key it uses.

See also:

k, pvFailureDomainZone = zoneFromPVNodeAffinity(pv, awsEbsCsiZoneKey, azureCsiZoneKey, gkeCsiZoneKey, zoneLabel, zoneLabelDeprecated)

zoneLabelDeprecated = "failure-domain.beta.kubernetes.io/zone"
// this is reused for nodeAffinity requirements
zoneLabel = "topology.kubernetes.io/zone"
awsEbsCsiZoneKey = "topology.ebs.csi.aws.com/zone"
azureCsiZoneKey = "topology.disk.csi.azure.com/zone"
gkeCsiZoneKey = "topology.gke.io/zone"

#103

Environment:

  • Velero version (use velero version): 1.10.1
  • Velero features (use velero client config get features): features: <NOT SET>
  • Kubernetes version (use kubectl version): 1.25
  • Kubernetes installer & version: 1.25
  • Cloud provider or hardware configuration: OpenStack cloud provider 1.25.x
  • OS (e.g. from /etc/os-release):

Vote on this issue!

This is an invitation to the Velero community to vote on issues, you can see the project's top voted issues listed here.
Use the "reaction smiley face" up to the right of this comment to vote.

  • 👍 for "I would like to see this bug fixed as soon as possible"
  • 👎 for "There are more important bugs to focus on right now"
@reasonerjt reasonerjt added the Area/CSI Related to Container Storage Interface support label Jul 2, 2023
@reasonerjt
Copy link
Contributor

Although the velero-plugin-for-openstack is not officially supported, I think this is probably easy to implement, would you contribute?

@kayrus
Copy link
Contributor Author

kayrus commented Jul 3, 2023

@reasonerjt it's easy to implement, but the proper way to do this is to to extend the interface, which would cause all plugins to be adjusted. I'm not against to submit the PR, but I think that this is something that maintainer should discuss and approve first.

@sseago
Copy link
Collaborator

sseago commented Jul 3, 2023

Velero-plugin-for-openstack provides direct support for swift (object store plugin) and cinder (snapshots).

Although in this case, it looks like all of the storage drivers in use for volumes are CSI-based. Would the CSI plugin be an option? The only downside is that until Velero 1.12, you won't get off-cluster backups of volumes, but it might be worth checking to see whether basic CSI snapshot functionality works with these volumes, because if it does, then the data movement currently scheduled for Velero 1.12 should work for you.

@sseago
Copy link
Collaborator

sseago commented Jul 3, 2023

@kayrus extending a plugin interface is a larger undertaking, requiring a new API version to be proposed, a new implementation of this API, and an adapter layer to allow existing plugins to continue to function without modification. See the work done in Velero 1.11 to support BackupItemActionV2 and RestoreItemActionV2.

@kayrus
Copy link
Contributor Author

kayrus commented Jul 5, 2023

@sseago ok, let's keep a new interface for a long-term solution. As for the short-term, I think I can add a couple of common OpenStack CSI zone keys.

@kayrus
Copy link
Contributor Author

kayrus commented Jul 5, 2023

@sseago it appeared that topology keys in OpenStack CIS are actually hardcoded, however the Manila driver name could be changed, fortunately it doesn't affect topology key. See a PR submitted, I hope it's clean and simple as much as possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area/CSI Related to Container Storage Interface support Help wanted
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants