Merge pull request #61567 from davidz627/fix/localSSDPermissions

Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Fixes permissions error for Local SSD when created with NODE_LOCAL_SSDS flag

**What this PR does / why we need it**:
The PR fixes a permissions error introduced in 1.9 whereby users are unable to write to their Local SSD if it is created with the `NODE_LOCAL_SSDS` flag.

This will need to be cherrypicked to 1.9 and 1.10.

/sig storage
/kind bug
/assign @msau42 

```release-note
NONE
```
This commit is contained in:
Kubernetes Submit Queue 2018-03-26 05:40:18 -07:00 committed by GitHub
commit 839fe27dc8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -183,6 +183,7 @@ function safe-format-and-mount() {
mkdir -p "${mountpoint}" mkdir -p "${mountpoint}"
echo "Mounting '${device}' at '${mountpoint}'" echo "Mounting '${device}' at '${mountpoint}'"
mount -o discard,defaults "${device}" "${mountpoint}" mount -o discard,defaults "${device}" "${mountpoint}"
chmod a+w "${mountpoint}"
} }
# Gets a devices UUID and bind mounts the device to mount location in # Gets a devices UUID and bind mounts the device to mount location in