Skip to content

Volume Manager Data Structure Should Use Pod UID in Key #29695

Closed
@saad-ali

Description

@saad-ali

Problem
This issue is related to #29555 which was fixed by PR #29673. That issue fixed name collisions for non-attachable volumes (which is much more common), but not for attachable volumes.

Specifically, if a single pod references the same attachable disk via two different volume names (possibly to refer to different partitions), the names will collide.

Suggested Fix

There are three main volumemanager data structures:

  • Actual State of the World (ASW)
  • Desired State of the World (DSW)
  • Nested Pending Operations (formerly goroutinemap)

Instead of using the same key (unique volume name) for all these data structs, the key for ASW and DSW should be a struct that includes unique volume name and unique pod name. Nested pending operations can continue to operate on unique volume name to keep the existing protection against multiple operations on the same volume.

Suggested Cleanup
Move GetVolumeName() to Attacher volumes interface (instead of required for all volumes). With PR #29673 non-attachable volumes auto-generate the volume name. Ensure that MarkVolumeAsAttached() has all the information it needs to either generate the name in either case (instead of passing in an override).

Metadata

Metadata

Assignees

Labels

lifecycle/rottenDenotes an issue or PR that has aged beyond stale and will be auto-closed.priority/important-soonMust be staffed and worked on either currently, or very soon, ideally in time for the next release.sig/storageCategorizes an issue or PR as relevant to SIG Storage.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions