Commit Graph

26144 Commits (b13263eeb3384e1857e7db46132d7fcc9ea66300)

Author SHA1 Message Date
Kubernetes Submit Queue 6937763331
Merge pull request #57351 from nicksardo/auto-sub
Automatic merge from submit-queue (batch tested with PRs 57351, 55654). 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>.

GCE: Get automatically created subnetwork if none is specified for auto network

Fixes #57350 

**Release note**:
```release-note
GCE: Fixes ILB creation on automatic networks with manually created subnetworks.
```
2017-12-22 23:11:36 -08:00
Kubernetes Submit Queue 5bf00d9a53
Merge pull request #55669 from yuexiao-wang/apis-validate
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 unit test for ValidateStatefulSet

Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>



**What this PR does / why we need it**:
add unit test for ValidateStatefulSetSpec

**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
NONE
```
2017-12-22 18:30:15 -08:00
Kubernetes Submit Queue c80ff48a9f
Merge pull request #57573 from thockin/rollback-gcr-vanity
Automatic merge from submit-queue (batch tested with PRs 57566, 57573). 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>.

Revert k8s.gcr.io vanity domain

This reverts commit eba5b6092a (#54174)

Fixes https://github.com/kubernetes/kubernetes/issues/57526

Will bring this back once we fix the SSL issue.

```release-note
NONE
```
2017-12-22 17:20:33 -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
Bowei Du 301488b235 Expose all GCE cloud proivder services versions, not just the GA API 2017-12-22 11:24:10 -08:00
Pengfei Ni 11fae2186b Add fake clients for VirtualMachineScaleSetsClient and VirtualMachineScaleSetVMsClient 2017-12-22 15:10:30 +08:00
Pengfei Ni 068564a876 Add generic interface for VirtualMachineScaleSetsClient and VirtualMachineScaleSetVMsClient 2017-12-22 15:10:20 +08: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
Kubernetes Submit Queue f4d3f4dcc0
Merge pull request #57488 from mtaufen/kc-bootstrap-refactor
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>.

Refactor kubelet config controller bootstrap process

This makes the bootstrap feel much more linear and as a result it is easier to read.

Also simplifies status reporting for local config.

Fixes: #57487

```release-note
NONE
```
2017-12-21 17:53:04 -08:00
Michael Taufen 6ee191ab74 Refactor kubelet config controller bootstrap process
This makes the bootstrap feel much more linear and as a result it is
easier to read.

Also simplifies status reporting for local config.
2017-12-21 15:24:56 -08:00
Kubernetes Submit Queue d5e59f1db4
Merge pull request #57490 from tianshapjq/cleanup-useless-func-pkg/client/conditions/conditions.go
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>.

cleanup useless functions and variables

**What this PR does / why we need it**:
cleanup useless functions and variables in pkg/client/conditions/conditions.go

**Release note**:

```release-note

```NONE
2017-12-21 14:31:16 -08:00
Kubernetes Submit Queue 02be3eb07c
Merge pull request #53557 from yolo3301/az_lb_pipid
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>.

Allow use resource ID to specify public IP address in azure_loadbalancer

**What this PR does / why we need it**: Currently the Azure load balancer assumes that a Public IP address is in the same resource group as the cluster. This is not necessarily true in all environments, in addition to accepting a Public IP, we should allow an annotation to the `Service` object that indicates what resource group the IP is present in.

**Which issue this PR fixes**: fixes #53274 #52129

**Special notes for your reviewer**: *first time golang user, please forgive the amateurness*

Release note
```release-note
Allow use resource ID to specify public IP address in azure_loadbalancer
```
2017-12-21 12:11:31 -08:00
Tomer Froumin 80cee97f0c Fixed typos and made documentation more consistent 2017-12-21 15:49:02 +02:00
Kubernetes Submit Queue fd826d6e2d
Merge pull request #57257 from brendandburns/typo
Automatic merge from submit-queue (batch tested with PRs 57257, 55442). 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 a typo and improve some documentation.

Fix a typo and add some better help docs.
2017-12-20 23:56:47 -08:00
Kubernetes Submit Queue 1bcf0b0a22
Merge pull request #57484 from brendandburns/azure
Automatic merge from submit-queue (batch tested with PRs 57282, 57484). 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 a bug in validating node existence.

**What this PR does / why we need it**:
Fixes an bug where if an error was returned that was not an `autorest.DetailedError` we would return `"not found", nil` which would result in Nodes going `NotReady`

**Which issue(s) this PR fixes** 
Fixes #57483

**Release note**:
```release-note
Fixes an bug where if an error was returned that was not an `autorest.DetailedError` we would return `"not found", nil` which caused nodes to go to `NotReady` state.
```

@feiskyer @khendiak
2017-12-20 23:06:41 -08:00
Kubernetes Submit Queue f3da0d58ef
Merge pull request #57282 from stewart-yu/removeDeadCodeInCloudProvider
Automatic merge from submit-queue (batch tested with PRs 57282, 57484). 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 dead code in cloudprovider

**What this PR does / why we need it**:
Remove dead code in `cloudprovider`

**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
NONE
```
2017-12-20 23:06:38 -08:00
Kubernetes Submit Queue 263fa7856a
Merge pull request #57429 from m1093782566/syscall-unix
Automatic merge from submit-queue (batch tested with PRs 57292, 56274, 57435, 57438, 57429). 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>.

