-
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
Move MountsInGlobalPDPath from mount pkg to volume #74734
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 |
---|---|---|
|
@@ -250,8 +250,8 @@ func getVolumeSource( | |
|
||
func (plugin *awsElasticBlockStorePlugin) ConstructVolumeSpec(volName, mountPath string) (*volume.Spec, error) { | ||
mounter := plugin.host.GetMounter(plugin.GetPluginName()) | ||
pluginDir := plugin.host.GetPluginDir(plugin.GetPluginName()) | ||
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. is the old 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. I may move the With that stuff taken out, it's pretty small. To your specific question, no |
||
volumeID, err := mounter.GetDeviceNameFromMount(mountPath, pluginDir) | ||
pluginMntDir := util.GetPluginMountDir(plugin.host, plugin.GetPluginName()) | ||
volumeID, err := mounter.GetDeviceNameFromMount(mountPath, pluginMntDir) | ||
if err != nil { | ||
return nil, err | ||
} | ||
|
@@ -451,7 +451,7 @@ func makeGlobalPDPath(host volume.VolumeHost, volumeID aws.KubernetesVolumeID) s | |
// Clean up the URI to be more fs-friendly | ||
name := string(volumeID) | ||
name = strings.Replace(name, "://", "/", -1) | ||
return filepath.Join(host.GetPluginDir(awsElasticBlockStorePluginName), mount.MountsInGlobalPDPath, name) | ||
return filepath.Join(host.GetPluginDir(awsElasticBlockStorePluginName), util.MountsInGlobalPDPath, name) | ||
} | ||
|
||
func (ebs *awsElasticBlockStore) GetPath() string { | ||
|
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.
I would like to make sure
pluginMountDir
now hasMountsInGlobalPDPath
included?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.
yes, callers within K8s have to append
MountsInGlobalPDPath
before making this call now. Picture this code living atk8s.io/utils/mount
instead of withink8s.io/kubernetes
. It can't/won't know anything aboutMountsInGlobalPDPath
.I made sure to update all callers.