-
Notifications
You must be signed in to change notification settings - Fork 334
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
Able to migrate volumes to another storage class and safer mechanism to prevent paths to be discovered again #75
Comments
cc @msau42 What do you think? |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
/remove-lifecycle stale We might need something more stable than device name + node name. Maybe serial number? There is an ask to better support migration of local volumes to new nodes. #127 |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Rotten issues close after 30d of inactivity. Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
@fejta-bot: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/lifecycle frozen |
Any progress made |
Motivation
Able to migrate PVs (actually underlying volumes) to another storage class and do not be afraid volumes can possibly be discovered more than once.
Problem
Current PV name (generated from path + class + node) is used as a unique identifier for the path on the node. It has some drawbacks, e.g. cannot change PV naming convention anymore, and users cannot change the storage class name, otherwise, volumes will be discovered again.
For example, at first, a user creates a storage class
foo
to discovery volumes under/mnt/disks
, but findfoo
name is not a good name and want to change it or simply changed the configuration by accident, volumes under/mnt/disks
will be discovered again and new PVs with same paths will be created. Pods which expect to use different PVs under different storage class may mount the same volume.Solution
Benefits:
Use cases
Name of storage class is changed by accident
In the beginning, alice as system admin uses the following configuration for provisioner:
Some volumes are discovered for storage class
foo
. Alice changes the storage class name tobar
in provisioner configuration:Volumes under storage class
foo
will not be created under storage classbar
. Only new volumes added in/mnt/disks
will be created.This is safer than the current behavior.
Note that, old volumes under storage class
foo
cannot be deleted by provisioner in this scenario because current provisioner will skip if storage class is not found in its configuration. (For in-process deleting, provisioner has no way to know mount path in provisioner container without storage class configuration) However, users can add old configuration back to recover deletion.Migrate volumes to new storage class
In the beginning, alice as system admin uses the following configuration for provisioner:
Alice wants to migrate volumes under /mnt/disks to another storage class
bar
, she can add a new storage class:Provisioner now can discover new volumes from
/mnt/disks
under storage classbar
.When volumes under
foo
are released and markedpersistentVolumeReclaimPolicy=Delete
, they will be deleted by provisioner.When all volumes under
foo
are deleted,foo
storage class can be removed from provisioner configuration. Of course, this is optional.The text was updated successfully, but these errors were encountered: