kubernetes/pkg/volume/util
Kubernetes Submit Queue 00269a6c60 Merge pull request #35434 from rootfs/deviceopen
Automatic merge from submit-queue

refactor DeviceOpened() so it won't return error if device doesn't exist

<!--  Thanks for sending a pull request!  Here are some tips for you:
1. If this is your first time, read our contributor guidelines https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md and developer guide https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md
2. If you want *faster* PR reviews, read how: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/faster_reviews.md
3. Follow the instructions for writing a release note: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes
-->

**What this PR does / why we need it**:
DeviceOpened() is called after device is unmounted but before detached. Some volumes such as rbd don't support 3rd party detach, they have to be detached during unmount. Once detached, the device path vanishes. This causes false alarm when DeviceOpened() is called.

The fix is to ignore error IsNotExist 

**Which issue this PR fixes** _(optional, in `fixes #<issue number>(, #<issue_number>, ...)` format, will close that issue when PR gets merged)_: fixes #

**Special notes for your reviewer**:
@kubernetes/sig-storage 

**Release note**:

<!--  Steps to write your release note:
1. Use the release-note-* labels to set the release note state (if you have access) 
2. Enter your extended release note in the below block; leaving it blank means using the PR title as the release note. If no release note is required, just write `NONE`. 
-->

``` release-note
```

Signed-off-by: Huamin Chen hchen@redhat.com
2016-11-04 07:40:03 -07:00
..
nestedpendingoperations Add sync state loop in master's volume reconciler 2016-10-28 09:24:53 -07:00
operationexecutor Merge pull request #35434 from rootfs/deviceopen 2016-11-04 07:40:03 -07:00
types autogenerated 2016-10-21 17:32:32 -07:00
volumehelper autogenerated 2016-10-21 17:32:32 -07:00
atomic_writer.go Typos and englishify pkg/volume 2016-10-03 22:39:33 +02:00
atomic_writer_test.go Add mode permission bits to configmap, secrets and downwardAPI 2016-08-17 14:44:41 -04:00
BUILD autogenerated 2016-10-21 17:32:32 -07:00
device_util.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
device_util_linux.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
device_util_linux_test.go fix go vet errors 2016-08-10 16:45:41 -07:00
device_util_unsupported.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
doc.go Use Go canonical import paths 2016-07-16 13:48:21 -04:00
fs.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
fs_unsupported.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
io_util.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
util.go Require PV provisioner secrets to match type 2016-10-27 02:45:05 -04:00