Commit Graph

68105 Commits (c7e4466873ba244f510856e662d04d1e10b228cd)

Author SHA1 Message Date
Kubernetes Submit Queue af8292a0d6
Merge pull request #66098 from apelisse/improve-verify-generated-docs
Automatic merge from submit-queue (batch tested with PRs 66098, 66389, 66400, 66413, 66378). 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>.

verify-generated-docs: Use exit code rather than comparison to empty …

…string

Checking the exit code rather than the empty string has the advantage
that you can identify what was found (comparison consumes the string, so
it's not printed). It makes debugging much easier when something is wrong.

One of my pull-request is failing saying that I need to run update, but it keeps saying that even after I ran update. And since I can't see what's wrong, it's quite hard to debug.



**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
NONE
```
2018-07-20 05:30:04 -07:00
andyzhangx a7e328c211 fix acr sp access issue 2018-07-20 08:39:31 +00:00
Kubernetes Submit Queue b68c9440da
Merge pull request #66242 from feiskyer/instance-az
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 initial availability zones support for Azure nodes

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

The first part of [Azure Availability Zone feature](https://github.com/kubernetes/features/issues/586).

This PR adds initial availability zone (AZ) support for Azure nodes. With this PR, Azure nodes with AZ will have label `failure-domain.beta.kubernetes.io/zone=<region>-<zoneID>`, e.g. `southeastasia-1`.

It also updates instance metadata api-version to 2017-12-01, which is required for AZ.

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

VirtualMachineScaleSetVM doesn't have AZ info yet. It will be supported later after new Azure Go SDK releases.

**Release note**:

```release-note
Azure nodes with availability zone now will have label `failure-domain.beta.kubernetes.io/zone=<region>-<zoneID>`.
```

/kind feature
/sig azure

/assign @brendandburns @khenidak @andyzhangx
2018-07-20 00:18:47 -07:00
Solly Ross 9aa916d1e9 Update Godeps after removing influx tests
When the influx tests were removed, it should have also removed the
influx deps from Godeps.  This does that.
2018-07-19 21:12:11 -04:00
Jordan Liggitt bd559e247c
tolerate missing column headers in server-side print output 2018-07-19 20:55:01 -04:00
Jordan Liggitt dc5f615152
Send correct headers for pod printing 2018-07-19 20:55:00 -04:00
Kubernetes Submit Queue 795b7da8b0
Merge pull request #65714 from resouer/fix-63784
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>.

Re-design equivalence class cache to two level cache

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

The current ecache introduced a global lock across all the nodes, and this patch tried to assign ecache per node to eliminate that global lock. The improvement of scheduling performance and throughput are both significant.

**CPU Profile Result** 

Machine: 32-core 60GB GCE VM

1k nodes 10k pods bench test (we've highlighted the critical function):

1. Current default scheduler with ecache enabled:
![equivlance class cache bench test 001](https://user-images.githubusercontent.com/1701782/42196992-51b0a32a-7eb3-11e8-89ee-f13383091a00.jpeg)
2. Current default scheduler with ecache disabled:
![equivlance class cache bench test 002](https://user-images.githubusercontent.com/1701782/42196993-51eb0c68-7eb3-11e8-9326-1a7762072863.jpeg)
3. Current default scheduler with this patch and ecache enabled:
![equivlance class cache bench test 003](https://user-images.githubusercontent.com/1701782/42196994-52280ed8-7eb3-11e8-8100-690e2af2cf2f.jpeg)

**Throughput Test Result** 

1k nodes 3k pods `scheduler_perf` test: 

Current default scheduler, ecache is disabled:
```bash
Minimal observed throughput for 3k pod test: 200
PASS
ok      k8s.io/kubernetes/test/integration/scheduler_perf    30.091s
```
With this patch, ecache is enabled:
```bash
Minimal observed throughput for 3k pod test: 556
PASS
ok      k8s.io/kubernetes/test/integration/scheduler_perf    11.119s
```

**Design and implementation:**

The idea is: we re-designed ecache into a "two level cache". 

The first level cache holds the global lock across nodes and sync is needed only when node is added or deleted, which is of much lower frequency. 

The second level cache is assigned per node and its lock is restricted to per node level, thus there's no need to bother the global lock during whole predicate process cycle. For more detail, please check [the original discussion](https://github.com/kubernetes/kubernetes/issues/63784#issuecomment-399848349).

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

**Special notes for your reviewer**:

~~Tagged as WIP to make sure this does not break existing code and tests, we can start review after CI is happy.~~

**Release note**:

```release-note
Re-design equivalence class cache to two level cache
```
2018-07-19 16:16:02 -07:00
Christoph Blecker 5fcad99ee6
Only build generators for building platform 2018-07-19 15:08:11 -07:00
Kubernetes Submit Queue 24fc97a828
Merge pull request #66249 from deads2k/cli-03-restmapper
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>.

fill in normal restmapping info with the legacy guess

@DirectXMan12 noted this here: https://github.com/kubernetes/kubernetes/issues/65718#issuecomment-401915805

The code does look wrong. This tries to fix it up

@kubernetes/sig-api-machinery-bugs 

```release-note
NONE
```
2018-07-19 14:38:58 -07:00
David Zhu 8e85b78652 Changed subpath test pod to use standard 5 minute timeout wait function,
bumped from 1 minute
2018-07-19 14:34:07 -07:00
David Zhu 01f22dd4bf Modified HTML injector to have more distinguishable names for debugging ease 2018-07-19 14:32:42 -07:00
David Eads 7276aa0c7a indicate which scheme has conflicting data 2018-07-19 16:48:44 -04:00
Hemant Kumar 45b8107378 Fix volume limit for EBS on m5 and c5 instances 2018-07-19 16:27:52 -04:00
Nick Sardo 808bc227ae Return correct error type and HTTP Status code for operation errors 2018-07-19 13:18:29 -07:00
Joe Julian 62b9d37866 extend timeout to workaround slow arm64 math
The math/big functions are slow on arm64. There is improvement coming
with go1.11 but in the mean time if a server uses rsa certificates on
arm64, the math load for the multitude of watches over taxes the ability
of the processor and the TLS connections time out. Retries will also not
succeed and serve to exacerbate the problem.

By extending the timeout, the TLS connections will eventually be
successful and the load will drop.

Fixes #64649
2018-07-19 10:52:46 -07:00
Kubernetes Submit Queue 8770d12494
Merge pull request #65572 from yue9944882/fixes-admission-operation-mismatch-for-create-on-update
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 operation for "create on update"

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

Set operation to `admission.Create` for create-on-update requests.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
Checks CREATE admission for create-on-update requests instead of UPDATE admission
```
2018-07-19 10:42:54 -07:00
Kubernetes Submit Queue d08e68e759
Merge pull request #65849 from CaoShuFeng/debuggingRoundTripper
Automatic merge from submit-queue (batch tested with PRs 65771, 65849). 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 kube-aggregator dailer

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


**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
NONE
```
2018-07-19 09:29:04 -07:00
Kubernetes Submit Queue d2cc34fb07
Merge pull request #65771 from smarterclayton/untyped
Automatic merge from submit-queue (batch tested with PRs 65771, 65849). 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 a new conversion path to replace GenericConversionFunc

reflect.Call is very expensive. We currently use a switch block as part of AddGenericConversionFunc to avoid the bulk of top level a->b conversion for our primary types which is hand-written. Instead of having these be handwritten, we should generate them.

The pattern for generating them looks like:

```
scheme.AddConversionFunc(&v1.Type{}, &internal.Type{}, func(a, b interface{}, scope conversion.Scope) error {
  return Convert_v1_Type_to_internal_Type(a.(*v1.Type), b.(*internal.Type), scope)
})
```

which matches AddDefaultObjectFunc (which proved out the approach last year). The
conversion machinery should then do a simple map lookup based on the incoming types and invoke the function.  Like defaulting, it's up to the caller to match the types to arguments, which we do by generating this code.  This bypasses reflect.Call and in the future allows Golang mid-stack inlining to optimize this code.

As part of this change I strengthened registration of custom functions to be generated instead of hand registered, and also strengthened error checking of the generator when it sees a manual conversion to error out.  Since custom functions are automatically used by the generator, we don't really have a case for not registering the functions.

Once this is fully tested out, we can remove the reflection based path and the old registration methods, and all conversion will work from point to point methods (whether generated or custom).

Much of the need for the reflection path has been removed by changes to generation (to omit fields) and changes to Go (to make assigning equivalent structs easy).

```release-note
NONE
```
2018-07-19 09:29:00 -07:00
Kubernetes Submit Queue 7f912af75c
Merge pull request #59383 from tanshanshan/fix-little3
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>.

Replace info log with warn log

**What this PR does / why we need it**:
Replace info log with warn log
**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 #59356 

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-07-19 07:28:44 -07:00
Fabio Bertinatto a15cc29442 Add extra metrics for PV Controller
Specifically:

* Total provision time
* Total PV deletion time
* Number of times PV provisioning failed
* Number of times PV deletion failed
2018-07-19 15:36:37 +02:00
Fabio Bertinatto 97e63985dc Return error in provisionClaimOperation 2018-07-19 15:27:40 +02:00
Seungcheol Ko 43f805b7bd Fix a typo in csiPlugin comment 2018-07-19 21:01:09 +09:00
Kubernetes Submit Queue 357decc9db
Merge pull request #63666 from xchapter7x/pkg-scheduler-factory
Automatic merge from submit-queue (batch tested with PRs 58487, 63666). 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>.

use subtest for table units (pkg/scheduler/factory)

**What this PR does / why we need it**: Update scheduler's unit table tests to use subtest

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

**Special notes for your reviewer**:
breaks up PR: https://github.com/kubernetes/kubernetes/pull/63281
/ref #63267

**Release note**:

```release-note
This PR will leverage subtests on the existing table tests for the scheduler units.
Some refactoring of error/status messages and functions to align with new approach.

```
2018-07-19 02:09:06 -07:00
Kubernetes Submit Queue 7b1940b0d3
Merge pull request #58487 from bkochendorfer/kubectl-cert-deny-message
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>.

Update kubectl certificate deny message

**What this PR does / why we need it**:
Updates message for the `kubectl certificate deny` command to `denied` instead of `approved`.

**Release note**:
```release-note
NONE
```
2018-07-19 02:06:21 -07:00
Patrice Peterson a20ff91c4c kubeadm: stop setting UID in the kubelet ConfigMap
Fixes #921.
2018-07-19 10:34:05 +02:00
Cao Shufeng dc07d27d8b fix kube-aggregator dailer 2018-07-19 14:40:33 +08:00
Kubernetes Submit Queue 5299b6c6b8
Merge pull request #66319 from tallclair/psp-path
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 & fix PodSecurityPolicy field path usage

I noticed the field paths were incorrect for a bunch of PodSecurityPolicy validation errors. This PR fixes the errors, and makes it more explicit what the paths are pointing to in some cases.

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

/kind cleanup
/sig auth
2018-07-18 22:13:50 -07:00
linyouchong 5e77245b0d GetMasterHost should not return port 2018-07-19 09:30:57 +08:00
Lantao Liu 330ed52747 Update crictl to v1.11.1.
Signed-off-by: Lantao Liu <lantaol@google.com>
2018-07-19 01:02:53 +00:00
Tim Allclair 5ace0f03d8
Cleanup & fix PodSecurityPolicy field path usage 2018-07-18 17:47:32 -07:00
Kubernetes Submit Queue afcc156806
Merge pull request #66350 from aveshagarwal/master-rhbz-1601378
Automatic merge from submit-queue (batch tested with PRs 66175, 66324, 65828, 65901, 66350). 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>.

Start cloudResourceSyncsManager before getNodeAnyWay (initializeModules) to avoid kubelet getting stuck in retrieving node addresses from a cloudprovider.

**What this PR does / why we need it**:
This PR starts cloudResourceSyncsManager before getNodeAnyWay (initializeModules) otherwise kubelet gets stuck in setNodeAddress->kl.cloudResourceSyncManager.NodeAddresses() (https://github.com/kubernetes/kubernetes/blob/master/pkg/kubelet/kubelet_node_status.go#L470) forever retrieving node addresses from a cloud provider, and due to this cloudResourceSyncsManager will not be started at all.

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

@ingvagabund @derekwaynecarr @sjenning @kubernetes/sig-node-bugs
2018-07-18 16:42:22 -07:00
Kubernetes Submit Queue ab00c609ee
Merge pull request #65901 from jbartosik/hpa-improv-refactor-replica-calc-test
Automatic merge from submit-queue (batch tested with PRs 66175, 66324, 65828, 65901, 66350). 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>.

Hpa improv refactor replica calc test

**What this PR does / why we need it**: prepareTestClient generates 4 fake clients, using replicaCalcTestCase object. This PR extracts a separate helper for generating each fake independently.

**Which issue(s) this PR fixes**

**Special notes for your reviewer**:

**Release note**:
```release-note
NONE
```
2018-07-18 16:42:18 -07:00
Kubernetes Submit Queue 3f191aef8b
Merge pull request #65828 from jbartosik/hpa-improv-refactor
Automatic merge from submit-queue (batch tested with PRs 66175, 66324, 65828, 65901, 66350). 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>.

Chop computeReplicasForMetrics to smaller pieces

Split computeReplicasForMetrics function into smaller pieces.


**Release note**:
```release-note
NONE
```
2018-07-18 16:42:14 -07:00
Kubernetes Submit Queue 041ba05514
Merge pull request #66324 from krunaljain/bugfix/revert_pd_size_rounding_to_GB
Automatic merge from submit-queue (batch tested with PRs 66175, 66324, 65828, 65901, 66350). 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>.

Fixing E2E tests for disk resizing

What this PR does / why we need it:
This PR fixed the E2E test failure due to [this](539b3693f4) commit. The case of disk resizing was not handled which is fixed in this commit. 

Issues Fixed:
[#66295
](https://github.com/kubernetes/kubernetes/issues/66295)
```release-note
none
```
2018-07-18 16:42:11 -07:00
Kubernetes Submit Queue 7b8651d912
Merge pull request #66175 from DirectXMan12/tests/remove-influx-test
Automatic merge from submit-queue (batch tested with PRs 66175, 66324, 65828, 65901, 66350). 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 the Heapster/InfluxDB test

Heapster is now deprecated, and we shouldn't be testing Influx
functionality here anyway (that test belongs in the Heapster repo at
best anyway).

**Release note**:
```release-note
NONE
```
2018-07-18 16:42:07 -07:00
Kubernetes Submit Queue d4ac54ad64
Merge pull request #66307 from guoshimin/fixnilmap
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 a panic due to assignment to nil map

**What this PR does / why we need it**:
fix a panic due to assignment to nil map

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

**Special notes for your reviewer**:

**Release note**:

```release-note
Fixed a panic in the node status update logic when existing node has nil labels.
```
2018-07-18 14:34:29 -07:00
Kubernetes Submit Queue b1d97e5bb1
Merge pull request #65641 from freehan/bump-ingress
Automatic merge from submit-queue (batch tested with PRs 66342, 66330, 65641). 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>.

bump ingress version to 1.2

```release-note
Bump Ingress-gce version to 1.2.0
```
2018-07-18 13:57:07 -07:00
Kubernetes Submit Queue eb23c2e718
Merge pull request #66330 from mengqiy/add_tests
Automatic merge from submit-queue (batch tested with PRs 66342, 66330, 65641). 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 tests for polymorphichelpers pkg

Climbing the coverage ladder for kubectl per https://docs.google.com/document/d/1Z3teqtOLvjAtE-eo0G9tjyZbgNc6bMhYGZmOx76v6oM/edit

```release-note
NONE
```
2018-07-18 13:57:04 -07:00
Kubernetes Submit Queue f4c98d5ada
Merge pull request #66342 from ncdc/fix-configure-helper-test-whoami
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 test failure when executed using build/run.sh

**What this PR does / why we need it**:
The container used by build/run.sh doesn't necessarily have an entry in
/etc/passwd for the host user's uid, and this missing data causes
`whoami` to fail.

Switch `whoami` to `id -un` to fall back to the uid if the /etc/passwd
entry is missing.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-07-18 13:17:13 -07:00
Avesh Agarwal 6c33ca13e9 Start cloudResourceSyncsManager before getNodeAnyWay (initializeModules)
so that kubelet does not get stuck in retriving node addresses from a cloudprovider.
2018-07-18 15:15:03 -04:00
Kubernetes Submit Queue 990b3d707c
Merge pull request #66282 from bart0sh/PR0022-kubeadm-require-crictl-only-for-CRI-runtime
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 for crictl executable only for CRI runtime

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

crictl is not used for docker runtime, so InPathCheck check can be skipped for docker.

**Release note**:
```release-note
NONE
```
2018-07-18 10:01:53 -07:00
Andy Goldstein 213a182892
Fix test failure when executed using build/run.sh
The container used by build/run.sh doesn't necessarily have an entry in
/etc/passwd for the host user's uid, and this missing data causes
`whoami` to fail.

Switch `whoami` to `id -un` to fall back to the uid if the /etc/passwd
entry is missing.

Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2018-07-18 11:58:11 -04:00
Kubernetes Submit Queue 7bc860a691
Merge pull request #66157 from loburm/upgrade_event_exporter
Automatic merge from submit-queue (batch tested with PRs 66238, 66157). 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>.

Bump version of event-exporter.

```release-note
Bump event-exporter to 0.2.2 to pick up security fixes.
```
2018-07-18 08:46:59 -07:00
Kubernetes Submit Queue c41872aa72
Merge pull request #66238 from foxyriver/change-not-valid-to-invalid
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>.

change not valid to invalid

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

change not valid to invalid

```release-note
   NONE
```
2018-07-18 08:44:01 -07:00
Joachim Bartosik 9b91a89f3d Chop computeReplicasForMetrics to smaller pieces 2018-07-18 17:09:20 +02:00
Joachim Bartosik 4ef9033549 Extract helpers from prepareTestClient
Each of the subhelpers generates one client.
2018-07-18 17:02:30 +02:00
Kubernetes Submit Queue aff6daece4
Merge pull request #66327 from tanshanshan/fixcheckerror
Automatic merge from submit-queue (batch tested with PRs 66292, 66327). 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 session.New with NewSession and remove unused variable

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

replace session.New with NewSession and remove unused variable

found in #66303

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


**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-07-18 06:10:05 -07:00
Kubernetes Submit Queue cef1880350
Merge pull request #66292 from vishen/pv_spelling_storageclassename
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>.

persistentvolume: fix spelling of storageClasseName

**What this PR does / why we need it**:
Fixed spelling of error in 'pv_controller', was 'storageClasseName', is
now 'storageClassName'.

**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**:
Just fixes the spelling in one of the errors returned in the persistent volume controller.

**Release note**:

```release-note

```
2018-07-18 05:24:04 -07:00
Kubernetes Submit Queue 78082a6a28
Merge pull request #66174 from ddebroy/scaleio1
Automatic merge from submit-queue (batch tested with PRs 64690, 66174). 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 presence of /dev/disk/by-id before reading it in ScaleIO

**What this PR does / why we need it**:
In certain OS environments, like RHEL 7.4 using Xen PV driver `xen_blkfront` for boot and data disks, the path `/dev/disk/by-id` does not exist in the OS post boot. When trying to dynamically provision PVs from a ScaleIO storageclass in such an environment, ScaleIO fails when trying to create the PV with:
```
E0711 08:02:50.441964   25246 sio_client.go:342] scaleio: failed to ReadDir /dev/disk/by-id: open /dev/disk/by-id: no such file or directory
E0711 08:02:50.441989   25246 sio_volume.go:123] scaleio: setup of volume k8svol-282bd4fa84d:  open /dev/disk/by-id: no such file or directory
```
This PR avoids the above failure by first checking for the presence of `/dev/disk/by-id` before attempting to read from it as done in other drivers like gce_pd. 


**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
```
/sig storage
2018-07-18 03:32:59 -07:00
xuzhonghu 416a478cf6 Add String method to audit.Backend interface 2018-07-18 17:55:01 +08:00