Fix volume map path during reconstruction

This commit is contained in:
Jan Safranek
2019-10-04 14:03:35 +02:00
parent 612fb1793e
commit 44a006e0d0

View File

@@ -24,6 +24,7 @@ import (
"io/ioutil" "io/ioutil"
"os" "os"
"path" "path"
"path/filepath"
"time" "time"
v1 "k8s.io/api/core/v1" v1 "k8s.io/api/core/v1"
@@ -518,7 +519,8 @@ func (rc *reconciler) reconstructVolume(volume podVolume) (*reconstructedVolume,
pod.UID, pod.UID,
newMapperErr) newMapperErr)
} }
checkPath, _ = volumeMapper.GetPodDeviceMapPath() mapDir, linkName := volumeMapper.GetPodDeviceMapPath()
checkPath = filepath.Join(mapDir, linkName)
} else { } else {
var err error var err error
volumeMounter, err = plugin.NewMounter( volumeMounter, err = plugin.NewMounter(