replace syscall with sys/unix pkg in ipvs/netlink call

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

This PR replaces syscall with sys/unix pkg in ipvs/netlink call as the Go doc for syscall says:

	NOTE: This package is locked down.
	Code outside the standard Go repository should be migrated to use the corresponding package in the golang.org/x/sys repository.
	That is also where updates required by new systems or versions should be applied.
	See https://golang.org/s/go1.4-syscall for more information.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```

/assign @thockin @brendandburns
2017-12-20 22:16:51 -08:00
Kubernetes Submit Queue 070f946476
Merge pull request #57438 from m1093782566/ipset-util-test
Automatic merge from submit-queue (batch tested with PRs 57292, 56274, 57435, 57438, 57429). 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>.

Implement FakeIPSet so that can add tests in IPVS proxier

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

Implement FakeIPSet so that can add tests in IPVS proxier - the tests can run everywhere(linux, mac, windows...).

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```

/assign @thockin @brendandburns
2017-12-20 22:16:49 -08:00
Kubernetes Submit Queue d3ea100ad9
Merge pull request #57292 from m1093782566/ipvs-ownerfile
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 pkg/util/ipvs OWNERS file

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

This PR adds `pkg/util/ipvs/OWNERS` file, including two people: @thockin, @m1093782566(me).

I created `pkg/util/ipvs` package for wrapping netlink IPVS call, which is used by IPVS proxier. Because reviewing this package needs some IPVS background knowledge, I create this OWNERS file for efficient code review. And, I am willing to share code review burden of this util package :)

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```

/sig network
2017-12-20 21:58:58 -08: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
Nick Sardo c893ce8c95 Get automatically created subnetwork if none is specified 2017-12-20 17:48:32 -08:00
Kubernetes Submit Queue 2a1cdfffaa
Merge pull request #57221 from mtaufen/kc-event
Automatic merge from submit-queue (batch tested with PRs 57434, 57221, 57417, 57474, 57481). 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>.

Send an event just before the Kubelet restarts to use a new config

**What this PR does / why we need it**:
This PR makes the Kubelet send events for configuration changes. This makes it much easier to see a recent history of configuration changes for the Kubelet. 

**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 #56895

**Special notes for your reviewer**:

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

/cc @dchen1107 @liggitt @dashpole
2017-12-20 17:42:37 -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 c0eee2950f Fix a bug in validating node existence. 2017-12-21 00:30:16 +00: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
Kubernetes Submit Queue 1cfbd3c45a
Merge pull request #57349 from deads2k/quota-01-tighten
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 watch to requirements for quota-able resources

Since we use informers, if you can't be watched, you can't be quota'ed.
2017-12-20 14:52:25 -08:00
Kubernetes Submit Queue 767fde1a8e
Merge pull request #57463 from dims/fix-accessing-private-docker-registries
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 problem accessing private docker registries

**What this PR does / why we need it**:
In 027c8b9ef2, we added code to
move from .dockercfg to config.json file. But we forgot to use
the right secret type and the key to store the base64'ed creds

**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 #57427 #57273

**Special notes for your reviewer**:

**Release note**:

```release-note
Fixes issue creating docker secrets with kubectl 1.9 for accessing docker private registries.
```
2017-12-20 13:18:36 -08:00
Michael Taufen d5d7d6d684 Send an event just before the Kubelet restarts to use a new config 2017-12-20 13:02:55 -08:00
Kubernetes Submit Queue 3d652cae03
Merge pull request #57451 from k82cn/rename_func
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>.

