Commit e03635e0 authored by NickrenREN's avatar NickrenREN

fix metricsStatFS volume path for local volume

parent a5550441
...@@ -110,7 +110,7 @@ func getVolumeSource(spec *volume.Spec) (*v1.LocalVolumeSource, bool, error) { ...@@ -110,7 +110,7 @@ func getVolumeSource(spec *volume.Spec) (*v1.LocalVolumeSource, bool, error) {
} }
func (plugin *localVolumePlugin) NewMounter(spec *volume.Spec, pod *v1.Pod, _ volume.VolumeOptions) (volume.Mounter, error) { func (plugin *localVolumePlugin) NewMounter(spec *volume.Spec, pod *v1.Pod, _ volume.VolumeOptions) (volume.Mounter, error) {
volumeSource, readOnly, err := getVolumeSource(spec) _, readOnly, err := getVolumeSource(spec)
if err != nil { if err != nil {
return nil, err return nil, err
} }
...@@ -128,7 +128,7 @@ func (plugin *localVolumePlugin) NewMounter(spec *volume.Spec, pod *v1.Pod, _ vo ...@@ -128,7 +128,7 @@ func (plugin *localVolumePlugin) NewMounter(spec *volume.Spec, pod *v1.Pod, _ vo
mounter: plugin.host.GetMounter(plugin.GetPluginName()), mounter: plugin.host.GetMounter(plugin.GetPluginName()),
plugin: plugin, plugin: plugin,
globalPath: globalLocalPath, globalPath: globalLocalPath,
MetricsProvider: volume.NewMetricsStatFS(volumeSource.Path), MetricsProvider: volume.NewMetricsStatFS(plugin.host.GetPodVolumeDir(pod.UID, stringsutil.EscapeQualifiedNameForDisk(localVolumePluginName), spec.Name())),
}, },
readOnly: readOnly, readOnly: readOnly,
}, nil }, nil
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment