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

Pass Topology Information for DeleteVolume #408

Open
leakingtapan opened this issue Jan 14, 2020 · 5 comments
Open

Pass Topology Information for DeleteVolume #408

leakingtapan opened this issue Jan 14, 2020 · 5 comments

Comments

@leakingtapan
Copy link

leakingtapan commented Jan 14, 2020

With latest CSI spec, topology information is passed into CreateVolume call, so that CSI driver can provision a volume by the given TopologyRequirement. The topology requirement could be region, zones, or racks. This enables CSI driver to provision volume in different regions. Eg. a CSI driver could provision volume is both us-west-2 and us-east-1. However, due to topology information is missing from DeleteVolume call, a CSI driver won't be able to delete a volume for different regions.

In order to keep API symmetric between CreateVolume and DeleteVolume, topology information should be passed into DeleteVolume call. So that a CSI driver controller service could manage volumes from different regions for clusters that have worker nodes in many different regions.

/cc @gnufied @msau42

@msau42
Copy link

msau42 commented Jan 15, 2020

Generally, the volumedelete call cannot pass in information other than ID because it may not always available in the teardown case.

The way that we implemented it in the GCP PD driver is to encode zone/region information in the volume id.

@leakingtapan
Copy link
Author

The way that we implemented it in the GCP PD driver is to encode zone/region information in the volume id.

Yep. that's something could be achieved at driver side.

Generally, the volumedelete call cannot pass in information other than ID because it may not always available in the teardown case

Could you give some example of when the topology info is not available? One case I can think of is pre-provisioned volume that doesn't have nodeAffinity constraint. But in that case, driver could still fall back to some default region that the driver thinks appropriate.

And where do we have such doc about encoding region in volumeHandle from the CSI spec? This feels more of a workaround than best practice for me.

@vitalif
Copy link

vitalif commented Jul 16, 2021

Same problem with VolumeContext missing in DeleteVolume, this is really inconvenient and a lot of drivers end up with encoding all the information into volume name... which is of course ugly as hell

@andyzhangx
Copy link
Contributor

andyzhangx commented Apr 18, 2022

Same problem with VolumeContext missing in DeleteVolume, this is really inconvenient and a lot of drivers end up with encoding all the information into volume name... which is of course ugly as hell

@vitalif agree on this, VolumeContext should also be in DeleteVolumeRequest, currently we have to encoding all info as a volumeID, now the volumeID is longer and longer, that's really ugly design. added a new feature request here: #507

@jdef
Copy link
Member

jdef commented Apr 19, 2022

#507 (comment)

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

5 participants