diff --git a/deploy/csi-nfs-driverinfo.yaml b/deploy/csi-nfs-driverinfo.yaml index bb08dbc4..ce1f04ff 100644 --- a/deploy/csi-nfs-driverinfo.yaml +++ b/deploy/csi-nfs-driverinfo.yaml @@ -7,5 +7,4 @@ spec: attachRequired: false volumeLifecycleModes: - Persistent - - Ephemeral fsGroupPolicy: File diff --git a/pkg/nfs/controllerserver.go b/pkg/nfs/controllerserver.go index 9015e7fb..98a0a0eb 100644 --- a/pkg/nfs/controllerserver.go +++ b/pkg/nfs/controllerserver.go @@ -364,8 +364,8 @@ func getInternalMountPath(workingMountDir string, vol *nfsVolume) string { // Get internal path where the volume is created // The reason why the internal path is "workingDir/subDir/subDir" is because: -// * the semantic is actually "workingDir/volId/subDir" and volId == subDir. -// * we need a mount directory per volId because you can have multiple +// - the semantic is actually "workingDir/volId/subDir" and volId == subDir. +// - we need a mount directory per volId because you can have multiple // CreateVolume calls in parallel and they may use the same underlying share. // Instead of refcounting how many CreateVolume calls are using the same // share, it's simpler to just do a mount per request. @@ -385,10 +385,11 @@ func getVolumeIDFromNfsVol(vol *nfsVolume) string { // Given a CSI volume id, return a nfsVolume // sample volume Id: -// new volumeID: -// nfs-server.default.svc.cluster.local#share#pvc-4bcbf944-b6f7-4bd0-b50f-3c3dd00efc64 -// nfs-server.default.svc.cluster.local#share#subdir#pvc-4bcbf944-b6f7-4bd0-b50f-3c3dd00efc64 -// old volumeID: nfs-server.default.svc.cluster.local/share/pvc-4bcbf944-b6f7-4bd0-b50f-3c3dd00efc64 +// +// new volumeID: +// nfs-server.default.svc.cluster.local#share#pvc-4bcbf944-b6f7-4bd0-b50f-3c3dd00efc64 +// nfs-server.default.svc.cluster.local#share#subdir#pvc-4bcbf944-b6f7-4bd0-b50f-3c3dd00efc64 +// old volumeID: nfs-server.default.svc.cluster.local/share/pvc-4bcbf944-b6f7-4bd0-b50f-3c3dd00efc64 func getNfsVolFromID(id string) (*nfsVolume, error) { var server, baseDir, subDir, uuid string segments := strings.Split(id, separator) diff --git a/pkg/nfs/fake_mounter.go b/pkg/nfs/fake_mounter.go index abd1c5e2..abd61e84 100644 --- a/pkg/nfs/fake_mounter.go +++ b/pkg/nfs/fake_mounter.go @@ -49,7 +49,7 @@ func (f *fakeMounter) MountSensitive(source string, target string, fstype string return nil } -//IsLikelyNotMountPoint overrides mount.FakeMounter.IsLikelyNotMountPoint. +// IsLikelyNotMountPoint overrides mount.FakeMounter.IsLikelyNotMountPoint. func (f *fakeMounter) IsLikelyNotMountPoint(file string) (bool, error) { if strings.Contains(file, "error_is_likely") { return false, fmt.Errorf("fake IsLikelyNotMountPoint: fake error")