Renamed func name according to TODO.

```release-note
None
```
2017-12-20 10:06:15 -08:00
Davanum Srinivas 6738da1d28 Fix problem accessing private docker registries
In 027c8b9ef2, we added code to
move from .dockercfg to config.json file. But we forgot to use
the right secret type and the key to store the base64'ed creds
2017-12-20 12:37:40 -05:00
Kubernetes Submit Queue 7706957324
Merge pull request #57384 from mindprince/deprecated-accelerators
Automatic merge from submit-queue (batch tested with PRs 56681, 57384). 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>.

Deprecate the alpha Accelerators feature gate.

Encourage people to use DevicePlugins instead.

/kind cleanup

Related to https://github.com/kubernetes/features/issues/192 and https://github.com/kubernetes/features/issues/368

**Release note**:
```release-note
The alpha Accelerators feature gate is deprecated and will be removed in v1.11. Please use device plugins instead. They can be enabled using the DevicePlugins feature gate.
```

/sig node
/sig scheduling
/area hw-accelerators
2017-12-20 04:45:35 -08:00
Kubernetes Submit Queue c273ad5aa5
Merge pull request #56681 from stewart-yu/deleteWhiteSpace
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>.

Do not log trailing whitespace

**What this PR does / why we need it**:
Follow [https://github.com/kubernetes/kubernetes/pull/56409](https://github.com/kubernetes/kubernetes/pull/56409)

**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
NONE
```
2017-12-20 04:22:05 -08:00
Da K. Ma fe6bfd1dc0 Renamed func name according to TODO. 2017-12-20 18:13:48 +08:00
tianshapjq 7d31b44bbe cleanup useless functions and variables 2017-12-20 17:10:31 +08:00
m1093782566 0f201037bd update bazel BUILD 2017-12-20 16:02:14 +08:00
m1093782566 15f427ac2c fix ipvs/proxier_test.go compile error 2017-12-20 15:54:07 +08:00
m1093782566 6a5990caa0 add tests in ipvs/ipset_test.go 2017-12-20 15:53:43 +08:00
m1093782566 c26912cd1e update bazel BUILD 2017-12-20 10:57:58 +08:00
m1093782566 cddc479904 replace syscall with sys/unix pkg 2017-12-20 10:08:09 +08:00
m1093782566 b4a47bc228 implement fakeIPSet in ipset util 2017-12-20 09:49:14 +08: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
Rohit Agarwal f52628db60 Deprecate the alpha Accelerators feature gate.
Encourage people to use DevicePlugins instead.
2017-12-19 13:38:56 -08:00
Kubernetes Submit Queue 5e4ff8ac54
Merge pull request #52371 from cheftako/external
Automatic merge from submit-queue (batch tested with PRs 56716, 52371). 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>.

Separate loop and plugin control

**What this PR does / why we need it**: Separate loop and plugin control in the kube-controller-manager.
Adding an "--external-plugin" flag to specify a plugin to load when
cloud-provider is set to "external". Flag has no effect currently
when the cloud-provider is not set to external. The expectation is
that the cloud provider and external plugin flags would go away once
all cloud providers are on stage 2 cloud-controller-manager solutions.

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

**Special notes for your reviewer**:

**Release note**:
```release-note Added --external-plugin flag to kube-controller-manager to determine plugin when --cloud-provider is set to external.
```
2017-12-19 12:55:38 -08:00
Kubernetes Submit Queue 56acf19e6d
Merge pull request #57303 from niuzhenguo/url-check
Automatic merge from submit-queue (batch tested with PRs 57400, 57403, 57303). 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>.

Restrict url conditions when run kubectl create with --raw

**What this PR does / why we need it**:
Currently when run kubectl create with --raw, it will raise "--raw cannot read from a url " if the filename has prefix "http", which is not proper as we may have filenames like "httptest" or similar.

This PR restrict the URL check conditions.

**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 #57370 

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-12-19 11:27:37 -08:00
Kubernetes Submit Queue 622386e531
Merge pull request #56077 from p0lyn0mial/kubectl_generic_scaler
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>.

adds generic scaler to kubectl

**What this PR does / why we need it**:
this PR adds generic scaler to kubectl. The implementation uses a polymorphic scale client capable of operating against scale subresources which can be found here https://github.com/kubernetes/client-go/tree/master/scale

**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 #

**Release note**:

```release-note
NONE
```
2017-12-19 06:27:21 -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