Commit Graph

1499 Commits (08c127d4eb3349df0428e07e0c58f8b8860ad0a1)

Author SHA1 Message Date
Kubernetes Submit Queue 6b925ac24b
Merge pull request #56851 from zouyee/ceph-1
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>.

check function return err

**What this PR does / why we need it**:
check function return err

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

**Special notes for your reviewer**:

**Release note**:

```NONE

```
2018-01-10 03:12:28 -08:00
Kubernetes Submit Queue b9a62423c6
Merge pull request #57953 from andyzhangx/azuredisk-remount-fix
Automatic merge from submit-queue (batch tested with PRs 57733, 57613, 57953). 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>.

fix device name change issue for azure disk: add remount logic

**What this PR does / why we need it**:
fix device name change issue for azure disk: add remount logic

Accoding to [Troubleshoot Linux VM device name change](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/troubleshoot-device-names-problems), there is possibility of device name change, so when kubelet is restarted, we need to check whether the following two paths are still valid:
1. `/var/lib/kubelet/plugins/kubernetes.io/azure-disk/mounts/m358246426`: in MountDevice func
2. `/var/lib/kubelet/pods/950f2eb8-d4e7-11e7-bc95-000d3a041274/volumes/kubernetes.io~azure-disk/pvc-67e4e319-d4e7-11e7-bc95-000d3a041274`: in SetUpAt func

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

**Special notes for your reviewer**:
 this is a corresponding fix of https://github.com/kubernetes/kubernetes/pull/57549, #57549 uses '/dev/disk/by-id', and this PR would check whether the mountPath is valid when kubelet restart(e.g.  after VM reboot since device name may change), if not valid, remount,  remember '/dev/disk/by-id' will be always valid.

**Release note**:

```
fix device name change issue for azure disk: add remount logic
```
2018-01-09 21:51:40 -08:00
Kubernetes Submit Queue 33134cb02c
Merge pull request #57993 from humblec/volume-metrics
Automatic merge from submit-queue (batch tested with PRs 57993, 58028). 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>.

 Add volumemetrics for glusterfs plugin.

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>



**What this PR does / why we need it**:

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

**Special notes for your reviewer**:

**Release note**:

```release-note

```
2018-01-09 19:39:29 -08:00
Kubernetes Submit Queue 389089846a
Merge pull request #57264 from zhangxiaoyu-zidif/fix-binary-check-cephfs
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>.

fix binary check for cephfs.go

**What this PR does / why we need it**:
unify the check method. see ref issue: #56479

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-01-09 13:26:54 -08:00
Humble Chirammal dc0b7da5b7 Add volumemetrics for glusterfs plugin.
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2018-01-09 22:44:33 +05:30
Kubernetes Submit Queue 8a9954d471
Merge pull request #56651 from sbezverk/block_rbd_volume_plugin
Automatic merge from submit-queue (batch tested with PRs 57784, 56651). 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>.

Adding support for Block Volume to rbd plugin

Adding support for Block Volume to rbd plugin

```release-note
Adding support for Block Volume type to rbd plugin.
```
2018-01-08 09:12:49 -08:00
andyzhangx 1bfb5d0670 add remount logic if original mount path is invalid 2018-01-08 06:01:42 +00:00
Serguei Bezverkhi 335c5d959f Adding support for Block Volume to rbd plugin 2018-01-05 23:56:37 -05:00
Kubernetes Submit Queue c02f54851f
Merge pull request #56315 from humblec/return-volid
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>.

Record volumeID in GlusterFS PV spec.
2018-01-04 13:26:12 -08:00
Kubernetes Submit Queue d8680a3c43
Merge pull request #57549 from andyzhangx/azurediskid-fix
Automatic merge from submit-queue (batch tested with PRs 56382, 57549). 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>.

fix azure disk not available issue when device name changed

