-
Notifications
You must be signed in to change notification settings - Fork 38.7k
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
Delegate map operation to BlockVolumeMapper plugin #64094
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -162,6 +162,9 @@ type BlockVolumeMapper interface { | |
// at attacher.Attach() and attacher.WaitForAttach(). | ||
// This may be called more than once, so implementations must be idempotent. | ||
SetUpDevice() (string, error) | ||
|
||
// Map maps the block device path for the specified spec and pod. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do you need a symmetric There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, i thought about that too. But there is an There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we need to do any similar moving around of common logic? |
||
MapDevice(devicePath, globalMapPath, volumeMapPath, volumeMapName string, podUID types.UID) error | ||
} | ||
|
||
// BlockVolumeUnmapper interface provides methods to cleanup/unmap the volumes. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
devicePath
comes fromvolumeAttacher.WaitForAttach(...)
orblockVolumeMapper.SetUpDevice()
. Is that correct? Will all plugins returndevicePath
in one of those functions? Will CSI?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The original code assumes that devicePath comes from either a
volumeAttacher.WaitForAttach(...)
or fromblockVolumeMapper.SetupDevice()
. If neither one return a path, code errors out. So yes, it is a assume that ablockVolumeMapper
will return a deviceMap.Since CSI does not return a devicePath with
WaitForAttach
, it usesSetupDevice
to return the global map path (which is the path sent to the external driver for NodeStage call).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ack!