Skip to content

Commit bde0d25

Browse files
authored
Merge pull request #103 from davidz627/fix/Unmount
Made unmounting more robust
2 parents b85c3a2 + 0309c07 commit bde0d25

File tree

1,306 files changed

+389497
-63
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,306 files changed

+389497
-63
lines changed

Gopkg.lock

+605-17
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Gopkg.toml

+10-6
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
# go-tests = true
2525
# unused-packages = true
2626

27-
2827
[[constraint]]
2928
name = "cloud.google.com/go"
3029
version = "0.19.0"
@@ -42,9 +41,9 @@
4241
branch = "master"
4342
name = "github.com/golang/glog"
4443

45-
[[constraint]]
46-
name = "github.com/stretchr/testify"
47-
version = "1.2.1"
44+
#[[constraint]]
45+
# name = "github.com/stretchr/testify"
46+
# version = "1.2.1"
4847

4948
[[constraint]]
5049
branch = "master"
@@ -63,7 +62,7 @@
6362
version = "1.10.0"
6463

6564
[[constraint]]
66-
branch = "master"
65+
branch = "release-1.11"
6766
name = "k8s.io/apimachinery"
6867

6968
[[constraint]]
@@ -78,7 +77,12 @@
7877
[[constraint]]
7978
branch = "master"
8079
name = "github.com/kubernetes-csi/csi-test"
81-
80+
8281
[[constraint]]
8382
branch = "master"
8483
name = "k8s.io/test-infra"
84+
85+
# Transitive dependency of k8s.io/kubernetes/pkg/util/parsers
86+
[[override]]
87+
branch = "master"
88+
name = "github.com/docker/distribution"

pkg/gce-pd-csi-driver/node.go

+3-4
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import (
2626
"google.golang.org/grpc/codes"
2727
"google.golang.org/grpc/status"
2828
"k8s.io/kubernetes/pkg/util/mount"
29+
volumeutils "k8s.io/kubernetes/pkg/volume/util"
2930
"sigs.k8s.io/gcp-compute-persistent-disk-csi-driver/pkg/common"
3031
metadataservice "sigs.k8s.io/gcp-compute-persistent-disk-csi-driver/pkg/gce-cloud-provider/metadata"
3132
mountmanager "sigs.k8s.io/gcp-compute-persistent-disk-csi-driver/pkg/mount-manager"
@@ -139,9 +140,7 @@ func (ns *GCENodeServer) NodeUnpublishVolume(ctx context.Context, req *csi.NodeU
139140
return nil, status.Error(codes.InvalidArgument, "NodeUnpublishVolume Target Path must be provided")
140141
}
141142

142-
// TODO(#96): Check volume still exists
143-
144-
err := ns.Mounter.Interface.Unmount(targetPath)
143+
err := volumeutils.UnmountMountPoint(targetPath, ns.Mounter.Interface, false /* bind mount */)
145144
if err != nil {
146145
return nil, status.Error(codes.Internal, fmt.Sprintf("Unmount failed: %v\nUnmounting arguments: %s\n", err, targetPath))
147146
}
@@ -259,7 +258,7 @@ func (ns *GCENodeServer) NodeUnstageVolume(ctx context.Context, req *csi.NodeUns
259258
return nil, status.Error(codes.InvalidArgument, "NodeUnstageVolume Staging Target Path must be provided")
260259
}
261260

262-
err := ns.Mounter.Interface.Unmount(stagingTargetPath)
261+
err := volumeutils.UnmountMountPoint(stagingTargetPath, ns.Mounter.Interface, false /* bind mount */)
263262
if err != nil {
264263
return nil, status.Error(codes.Internal, fmt.Sprintf("NodeUnstageVolume failed to unmount at path %s: %v", stagingTargetPath, err))
265264
}

vendor/github.com/beorn7/perks/LICENSE

+20
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)