**What this PR does / why we need it**:
There is possibility that device name(`/dev/sd*`) would change when attach/detach data disk in Azure VM according to  [Troubleshoot Linux VM device name change](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/troubleshoot-device-names-problems). 
And We did hit this issue, see customer [case](https://github.com/Azure/acs-engine/issues/1918). 
This PR would use `/dev/disk/by-id` instead of `/dev/sd*` for azure disk and `/dev/disk/by-id` would not change even device name changed.

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

**Special notes for your reviewer**:
In a customer [case](https://github.com/Azure/acs-engine/issues/1918), customer is unable to use azure disk in StatefulSet since /dev/sd* changed after detach/attach disk. 
we are using `/dev/sd*`(code is [here](https://github.com/kubernetes/kubernetes/blob/master/pkg/volume/azure_dd/azure_common_linux.go#L140)) to "mount -bind" k8s path, while `/dev/sd*` could be changed when VM is attach/detaching data disks, see [Troubleshoot Linux VM device name change](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/troubleshoot-device-names-problems)
And I have also checked related AWS, GCE code, they are using `/dev/disk/by-id/` other than `/dev/sd*`, see [aws code](https://github.com/kubernetes/kubernetes/blob/master/pkg/volume/aws_ebs/aws_util.go#L228)  
[gce code](https://github.com/kubernetes/kubernetes/blob/master/pkg/volume/gce_pd/gce_util.go#L278)

**Release note**:

```
fix azure disk not available when device name changed
```
/sig azure
/assign @rootfs 
@karataliu @brendandburns @khenidak
2018-01-04 06:40:34 -08:00
zhangxiaoyu-zidif ec6b9eb956 fix-binary-check-cephfs 2018-01-04 11:08:40 +08:00
Kubernetes Submit Queue 5e70562c6a
Merge pull request #57512 from cofyc/improve_rbd_highavailability
Automatic merge from submit-queue (batch tested with PRs 57572, 57512, 57770). 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>.

RBD Plugin: Pass monitors addresses in a comma-separed list instead of trying one by one.

**What this PR does / why we need it**:

In production, monitors may crash (or have a network problem), if we try monitors one by one, rbd
command will hang a long time (e.g. `rbd map -m <unconnectable_host_ip>`
on linux 4.4 timed out in 6 minutes) when trying a unconnectable monitor. This is unacceptable.

Actually, we can simply pass a comma-separated list monitor addresses to `rbd`
command utility. Kernel rbd/libceph modules will pick monitor randomly
and try one by one, `rbd` command utility succeed soon if there is a
good one in monitors list.

[Docs](http://docs.ceph.com/docs/jewel/man/8/rbd/#cmdoption-rbd-m) about `-m` option of `rbd` is wrong,  'rbd' utility simply pass '-m <mon>' parameter to kernel rbd/libceph modules, which
takes a comma-seprated list of one or more monitor addresses (e.g. ip1[:port1][,ip2[:port2]...]) in its first version in linux (see 602adf4002/net/ceph/ceph_common.c (L239)). Also, libceph choose monitor randomly, so we can simply pass all addresses without randomization (see 602adf4002/net/ceph/mon_client.c (L132)).

From what I saw, there is no need to iterate monitor hosts one by one.

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

**Special notes for your reviewer**:

Run `rbd map` against unconnectable monitor address logs on Linux 4.4:

```
root@myhost:~# uname -a
Linux myhost 4.4.0-62-generic #83-Ubuntu SMP Wed Jan 18 14:10:15 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
root@myhost:~# time rbd map kubernetes-dynamic-pvc-941ff4d2-b951-11e7-8836-049fca8e58df --pool <pool> --id <id> -m <unconnectable_host_ip> --key=<password>
rbd: sysfs write failed
2017-12-20 18:55:11.810583 7f7ec56863c0  0 monclient(hunting): authenticate timed out after 300
2017-12-20 18:55:11.810638 7f7ec56863c0  0 librados: client.<id> authentication error (110) Connection timed out
rbd: couldn't connect to the cluster!
In some cases useful info is found in syslog - try "dmesg | tail" or so.
rbd: map failed: (110) Connection timed out

real	6m0.018s
user	0m0.052s
sys	0m0.064s
```  

We can simply pass a comma-separated list of monitors, if there is a good one in them, `rbd map` succeed soon.

```
root@myhost:~# time rbd map kubernetes-dynamic-pvc-941ff4d2-b951-11e7-8836-049fca8e58df --pool <pool> --id <id> -m <unconnectable_host_ip>,<good_host_ip> --key=<password>

/dev/rbd3

real	0m0.426s
user	0m0.008s
sys	0m0.008s
```

**Release note**:

```release-note
NONE
```
2018-01-03 13:46:32 -08:00
Kubernetes Submit Queue b729472952
Merge pull request #57779 from jolestar/flex-volume-fix
Automatic merge from submit-queue (batch tested with PRs 57366, 57779). 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>.

Remove unused command waitfordetach from flex volume driver

**What this PR does / why we need it**:
Clean unused code.

**Special notes for your reviewer**:
See #35629
Original PR is https://github.com/kubernetes/kubernetes/pull/50754 , the PR's repo has bean deleted,so I create a new PR and merge upstream for test.
**Release note**:

```release-note
NONE
```
2018-01-03 12:09:34 -08:00
Kubernetes Submit Queue 6dfc4b38fb
Merge pull request #57702 from mlmhl/volume_resize_event
Automatic merge from submit-queue (batch tested with PRs 57702, 57128). 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>.

format error message and remove duplicated event for resize volume failure

**What this PR does / why we need it**:

1. The `operationGenerator.resizeFileSystem` method returns errors generated by `volumeToMount.GenerateErrorDetailed`, and the outside code(`operationGenerator.GenerateMountVolumeFunc`) uses `volumeToMount.GenerateError` to generate a new error again, which lead to the event message redundant and confused, we should use `volumeToMount.GenerateError` inside `operationGenerator.resizeFileSystem` only, in outside code is not necessary.

2. The `eventRecorderFunc` will record an event if `resizeFileSystem` returns an error, so we needn't to record event inside `resizeFileSystem` itself.

**Release note**:

```release-note
NONE
```

/sig storage
/kind enhancement
2018-01-03 08:30:30 -08:00
andyzhangx a4786fc8b0 prefer /dev/disk/azure/scsi1/ over by-id for azure disk
remove string conversion
2018-01-03 09:33:42 +00:00
jolestar eb35cee9f8 Remove unused command waitfordetach from flex volume driver 2018-01-03 16:02:31 +08:00
Kubernetes Submit Queue 7253c35ceb
Merge pull request #57675 from NickrenREN/expand-panic-fix
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>.

Fix ExpandController panic bug

If we want to expand a volume which is not supported for now, for example, in release 1.8, we want to expand RBD volume, controller-manager will panic.
We do not check if volume plugin is nil in `GenerateExpandVolumeFunc`  PTAL, thanks
```
Dec 27 23:32:26 master kube-controller-manager[4192]: /usr/local/go/src/runtime/asm_amd64.s:2337
Dec 27 23:32:26 master kube-controller-manager[4192]: panic: runtime error: invalid memory address or nil pointer dereference [recovered]
Dec 27 23:32:26 master kube-controller-manager[4192]:         panic: runtime error: invalid memory address or nil pointer dereference
Dec 27 23:32:26 master kube-controller-manager[4192]: [signal SIGSEGV: segmentation violation code=0x1 addr=0x38 pc=0x1a1e95a]
Dec 27 23:32:26 master kube-controller-manager[4192]: goroutine 1157 [running]:
Dec 27 23:32:26 master kube-controller-manager[4192]: k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/util/runtime.HandleCrash(0x0, 0x0, 0x0)
Dec 27 23:32:26 master kube-controller-manager[4192]:         /go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go:58 +0x111
Dec 27 23:32:26 master kube-controller-manager[4192]: panic(0x2cc10c0, 0x4e280c0)
Dec 27 23:32:26 master kube-controller-manager[4192]:         /usr/local/go/src/runtime/panic.go:491 +0x283
Dec 27 23:32:26 master kube-controller-manager[4192]: k8s.io/kubernetes/pkg/volume/util/operationexecutor.(*operationGenerator).GenerateExpandVolumeFunc(0xc420872780, 0xc42163b400, 0x4d7bee0, 0xc4208727b0, 0xc422187cd0, 0xc422187cd0, 0x40e84f, 0x10, 0x2a901a0)
Dec 27 23:32:26 master kube-controller-manager[4192]:         /go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/volume/util/operationexecutor/operation_generator.go:787 +0x2ba
Dec 27 23:32:26 master kube-controller-manager[4192]: k8s.io/kubernetes/pkg/volume/util/operationexecutor.(*operationExecutor).ExpandVolume(0xc420dfa7a0, 0xc42163b400, 0x4d7bee0, 0xc4208727b0, 0x1, 0x1)
Dec 27 23:32:26 master kube-controller-manager[4192]:         /go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/volume/util/operationexecutor/operation_executor.go:726 +0x5c
Dec 27 23:32:26 master kube-controller-manager[4192]: k8s.io/kubernetes/pkg/controller/volume/expand.(*syncResize).Sync(0xc420d09780)
Dec 27 23:32:26 master kube-controller-manager[4192]:         /go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/controller/volume/expand/sync_volume_resize.go:81 +0x324
Dec 27 23:32:26 master kube-controller-manager[4192]: k8s.io/kubernetes/pkg/controller/volume/expand.(*syncResize).Sync-fm()
Dec 27 23:32:26 master kube-controller-manager[4192]:         /go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/controller/volume/expand/sync_volume_resize.go:60 +0x2a
Dec 27 23:32:26 master kube-controller-manager[4192]: k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/util/wait.JitterUntil.func1(0xc42128a7b0)
Dec 27 23:32:26 master kube-controller-manager[4192]:         /go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:133 +0x5e
Dec 27 23:32:26 master kube-controller-manager[4192]: k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/util/wait.JitterUntil(0xc422187fb0, 0x6fc23ac00, 0x0, 0xc4202b6101, 0xc420070d80)
Dec 27 23:32:26 master kube-controller-manager[4192]:         /go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:134 +0xbd
Dec 27 23:32:26 master kube-controller-manager[4192]: k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/util/wait.Until(0xc42128a7b0, 0x6fc23ac00, 0xc420070d80)
Dec 27 23:32:26 master kube-controller-manager[4192]:         /go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:88 +0x4d
Dec 27 23:32:26 master kube-controller-manager[4192]: k8s.io/kubernetes/pkg/controller/volume/expand.(*syncResize).Run(0xc420d09780, 0xc420070d80)
Dec 27 23:32:26 master kube-controller-manager[4192]:         /go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/controller/volume/expand/sync_volume_resize.go:60 +0x53
Dec 27 23:32:26 master kube-controller-manager[4192]: created by k8s.io/kubernetes/pkg/controller/volume/expand.(*expandController).Run
Dec 27 23:32:26 master kube-controller-manager[4192]:         /go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/controller/volume/expand/expand_controller.go:154 +0x18e
Dec 27 23:32:26 master systemd[1]: kube-controller-manager.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Dec 27 23:32:26 master systemd[1]: kube-controller-manager.service: Unit entered failed state.
Dec 27 23:32:26 master systemd[1]: kube-controller-manager.service: Failed with result 'exit-code'.
```

**What this PR does / why we need it**:
Fix controller-manager panic

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

**Special notes for your reviewer**:
I find some other places where we do not check if volumeplugin is nil, so i modify the `Find...PluginBy...` functions too.
Just like these do:
https://github.com/kubernetes/kubernetes/blob/master/pkg/volume/plugins.go#L576
https://github.com/kubernetes/kubernetes/blob/master/pkg/volume/plugins.go#L602

**Release note**:
```release-note
NONE
```

/kind bug
/sig storage

/cc @gnufied 
@left2right
2018-01-02 22:29:39 -08:00
Yecheng Fu b196301b67 RBD Plugin: Fix comments and remove unnecessary locking code. 2018-01-03 12:43:30 +08:00
NickrenREN 74b197e7fe fix expand panic 2018-01-03 10:31:57 +08:00
mlmhl 2bf6b54f05 format error message and remove duplicated event for resize volume
failure
2018-01-03 10:28:54 +08:00
Kubernetes Submit Queue 462db17df0
Merge pull request #57475 from stmcginnis/iscsi_node_startup
Automatic merge from submit-queue (batch tested with PRs 57399, 57751, 57475). 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>.

iscsi: set node.startup to manual

If the default iSCSI node.startup is set to automatic, if there is a node failure,
any pods on that node will get rescheduled to another node. If the failed node is
later brought back up it will then try to log back in to any iSCSI sessions it had
prior to the failure, which may no longer exist or may be now in-use by the other
nodes.

It appears most platforms keep the open-iscsi default of node.startup-automatic.
But in case this system-wide setting has been changed, and just to be explicit, this
sets node.startup values for kubernetes controlled volumes to manual.

Fixes #21305

```release-note
iSCSI sessions managed by kubernetes will now explicitly set startup.mode to 'manual' to
prevent automatic login after node failure recovery. This is the default open-iscsi mode, so
this change will only impact users who have changed their startup.mode to be 'automatic'
in /etc/iscsi/iscsid.conf.
```
2018-01-02 10:57:57 -08:00
Jeff Grafton efee0704c6 Autogenerate BUILD files 2017-12-23 13:12:11 -08:00
Tim Hockin e9dd8a68f6 Revert k8s.gcr.io vanity domain
This reverts commit eba5b6092a.

Fixes https://github.com/kubernetes/kubernetes/issues/57526
2017-12-22 14:36:16 -08:00
andyzhangx 636a181d48 use /dev/disk/by-id instead of /dev/sd* for azure disk
change uuid to id
2017-12-22 08:26:12 +00:00
Kubernetes Submit Queue 5001198f0e
Merge pull request #57387 from andyzhangx/add-owners
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>.

add Dong Liu as approver and add OWNERS in credentialprovider

**What this PR does / why we need it**:

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

**Special notes for your reviewer**:

**Release note**:

```
none
```

/sig azure
/assign @brendandburns
2017-12-21 22:32:56 -08:00
Kubernetes Submit Queue 4562198ae6
Merge pull request #56925 from wenjun93/fix_rbd
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>.

fix rbd volume ConstructVolumeSpec

**What this PR does / why we need it**:
1. rbd plugin.ConstructVolumeSpec() construct volume spec with fake value, cause kubelet volume manager will create two volumesInUse in node Status.
2. change plugin.GetVolumeName(), create volumeName using rbd pool instead of monitors, because monitors is a group of IPs, which makes the volumeName too long. Also, this is to fit plugin.ConstructVolumeSpec() since makeGlobalPDName only uses rbd pool and image.

```
before fix:
volumesAttached:
  - devicePath: ""
    name: kubernetes.io/rbd/[xxxxxxx:6789 xxxxxxxxx:6789]:volume-9a106847-4def-4d1e-9603-4c7099b22a31
  volumesInUse:
  - 'kubernetes.io/rbd/[]:'
  - kubernetes.io/rbd/[xxxxxxx:6789 xxxxxxxxx:6789]:volume-9a106847-4def-4d1e-9603-4c7099b22a31

after fix:
volumesAttached:
  - devicePath: ""
    name: kubernetes.io/rbd/volumes:volume-9a106847-4def-4d1e-9603-4c7099b22a31
  volumesInUse:
  - kubernetes.io/rbd/volumes:volume-9a106847-4def-4d1e-9603-4c7099b22a31
2017-12-21 22:32:47 -08:00
Yecheng Fu 08d1c0b412 RBD Plugin: Pass monitors addresses in a comma-separated list instead of
trying one by one.

In production, monitors may crash (or have a network problem), if we try
monitors one by one, rbd command will hang a long time (e.g. `rbd map -m
<unconnectable_host_ip>` on linux 4.4 timed out in 6 minutes) when
trying a unconnectable monitor. This is unacceptable.

Actually, we can simply pass a comma-separed list monitor addresses
to `rbd` command utility. Kernel rbd/libceph modules will pick
monitor randomly and try one by one, `rbd` command utility succeed soon
if there is a good one in monitors list.
2017-12-21 21:02:25 +08:00
Sean McGinnis 9f97d61de4
Fixed space/tab indentation
Some lines had spaces for indentation instead of tabs.
2017-12-20 23:48:15 -06:00
Kubernetes Submit Queue 8f4f07fcc1
Merge pull request #57489 from brendandburns/errs
Automatic merge from submit-queue (batch tested with PRs 57215, 57489). 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>.

Print/return the text from a number of errors that were silent before.

@rootfs @andyzhangx @khendiak @feiskyer
2017-12-20 18:31:34 -08:00
Kubernetes Submit Queue 21cae16bda
Merge pull request #56742 from zouyee/patch-12
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>.

outdent err block

**What this PR does / why we need it**:

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

**Special notes for your reviewer**:

**Release note**:

```NONE

```
2017-12-20 16:47:34 -08:00
Brendan Burns da6cc5d7a5 Print/return the text from a number of errors that were silent before. 2017-12-21 00:25:46 +00:00
Sean McGinnis 69a2deea9c iscsi: set node.startup to manual
If the default iSCSI node.startup is set to automatic, if there is a node failure,
any pods on that node will get rescheduled to another node. If the failed node is
later brought back up it will then try to log back in to any iSCSI sessions it had
prior to the failure, which may no longer exist or may be now in-use by the other
nodes.

It appears most platforms keep the open-iscsi default of node.startup-automatic.
But in case this system-wide setting has been changed, and just to be explicit, this
sets node.startup values for kubernetes controlled volumes to manual.

Closes issue #21305
2017-12-20 15:37:22 -06:00
Kubernetes Submit Queue 7ede2a012e
Merge pull request #56600 from edisonxiang/fixvolumesize
Automatic merge from submit-queue (batch tested with PRs 56600, 56814). 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>.

Fix volume size allocation in gcd_pd

**What this PR does / why we need it**:
GCE PDs are allocated in chunks of GBs not GiB but CreateVolume function incorrectly creates volume in chunks of GiB.  
1 GiB = 1024 * 1024 * 1024 Bytes
1 GB = 1000 * 1000 * 1000 Bytes

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

**Special notes for your reviewer**:

**Release note**:

```release-note
Fixed dynamic provisioning of GCE PDs to round to the next GB instead of GiB
```
2017-12-19 14:08:38 -08:00
zouyee b6e1fecde7 check function return err 2017-12-19 23:24:35 +08:00
andyzhangx 8d99c55bba add Dong Liu as approver and add OWNERS in credentialprovider 2017-12-19 09:31:43 +00:00
Kubernetes Submit Queue 8d24ce1137
Merge pull request #57367 from feiskyer/owners
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>.

Add azure owners

**What this PR does / why we need it**:

Add azure owners and sort owner files.

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

**Special notes for your reviewer**:

cc @khenidak @andyzhangx 

**Release note**:

```release-note
NONE
```

/assign @brendandburns
2017-12-18 21:47:08 -08:00
Kubernetes Submit Queue 5b55f614d0
Merge pull request #57260 from davidz627/attachMountLogFix
Automatic merge from submit-queue (batch tested with PRs 55475, 57155, 57260, 57222). 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>.

Improved mount/attach error logging and added attach event.

Fixed kubelet error message to be more descriptive. Added Attach success event for help in debugging.

The attach event is helpful when the node may not have the correct information about attachment status, it allows the user to see whether the Attach was run at all. If there is no success/failure attach message we can infer that there was no attach started at all.

Fixes #57217
2017-12-18 19:45:43 -08:00
Kubernetes Submit Queue 199b110f72
Merge pull request #57155 from mtanino/issue/57153
Automatic merge from submit-queue (batch tested with PRs 55475, 57155, 57260, 57222). 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>.

FC plugin: Update detach logic for block volume if devicePath is empty

**What this PR does / why we need it**:
Currently, FC plugin doesn't have a chance to update attached volume's devicePath into volume object.
Therefore, at the volume teardown path, FC plugin gets empty devicePath from kubelet then fails volume detach operations especially volumeMode is Block.

This PR adds logic to obtain devicePath from global map path if passed devicePath from kubelet is empty.

I think this PR isn't complete solution but is a workaround to avoid teardown failures. In order to solve the root cause, we need to discuss the way to update devicePath at kubelet side again.(https://github.com/kubernetes/kubernetes/pull/54264)

If volume is managed by multipath, FC plugin fails to detach volume from kubelet node on both Filesystem and Block cases. This PR also fix the problem.

**Which issue(s) this PR fixes** : Fixes #57153

**Special notes for your reviewer**:
@rootfs @jsafrane 

**Release note**:

```
NONE
```
2017-12-18 19:45:41 -08:00
Pengfei Ni 477def0b4d Add azure owners 2017-12-19 11:42:02 +08:00
edisonxiang d9dc64227f using RoundUpToGB function directly 2017-12-19 09:32:15 +08:00
Kubernetes Submit Queue c0d005c832
Merge pull request #57293 from linyouchong/linyouchong-20171218
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>.

fix accessmode mapping error

What this PR does / why we need it:
fix accessmode mapping error in csi_client.go

`// can be mounted in read-only mode to many hosts`
`ReadOnlyMany PersistentVolumeAccessMode = "ReadOnlyMany"`

I think api.ReadOnlyMany should be mapping to csipb.VolumeCapability_AccessMode_MULTI_NODE_READER_ONLY

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

Special notes for your reviewer:
NONE

Release note:
NONE
2017-12-18 15:47:27 -08:00
Tim Hockin eba5b6092a Use k8s.gcr.io vanity domain for container images 2017-12-18 09:18:34 -08:00
linyouchong 5bc7e2212a fix accessmode mapping error 2017-12-18 17:51:38 +08:00
Kubernetes Submit Queue a73aee954f
Merge pull request #56872 from davidz627/logImprovement
Automatic merge from submit-queue (batch tested with PRs 56375, 56872, 57053, 57165, 57218). 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>.

Improved event generation in volume mount,attach, and extend operations

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

refactored mount, attach, extend operation's so that all failures generate events and event generation is more consistent.

```release-note
Improved event generation in volume mount, attach, and extend operations
```
2017-12-17 05:33:41 -08:00
edisonxiang d80dbe7fea Fix GCE CreateVolume allocates in chunks of GiB incorrectly 2017-12-17 19:43:37 +08:00
Kubernetes Submit Queue a28e708ec6
Merge pull request #57091 from humblec/volume-mode
Automatic merge from submit-queue (batch tested with PRs 57148, 57123, 57091, 57141, 57131). 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>.

Add VolumeMode in GlusterFS PV spec.

This ensures that GlusterFS pvs are file backed storage.

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>



**What this PR does / why we need it**:

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

**Special notes for your reviewer**:

**Release note**:

```release-note

```
2017-12-16 21:00:46 -08:00
Kubernetes Submit Queue 5669c4c8bb
Merge pull request #57123 from linyouchong/linyouchong-20171213
Automatic merge from submit-queue (batch tested with PRs 57148, 57123, 57091, 57141, 57131). 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>.

fix incorrect log in csi_plugin

What this PR does / why we need it:
fix incorrect log in csi_plugin_test.go and csi_mounter.go

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

Special notes for your reviewer:
NONE

Release note:
NONE
2017-12-16 21:00:44 -08:00
Kubernetes Submit Queue ea55d70ee7
Merge pull request #56921 from andyzhangx/flexvolume-windows
Automatic merge from submit-queue (batch tested with PRs 56650, 55813, 56911, 56921, 56871). 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>.

enable flexvolume on Windows node

**What this PR does / why we need it**:
enable flexvolume on Windows node:
current PodVolumeDir is like 
`\var\lib\kubelet\pods\f54c5a74-da63-11e7-b71a-000d3a02c330\volumes\test~hostpath.cmd\flextest`
which is a unix path, with this PR, PodVolumeDir in **windows** kubelet  will be converted into like
`c:\var\lib\kubelet\pods\f54c5a74-da63-11e7-b71a-000d3a02c330\volumes\test~hostpath.cmd\flextest` 

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

**Special notes for your reviewer**:
Detailed steps about how to use flexvolume on Windows with this PR:
https://github.com/andyzhangx/Demo/tree/master/windows/flexvolume

**Release note**:

```
enable flexvolume on Windows node
```

/sig windows
2017-12-16 12:10:51 -08:00
Kubernetes Submit Queue 88ae1ef52b
Merge pull request #56658 from wenjun93/master
Automatic merge from submit-queue (batch tested with PRs 56480, 56675, 56624, 56648, 56658). 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>.

minor fix error typo of rbd volume teardown

fix typo in rbd volume plugin `diskTearDown`
2017-12-16 03:24:51 -08:00
Humble Chirammal 95bece666d Record volumeID in GlusterFS PV spec.
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2017-12-16 10:36:14 +05:30