Skip to content

Commit

Permalink
fix metricsStatFS volume path for local volume
Browse files Browse the repository at this point in the history
  • Loading branch information
NickrenREN committed Sep 6, 2018
1 parent a555044 commit e03635e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/volume/local/local.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
volumeSource, readOnly, err := getVolumeSource(spec)
_, readOnly, err := getVolumeSource(spec)
if err != nil {
return nil, err
}
Expand All @@ -128,7 +128,7 @@ func (plugin *localVolumePlugin) NewMounter(spec *volume.Spec, pod *v1.Pod, _ vo
mounter: plugin.host.GetMounter(plugin.GetPluginName()),
plugin: plugin,
globalPath: globalLocalPath,
MetricsProvider: volume.NewMetricsStatFS(volumeSource.Path),
MetricsProvider: volume.NewMetricsStatFS(plugin.host.GetPodVolumeDir(pod.UID, stringsutil.EscapeQualifiedNameForDisk(localVolumePluginName), spec.Name())),
},
readOnly: readOnly,
}, nil
Expand Down

0 comments on commit e03635e

Please sign in to comment.