Commit Graph

13083 Commits (f8f7e7e3c7f33fa926e1ed52051f275689026692)

Author SHA1 Message Date
Dr. Stefan Schimanski 734f05057e Add pod-terminated check to kubectl-exec
Fixes https://github.com/openshift/origin/issues/8472#event-681794952
2016-06-16 19:44:47 +02:00
Phillip Wittrock 0ed3bd63e4 Remove bgrant from pkg/OWNERS and pkg/kubectl/OWNERS since he has plenty to do. 2016-06-16 08:21:27 -07:00
Wojciech Tyczynski f24f6102a9 Don't set NetworkUnavailable condition in non-GCE/GKE clouds 2016-06-16 09:40:49 +02:00
Saad Ali 23f9d9f4cf Merge pull request #27491 from yujuhong/shorter_timeout
Set the podAttachAndMountTimeout to a lower value
2016-06-15 22:57:33 -07:00
Yu-Ju Hong 9bc2b43064 Set the podAttachAndMountTimeout to a lower value
If the mount operation exceeds the timeout, it will return an error and the
pod worker will retry in the next sync (10s or less). Compared with the
original value (i.e., 10 minutes), this frees the pod worker sooner to process
pod updates, if there are any.
2016-06-15 16:01:15 -07:00
Daniel Smith 8bc4e9bc13 Merge pull request #27435 from wojtek-t/fix_delta_fifo_race
Fix bugs in DeltaFIFO
2016-06-15 15:42:10 -07:00
dkalleg d95e767601 vSphere provider - Getting node data by ip instead of uuid
To get the uuid we need the service to be running as root. This change
allows us to run the controller-manager and api server as non-root.
2016-06-15 13:50:20 -07:00
Avesh Agarwal eac3e3d809 Fix divisor for memory resource as it should never be millibytes 2016-06-15 15:32:59 -04:00
deads2k 1388efe6bb make quota validation re-useable 2016-06-15 14:38:43 -04:00
Chao Xu 63fb075f0a fix updatePod of replication controller manager and replica set controller to
handle pod label updates that match no rc or rs
2016-06-15 10:34:26 -07:00
saadali cfab5362d4 Remove spam log messages from gce pd
Fixes https://github.com/kubernetes/kubernetes/pull/27410
2016-06-15 09:34:08 -07:00
saadali 542f2dc708 Introduce new kubelet volume manager
This commit adds a new volume manager in kubelet that synchronizes
volume mount/unmount (and attach/detach, if attach/detach controller
is not enabled).

This eliminates the race conditions between the pod creation loop
and the orphaned volumes loops. It also removes the unmount/detach
from the `syncPod()` path so volume clean up never blocks the
`syncPod` loop.
2016-06-15 09:34:08 -07:00
saadali 9b6a505f8a Rename UniqueDeviceName to UniqueVolumeName
Rename UniqueDeviceName to UniqueVolumeName and move helper functions
from attacherdetacher to volumehelper package.
Introduce UniquePodName alias
2016-06-15 09:32:12 -07:00
Piotr Szczesniak 51af487b5f Revert "Downward api node defaults" 2016-06-15 15:47:49 +02:00
Wojciech Tyczynski ccd42e9236 Fix bugs in DeltaFIFO 2016-06-15 15:08:21 +02:00
Jan Safranek 449e9f49d3 Fill PV.Status.Message with deleter/recycler errors. 2016-06-15 14:56:31 +02:00
Jan Safranek 4ab91066d0 Allow emitting PersistentVolume events.
Similarly to Nodes, PersistentVolumes are not in any namespace and we should
not block events on them. Currently, these events are rejected with
'Event "nfs.145841cf9c8cfaf0" is invalid: involvedObject.namespace: Invalid value: "": does not match involvedObject'
2016-06-15 14:42:24 +02:00
Jan Safranek e1e9a41757 Show events in 'kubectl describe pv' 2016-06-15 14:17:02 +02:00
k8s-merge-robot 922facd652 Merge pull request #27303 from derekwaynecarr/downward_api_node_defaults
Automatic merge from submit-queue

Downward api node defaults

Fixes #27062

Replaces https://github.com/kubernetes/kubernetes/pull/27107
2016-06-14 22:53:03 -07:00
k8s-merge-robot 49d0ba52dc Merge pull request #27181 from jsafrane/update-selector-doc
Automatic merge from submit-queue

Update PVC.Selector docs: it's ignored when VolumeName is set

@kubernetes/sig-storage
2016-06-14 21:03:30 -07:00
k8s-merge-robot 2b9670b77b Merge pull request #27190 from caesarxuchao/remove-debugging-log
Automatic merge from submit-queue

Fix a debugging line

A trivial update. @k8s-oncall can we manually merge it?
2016-06-14 16:53:09 -07:00
k8s-merge-robot abfe894385 Merge pull request #27301 from bprashanth/ps_dbg
Automatic merge from submit-queue

petset and volume debug messages

To help with https://github.com/kubernetes/kubernetes/issues/27299 https://github.com/kubernetes/kubernetes/issues/27058

simple enough that either reviewer can approve I guess.
2016-06-14 12:34:43 -07:00
deads2k ac64404d86 let patch use local file content to mutate 2016-06-14 14:38:00 -04:00
k8s-merge-robot cc5e159fe5 Merge pull request #27341 from wojtek-t/fix_pop
Automatic merge from submit-queue

Fix race in informer

Fix #27004

@smarterclayton @hongchaodeng @caesarxuchao
2016-06-14 11:27:46 -07:00
Eric Chiang d13e351028 add unit and integration tests for rbac authorizer 2016-06-14 11:07:48 -07:00
Huamin Chen 8e67a308ed in nsenter mounter, read hosts PID 1 /proc/mounts to list the mounts
Signed-off-by: Huamin Chen <hchen@redhat.com>
2016-06-14 17:54:59 +00:00
derekwaynecarr 8ea7998c7d Add owners file for kubelet eviction 2016-06-14 13:30:23 -04:00
k8s-merge-robot cd8e8f4c5a Merge pull request #27305 from zmerlynn/fix-logged-op
Automatic merge from submit-queue

GCE provider: Fix minor cosmetic logging issue

[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()

Log the pollOp, not the base op. (This will include the final status/timestamp and any errors.)
2016-06-14 10:19:14 -07:00
derekwaynecarr 65764c8ed2 kubectl describe node is allocatable aware 2016-06-14 13:06:47 -04:00
derekwaynecarr 712860d55f Fix downward API for resource limits 2016-06-14 12:49:00 -04:00
Vishnu kannan afdd9ea262 When limits are not set, use capacity as limits in downward API for resources.
Signed-off-by: Vishnu kannan <vishnuk@google.com>
2016-06-14 11:29:39 -04:00
Wojciech Tyczynski 5d702a32c1 Fix race in informer 2016-06-14 16:40:12 +02:00
k8s-merge-robot 939ad4115a Merge pull request #27283 from yifan-gu/stats
Automatic merge from submit-queue

kubelet/rkt - treat pod container as the infra - only network stats

As no "container name" annotation was being applied to the pod as a whole, the rkt pod container didn't have a container name label. This means that in stat/summary it came up as a nameless container that belonged to the pod.

this was problematic as it caused double counting of container stats.

this adds a container name annotation to the pod level which will be overridden during label creation by annotations of the same name at the container level for the containers themselves.

stats/summary will do the right thing as it will treat it the same as the infra container, just get network stats from it.


Suppress #26759

cc @kubernetes/sig-node @kubernetes/rktnetes-maintainers
2016-06-14 06:05:40 -07:00
Dr. Stefan Schimanski 3826d2598c Move seccomp annotation validation into api/validation 2016-06-14 14:58:32 +02:00
k8s-merge-robot 1a23da5f6d Merge pull request #26984 from ericchiang/rbac-api-group-make-subject-apiversion-optional
Automatic merge from submit-queue

Rbac api group make subject apiversion optional

This fixes the verification for the "apiVerion" field in the RBAC subject and makes it optional. This field isn't used and currently won't pass validation if it's filled.

```yml
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1alpha1
metadata:
  name: admins
subject:
  - kind: User
    name: admin-user
    # apiVersion: "entering anything here will fail validation"
roleRef:
  kind: ClusterRole
  name: admin
  apiVersion: rbac.authorization.k8s.io/v1alpha1
```
2016-06-14 00:03:27 -07:00
Ke Zhang 5dbf21aa13 optimize deleteFromIndices method in thread_safe_store.go 2016-06-14 09:21:44 +08:00
k8s-merge-robot ca27025b11 Merge pull request #26988 from vishh/quota-owners
Automatic merge from submit-queue

add owners for quota package
2016-06-13 17:32:24 -07:00
k8s-merge-robot de7dc031ce Merge pull request #26806 from derekwaynecarr/fix_26178
Automatic merge from submit-queue

Quota uses old object provided via admission

fixes https://github.com/kubernetes/kubernetes/issues/26178

@sdminonne - fixes a bug in services not intercepting updates.

/cc @liggitt
2016-06-13 17:32:17 -07:00
Jing Xu 809dae1978 Fix bug in isLikelyNotMountPoint function
In nsenter_mount.go/isLikelyNotMountPoint function, the returned output
from findmnt command misses the last letter. Modify the code to make sure
that output has the full target path. fix #26421 #25056 #22911
2016-06-13 17:28:38 -07:00
Abitha Palaniappan 6a8cec1c5c Fix vSphere Volume plugin bugs
- replaces probeVolume with scsiHostRescan to scan hot attached disks
 - fixes substring match of UUID returned from AttachDisk
 - changes DetachDisk to take volumePath argument instead of diskID
 - fixes delayed failure at mount rather than attach disk
 - removes cloning of virtual disk in AttachDisk
2016-06-13 17:20:55 -07:00
Euan Kemp c672bb4b63 httplog: Increase stack size
The previous size, of 2KB, in practice always was filled completely by
http server-releated stuff well above the panic itself, and truncated
before anything of real value was printed.

This increases the stack size so that panics are printed in full.
2016-06-13 16:17:03 -07:00
Eric Chiang 2bf54ac799 regenerated 2016-06-13 15:02:48 -07:00
Eric Chiang 88119903e5 pkg/apis/rbac: make apiversion optional for subjects and fix validation 2016-06-13 15:02:48 -07:00
Zach Loafman 49b3936829 GCE provider: Fix minor cosmetic logging issue
Log the pollOp, not the base op.
2016-06-13 14:53:12 -07:00
Euan Kemp c7a60fd99a kubelet: Remove stack alloc
Presumably this was accidental leftover debug info
2016-06-13 14:04:22 -07:00
Prashanth Balasubramanian 4e2f97a80e Add some logging around ro flag in GCE volume plugin 2016-06-13 13:55:49 -07:00
Ron Lai 8d6cdd5d1b Adding logs for file system info being not available. 2016-06-13 11:10:38 -07:00
Oleg Shaldybin 14a60436b2 Regenerate all 2016-06-13 10:15:57 -07:00
Oleg Shaldybin ab17fabe5f Rename RBAC subject field
Should be plural 'subjects', assuming singular 'subject' was a typo.
2016-06-13 10:15:57 -07:00
k8s-merge-robot 0d02f8c0f6 Merge pull request #26557 from AdoHe/patch_retry
Automatic merge from submit-queue

kubectl apply retry stale resource version

```release-note
kubectl apply: retry applying a patch if a version conflict error is encountered
```

[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()

fixes #15493 
@pwittrock I just got my original implementation back, ptal.
2016-06-13 10:13:27 -07:00
Yifan Gu 03ee60c810 rkt: Updated the TestMakePodManifestAnnotations(). 2016-06-13 09:43:15 -07:00
Yifan Gu f2bf13a5ac rkt: Treat pod container cgroup as the infra container. 2016-06-13 09:43:10 -07:00
Dr. Stefan Schimanski 65e2e63170 Set AttachOptions.CommandName from kubectl run using corba CommandPath
This sets AttachOptions.CommandName dynamically depending on the corba Command
hierarchy. If the root command is named e.g. "oc" (for the OpenShift cli) this
will result in "oc attach" instead of the static "kubectl attach" before this
patch.

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1341450
2016-06-13 17:16:35 +02:00
Paul Morie 8dafc776de Godoc for kubelet pod manager 2016-06-13 10:54:01 -04:00
derekwaynecarr ce44b3b98a Quota can look for a previous object from admission rather than do a lookup 2016-06-13 09:50:53 -04:00
Łukasz Oleś 07d13c1fb4 Fix kubectl logs for init containers
Related issues: #25818 #27040
2016-06-13 15:12:40 +02:00
Dr. Stefan Schimanski 04dc6dbf17 Add profile unit tests 2016-06-13 14:39:09 +02:00
Dr. Stefan Schimanski 6c54ceb0e4 Filter seccomp profile path from malicious .. and / 2016-06-13 14:39:09 +02:00
gmarek 0adcc8ef1e Remove known metrics list 2016-06-13 10:37:21 +02:00
Xiangpeng Zhao 33039c2883 Fix typos in docker.go 2016-06-13 03:01:29 -04:00
k8s-merge-robot f97bca37a5 Merge pull request #27127 from jsafrane/refactor-binder-operations
Automatic merge from submit-queue

Rework PV controller to use util/goroutinemap


@kubernetes/sig-storage
2016-06-12 23:44:28 -07:00
k8s-merge-robot d935a02c64 Merge pull request #27101 from caesarxuchao/add-deletiontimestamp-log
Automatic merge from submit-queue

Let kubelet log the DeletionTimestamp if it's not nil in update

This helps to debug if it's the kubelet to blame when a pod is not deleted. 

Example output:
```
SyncLoop (UPDATE, "api"): "redis-master_default(c6782276-2dd4-11e6-b874-64510650ab1c):DeletionTimestamp=2016-06-08T23:58:12Z"
```

ref #26290
cc @Random-Liu
2016-06-12 22:56:43 -07:00
k8s-merge-robot da6d348b1c Merge pull request #26767 from ZTE-PaaS/249043822-patch-2
Automatic merge from submit-queue

Update reason_cache.go, Get method operate lru cache not threadsafe

The reason_cache wrapped lru cache , lru cache modies linked list even for a get, should use WLock for both read and write
2016-06-12 21:18:14 -07:00
k8s-merge-robot 5d6397e9ee Merge pull request #27017 from yujuhong/rm_version
Automatic merge from submit-queue

Fix docker api version in kubelet

There are two variables `dockerv110APIVersion` and `dockerV110APIVersion` with
the same purpose, but different values. Remove the incorrect one and fix usage
in the file.

/cc @dchen1107 @Random-Liu
2016-06-12 19:31:06 -07:00
k8s-merge-robot 628af356b8 Merge pull request #26980 from hongchaodeng/fix
Automatic merge from submit-queue

processor listener: fix locking in pop()

Currently the lock in processorListener is used to guard pendingNotifications. But in pop, it also locks around on select chan. This will block the goroutine with lock acquired.

This PR changes the lock to guard the correct section only.
2016-06-12 17:59:09 -07:00
k8s-merge-robot 98f0d22bcc Merge pull request #26975 from ericchiang/kubectl-resource-printer-for-rbac-group
Automatic merge from submit-queue

pkg/kubectl: add resource printers for rbac api group

This PR adds the necessary kubectl printers for the rbac api group which we overlooked in previous PRs.

cc @erictune
2016-06-12 17:13:55 -07:00
k8s-merge-robot 49a0475fcb Merge pull request #26969 from derekwaynecarr/use_qos_utility
Automatic merge from submit-queue

ResourceQuota BestEffort scope aligned with Pod level QoS

This aligns quota with the changes in kubelet and CLI.

So if quota allows 10 `BestEffort` pods, it will now track properly with what the user sees with changes in 1.3.

```
apiVersion: v1
kind: ResourceQuota
metadata:
  name: best-effort
spec:
  hard:
    pods: "10"
  scopes:
  - BestEffort
```

/cc @vishh @kubernetes/rh-cluster-infra
2016-06-12 16:26:39 -07:00
k8s-merge-robot 6d32eba4fd Merge pull request #26900 from Clarifai/aws-instance-cache
Automatic merge from submit-queue

AWS: cache instances during service reload to avoid rate limiting on restart

Fixes #25610 by reducing redundant calls to DescribeInstances()
 
```release-note
* The AWS cloudprovider will cache results from DescribeInstances() if the set of nodes hasn't changed
```

Also move int/stringSlicesEqual from servicecontroller.go to pkg/util/slice
2016-06-12 14:24:25 -07:00
k8s-merge-robot 5d8710196b Merge pull request #26962 from zmerlynn/log-gce-better
Automatic merge from submit-queue

GCE provider: Log full contents of long operations

[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()Dump JSON of long running (>1m) GCE operations.
2016-06-12 10:46:01 -07:00
k8s-merge-robot fc5e4b195d Merge pull request #26915 from ncdc/master-endpoint-reconciler-interface
Automatic merge from submit-queue

Extract interface for master endpoints reconciler.

Make the master endpoints reconciler an interface so its implementation can be overridden, if
desired.

xref #20975 #26574 

cc @kubernetes/sig-api-machinery @lavalamp @smarterclayton @pmorie @DirectXMan12 @wojtek-t @kubernetes/rh-cluster-infra
2016-06-11 17:20:23 -07:00
Clayton Coleman 158d852104
Make discovery client parameterizable to legacy prefix
OpenShift needs to be able to use a discovery client against a different
prefix. Make LegacyPrefix optional and parameterizable to the client. No
change to existing interfaces.
2016-06-11 19:21:16 -04:00
k8s-merge-robot 55dbcee4dc Merge pull request #26586 from derekwaynecarr/fix_runtime_stats
Automatic merge from submit-queue

Fix system container detection

```release-note
Fix system container detection in kubelet on systemd.

This fixed environments where CPU and Memory Accounting were not enabled on the unit 
that launched the kubelet or docker from reporting the root cgroup when 
monitoring usage stats for those components.
```

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

/cc @vishh @ncdc @eparis @wojtek-t - this reverts the revert https://github.com/kubernetes/kubernetes/issues/26478

This should merge when node e2e setups were updated per https://github.com/kubernetes/kubernetes/pull/26289
2016-06-11 16:19:03 -07:00
k8s-merge-robot 2ef20b41f6 Merge pull request #26686 from metral/fix-get-output
Automatic merge from submit-queue

fix recursive & non-recursive kubectl get of generic output format

This PR fixes the issues with `kubectl get` in https://github.com/kubernetes/kubernetes/issues/26466

Changes made:
- fix printing when using the generic output format in both non-recursive & recurvise settings to ensure that errors are being shown
- add tests to check printing generic output in a **non-recursive** setting with non-existent pods
- clean up the **recursive** `kubectl get` tests

/cc @janetkuo
2016-06-11 14:26:31 -07:00
Rudi Chiarito e29709df73 AWS: cache values from getInstancesByNodeName() 2016-06-11 13:46:06 -04:00
k8s-merge-robot 0f24d00fbe Merge pull request #26775 from piosz/generator
Automatic merge from submit-queue

Added hpa/v1 generator to kubectl autoscale

ref #21577

```release-note
New default horizontalpodautoscaler/v1 generator for kubectl autoscale.
Use autoscaling/v1 in kubectl by default.
```


[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-06-11 08:10:44 -07:00
k8s-merge-robot 911e84ed1e Merge pull request #26710 from sttts/sttts-fix-seccomp-annotations
Automatic merge from submit-queue

Move /seccomp/ into domain prefix in seccomp annotations

Fixes #26610.

/cc @mdshuai @ncdc @jfrazelle
2016-06-11 07:03:50 -07:00
k8s-merge-robot 64da66bab4 Merge pull request #24983 from Arvinderpal/cni_args_ignoreunknown
Automatic merge from submit-queue

Sets IgnoreUnknown=1 in CNI_ARGS

```release-note
release-note-none
```

K8 uses CNI_ARGS to pass pod namespace, name and infra container
id to the CNI network plugin. CNI logic will throw an error
if these args are not known to it, unless the user specifies
IgnoreUnknown as part of CNI_ARGS. This PR sets IgnoreUnknown=1
to prevent the CNI logic from erroring and blocking pod setup.
https://github.com/appc/cni/pull/158
https://github.com/appc/cni/issues/126
2016-06-11 05:38:30 -07:00
k8s-merge-robot f789a07619 Merge pull request #27200 from yifan-gu/errorout_empty_gid
Automatic merge from submit-queue

rkt: Error out when the gid is empty.

cc @kubernetes/rktnetes-maintainers 

Ref  https://github.com/appc/spec/issues/623
2016-06-11 02:05:35 -07:00
k8s-merge-robot b9247598eb Merge pull request #27160 from janetkuo/illegal-deployment-strategy
Automatic merge from submit-queue

Validation for illegal deployment strategy

Fixes #23677

@kubernetes/deployment 

[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-06-11 00:12:51 -07:00
k8s-merge-robot ede661b4af Merge pull request #27012 from janetkuo/reduce-pod-list
Automatic merge from submit-queue

Listing pods only once when getting pods for RS in deployment

Fixes #26834

1. Avoid ranging over RSes and then `List` pods of each RS. Instead, `List` pods of the deployment once, and then filter pods of each RS. 
2. Avoid using clientset to `List` pods in deployment controller. Use podStore instead. (TODO in some functions because the unit tests don't have podStore.)

@kubernetes/deployment 

[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-06-10 20:40:22 -07:00
Yifan Gu edc946e081 rkt: Error out when the gid is empty.
Since appc requires gid to be non-empty today (https://github.com/appc/spec/issues/623),
we have to error out when gid is empty instead of using the root gid.
2016-06-10 18:48:14 -07:00
Dawn Chen 88de86fcb9 Revert "Versioning docs and examples for v1.4.0-alpha.0."
This reverts commit cce9db3aa9.
2016-06-10 16:46:46 -07:00
Clayton Coleman 36a5ffbe2f
Remove EncodeToStream(..., []unversioned.GroupVersion)
Was not being used.
2016-06-10 18:43:12 -04:00
David McMahon cce9db3aa9 Versioning docs and examples for v1.4.0-alpha.0. 2016-06-10 14:55:35 -07:00
derekwaynecarr 08cdc0ef4f Fix system container detection 2016-06-10 16:49:16 -04:00
Janet Kuo c160f75157 Fix deployment strategy validation 2016-06-10 11:14:32 -07:00
Andy Goldstein e3af3451c8
ObjectMeta, ListMeta, and TypeMeta should implement their interfaces
Make unversioned.ListMeta implement List. Update all the *List types so they implement GetListMeta.
This helps avoid using reflection to get list information.

Remove all unnecessary boilerplate, move the interfaces to the right
places, and add a test that verifies that objects implement one, the
other, but never both.
2016-06-10 13:28:54 -04:00
Janet Kuo 5d582501b4 Add unit test for deployment strategy validation 2016-06-10 10:16:49 -07:00
Chao Xu c15c10f312 fix a log line 2016-06-10 09:58:27 -07:00
Janet Kuo 764df2e096 Listing pods only once when getting pods for RS in deployment 2016-06-10 09:55:28 -07:00
Piotr Szczesniak ba1c8a2ac5 Revert "ScheduledJob tests" 2016-06-10 16:22:04 +02:00
k8s-merge-robot 4793372a85 Merge pull request #25888 from rootfs/attacher-aws-cinder
Automatic merge from submit-queue

implement EBS and Cinder attacher/detacher 

follow up with #21709

@kubernetes/sig-storage
2016-06-10 05:39:22 -07:00
Boaz Shuster d6f69c0f22 Update the jsonpath template URL 2016-06-10 12:22:36 +03:00
k8s-merge-robot 07f72acaa2 Merge pull request #27098 from yifan-gu/rkt_getlog
Automatic merge from submit-queue

rkt: Replace 'journalctl' with rkt's GetLogs() API.

This replaced the `journactl` shell out with rkt's GetLogs() API.
Fixes #26997 

To make this fully work, we need rkt to have this patch #https://github.com/coreos/rkt/pull/2763

cc @kubernetes/sig-node @euank @alban @iaguis @jonboulle
2016-06-10 01:54:05 -07:00
Jan Safranek caa09afc95 Update PVC.Selector docs: it's ignored when VolumeName is set 2016-06-10 10:08:01 +02:00
Piotr Szczesniak 1818b5b3fc Added hpa/v1 generator to kubectl autoscale 2016-06-10 09:26:35 +02:00
k8s-merge-robot a2703a3e63 Merge pull request #26976 from Clarifai/elb
Automatic merge from submit-queue

AWS: support mixed plaintext/encrypted ports in ELBs via service.beta.kubernetes.io/aws-load-balancer-ssl-ports annotation

Fixes #26268

Implements the second SSL ELB annotation, per #24978

`service.beta.kubernetes.io/aws-load-balancer-ssl-ports=*` (comma-separated list of port numbers or e.g. `https`)

If not specified, all ports are secure (SSL or HTTPS).
2016-06-10 00:12:24 -07:00
k8s-merge-robot 805a0aae71 Merge pull request #27141 from freehan/hpfix
Automatic merge from submit-queue

only handled non host network pods for hostports in kubenet

attempt to fix: #27118
2016-06-09 22:08:10 -07:00
k8s-merge-robot 1cfa84c1e1 Merge pull request #27015 from yifan-gu/kvm_network
Automatic merge from submit-queue

rkt: Do not run rkt pod inside a pre-created netns when network plugin is no-op

This fixed a panic where the returned pod network status is nil. (Fix #26540)

Also this makes lkvm stage1 able to run inside a user defined network, where the network name needs to be 'rkt.kubernetes.io'. A temporal solution to solve the network issue for lkvm stage1.
    
Besides, I fixed minor issues such as passing the wrong pod UID when cleaning up the netns file.

/cc @euank @pskrzyns @jellonek @kubernetes/sig-node 

I tested with no networkplugin locally, works fine. 

As a reminder, we need to document this in the release.https://github.com/kubernetes/kubernetes/issues/26201
2016-06-09 21:26:26 -07:00
k8s-merge-robot e54ebe5ebd Merge pull request #27132 from freehan/kubenetmasq
Automatic merge from submit-queue

turn off cni masqurade and manage it in kubenet

fixes #27110
2016-06-09 20:44:13 -07:00
Yifan Gu d69351b83a rkt: Replace 'journalctl' with rkt's GetLogs() API.
Also fixed a bug where 'journalctl -f' process leaks when the kubelet
is killed.
2016-06-09 20:02:53 -07:00
Yifan Gu 5a9ea30814 rkt: Do not run rkt pod inside a pre-created netns when network plugin is no-op.
This fixed a panic where the returned pod network status is nil.
Also this makes lkvm stage1 able to run inside a user defined
network, where the network name needs to be 'rkt.kubernetes.io'.

Also fixed minor issues such as passing the wrong pod UID, ignoring
logging errors.
2016-06-09 19:38:07 -07:00
k8s-merge-robot 7c4c19f623 Merge pull request #26936 from yifan-gu/fix_selinux
Automatic merge from submit-queue

rkt: Fix incomplete selinux context string when the option is partial.

Fix "EmptyDir" e2e tests failures caused by #https://github.com/kubernetes/kubernetes/pull/24901

As mentioned in https://github.com/kubernetes/kubernetes/pull/24901#discussion_r61372312
We should apply the selinux context of the rkt data directory (/var/lib/rkt) when users do not specify all the selinux options.

Due to my fault, the change was missed during rebase, thus caused the regression.

After applying this PR, the e2e tests passed.
```
$ go run hack/e2e.go -v -test --test_args="--ginkgo.dryRun=false --ginkgo.focus=EmptyDir"
...
Ran 19 of 313 Specs in 199.319 seconds
SUCCESS! -- 19 Passed | 0 Failed | 0 Pending | 294 Skipped PASS
```

BTW, the test is removed because the `--no-overlay=true` flag will only be there on non-coreos distro.

cc @euank @kubernetes/sig-node
2016-06-09 19:14:08 -07:00
Minhan Xia 1276a91638 kubenet masqurade for outbound traffic 2016-06-09 18:43:34 -07:00
k8s-merge-robot cbde2ec8c2 Merge pull request #25987 from hpcloud/openstack-lbaas-v2
Automatic merge from submit-queue

LBaaS v2 Support for Openstack Cloud Provider Plugin

Resolves #19774.

This work is based on Gophercloud support for LBaaS v2 currently in review (this will have to merge first):
https://github.com/rackspace/gophercloud/pull/575

These changes includes the addition of a new loadbalancer configuration option:  **LBVersion**.  If this configuration attribute is missing or anything other than "v2", lbaas v1 implementation will be used.
2016-06-09 18:32:35 -07:00
Maciej Szulik 2ab885a53a Revert commit a31ca0dc98 and move batch/v2alpha1 tests to separate group in KUBE_TEST_API_VERSIONS 2016-06-10 01:11:56 +02:00
Casey Davenport 9f2c3a677b Validation, etcd, strategy UTs for NetworkPolicy 2016-06-09 15:16:31 -07:00
Minhan Xia 1b2386f1ce only handled non host network pods for hostports in kubenet 2016-06-09 11:32:16 -07:00
k8s-merge-robot c9c4ada309 Merge pull request #26615 from jsafrane/gce-attach-tests
Automatic merge from submit-queue

GCE attach tests

Add basic tests for GCE attacher.

Looking at the code, it would deserve some refactoring as suggested in #25888, so mounting is not tested at all.
2016-06-09 06:00:56 -07:00
Jan Safranek 6081bd61f0 Rework PV controller to use util/goroutinemap 2016-06-09 13:49:04 +02:00
k8s-merge-robot 4d430ba09c Merge pull request #25400 from jsafrane/devel/operation-error
Automatic merge from submit-queue

Add specific error type for "operation already exists" error.

PersistentVolume controller needs to know why scheduling a new operation has failed - if the operation was already running or some other error happened.
2016-06-09 03:28:16 -07:00
k8s-merge-robot 7932158540 Merge pull request #26974 from pmorie/log-spam
Automatic merge from submit-queue

Reduce log spam in dockertools manager.go

Fixes #26972

@kubernetes/sig-node
2016-06-09 02:43:30 -07:00
k8s-merge-robot f1ccc2f1be Merge pull request #26354 from csrwng/fix_visitor_error
Automatic merge from submit-queue

kubectl: fix URLVisitor error message

The status of a failed fetch will usually include the code, resulting in a duplicate code in the error message:
```
unable to read URL "http://git:8080/ruby-hello-world.git", server reported 401 401 Unauthorized
```

This change rearranges them so at least the message doesn't stutter (and includes the code in case it's not part of the status):
```
unable to read URL "http://git:8080/ruby-hello-world.git", server reported 401 Unauthorized, status code 401
```

[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-06-09 02:43:27 -07:00
k8s-merge-robot 0b6e0e2b02 Merge pull request #26749 from Clarifai/describe-svc
Automatic merge from submit-queue

AWS: kubectl get service should print hostnames for LB services

Fixes #21526

Also test wide outputs. We only guarantee the first IP to be fully printed
if multiple ingresses are present. For AWS, which has no ingress IPs, but
only hostnames, the ELB hostname will be truncated, unless -o=wide is
specified.
2016-06-09 02:43:23 -07:00
k8s-merge-robot aa008ab097 Merge pull request #27094 from caseydavenport/cd-networkpolicy-validation-fix
Automatic merge from submit-queue

Fix NetworkPolicy validation bug

Fix bugs in NetworkPolicy resource (new in v1.3) validation.

Please add this to the v1.3 milestone.
2016-06-09 01:58:38 -07:00
k8s-merge-robot 29c5d6c721 Merge pull request #26848 from pmorie/wrap-volumes
Automatic merge from submit-queue

Wrap more comments in pkg/volume

Wrap some more comments in `pkg/volume`
2016-06-09 01:15:52 -07:00
k8s-merge-robot a5cd171c2f Merge pull request #25064 from Clarifai/httpheaders-querystring
Automatic merge from submit-queue

Preserve query strings in HTTP probes instead of escaping them

Fixes a problem reported on Slack by devth.

```release-note
* Allow the use of query strings and URI fragments in HTTP probes
```

This might also preserve fragments, for those crazy enough to pass them.

I am using url.Parse() on the path in order to get path/query/fragment
and also deliberately avoiding the addition of more fields to the API.
2016-06-09 01:15:47 -07:00
k8s-merge-robot 5a5c490a43 Merge pull request #27057 from janetkuo/kubectl-run-server-discovery
Automatic merge from submit-queue

Don't ignore error when Discovery().ServerResources() in kubectl run

Ref #27014
This doesn't fix the flake directly, but expose the error happened when the flake happens. 

@kubernetes/kubectl @caesarxuchao 

[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-06-08 23:49:04 -07:00
Chao Xu ccecc59ff2 In kubelet's handler of pod update, prints out deletiontimestamp if it's not nil 2016-06-08 23:48:40 -07:00
AdoHe 69bcdc20ff kubectl apply retry stale resource version 2016-06-09 00:14:17 -04:00
Davide Agnello eb32bf55ef Adding support for lbaas-v2 in OpenStack Cloud Provider 2016-06-08 18:16:59 -07:00
k8s-merge-robot 613bbbb131 Merge pull request #26667 from mml/skip-local-data
Automatic merge from submit-queue

Stop 'kubectl drain' deleting pods with local storage.

Kubectl drain will not continue if there are pods with local storage unless
forced with --delete-local-data.

Fixes #23972
2016-06-08 17:10:58 -07:00
Casey Davenport 6fe7da72b4 Fix NetworkPolicy validation bug 2016-06-08 16:31:29 -07:00
Rudi Chiarito 40f76a95cb AWS: kubectl get service should print hostnames for LoadBalancer services
Fixes #21526

Also test wide outputs. We only guarantee the first IP to be fully printed
if multiple ingresses are present. For AWS, which has no ingress IPs, but
only hostnames, the ELB hostname will be truncated, unless -o=wide is
specified.
2016-06-08 19:29:48 -04:00
k8s-merge-robot 54b352ae3a Merge pull request #26907 from smarterclayton/tolerate_quantity
Automatic merge from submit-queue

Resource quantity must support leading and trailing whitespace in JSON for back-compat

For backwards compatibility reasons, we must continue to support leading or trailing whitespace on Quantity values when deserialized from JSON.  We must also support numbers serialized into yaml (`cpu: 1`) and JSON (`"cpu": 1`)

Fixes #26898
2016-06-08 16:16:41 -07:00
k8s-merge-robot 85b67f2f00 Merge pull request #26874 from wojtek-t/fix_retry_after
Automatic merge from submit-queue

Fix Retry-After in clients

Fix #26871
2016-06-08 15:21:53 -07:00
Matt Liggett d09af4a1d6 Stop 'drain' deleting pods with local storage.
Unless forced with --delete-local-data.  Also a refactoring of the
kubectl drain logic that selects/rejects pods and produces error/warning
messages.
2016-06-08 14:59:03 -07:00
k8s-merge-robot e5784c41d4 Merge pull request #26829 from lukaszo/order
Automatic merge from submit-queue

Custom sort function for InitContainersStatuses

Order in init containers matters. Statues shoudln't be sorted by name.
2016-06-08 13:37:11 -07:00
k8s-merge-robot 99c8d10a28 Merge pull request #26803 from derekwaynecarr/fix_26319
Automatic merge from submit-queue

Move quota usage testing for loadbalancers into unit tests

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

* moved testing for node port and load balancer usage in quota to unit tests
* remove node port and node port -> loadbalancer service testing out of e2e
 * covered already in replenishment_controller_test scenario

Given the time it takes to even allocate a load balancer, it seems better to test that outside of this test case to avoid unnecessary flakes.

/cc @bprashanth
2016-06-08 12:51:53 -07:00
k8s-merge-robot 66149c50fd Merge pull request #26792 from janetkuo/deployment-version-skewed-test-fail
Automatic merge from submit-queue

Avoid comparing pod-template-hash when getting a deployment's new/old RSes

Will need to cherry pick to 1.2 also. 

Ref #26724 #26797 @kubernetes/deployment @ihmccreery 

[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-06-08 12:03:31 -07:00
Hongchao Deng d4eb48c0bb add TestPopReleaseLock 2016-06-08 11:34:35 -07:00
Hongchao Deng 308201acb0 processor listener: fix locking in pop() 2016-06-08 11:34:35 -07:00
Janet Kuo 75c3cbcbfb Don't ignore error when Discovery().ServerResources() in kubectl run 2016-06-08 10:34:09 -07:00
Paul Morie 0a0797a680 Reduce log spam in dockertools manager.go 2016-06-08 12:41:37 -04:00
k8s-merge-robot e7102b4fd9 Merge pull request #26880 from wojtek-t/better_traces
Automatic merge from submit-queue

Fix traces

Ref #26185
2016-06-08 08:06:18 -07:00
Avesh Agarwal 3c865e45a0 Remove an empty line being output when exposing annotations and
labels via downward api volume
2016-06-08 09:22:10 -04:00
Huamin Chen d1e0a13924 support AWS and Cinder attacher
Signed-off-by: Huamin Chen <hchen@redhat.com>
2016-06-08 12:56:24 +00:00
Jan Safranek 5cd5ae8d82 Add GCE attacher unit tests. 2016-06-08 13:53:04 +02:00
Jan Safranek 2b342c1e76 Add interface to abstract GCE volume operations.
We want to write unit test with fake GCE.
2016-06-08 12:37:08 +02:00
Chao Xu 91de14cf13 rename the gc for terminated pods to "podgc" 2016-06-07 22:10:34 -07:00
Yu-Ju Hong 8866a894e4 Fix docker api version in kubelet
There are two variables `dockerv110APIVersion` and `dockerV110APIVersion` with
the same purpose, but different values. Remove the incorrect one and fix usage
in the file.
2016-06-07 17:51:36 -07:00
Rudi Chiarito 4ff9e9319f AWS: support mixed plaintext/encrypted ports in ELBs
Fixes #26268

Implements the second SSL ELB annotation, per #24978

service.beta.kubernetes.io/aws-load-balancer-ssl-ports=* (or e.g. https)

If not specified, all ports are secure (SSL or HTTPS).
2016-06-07 18:39:53 -04:00
Eric Chiang acfac5aff8 pkg/kubectl: add resource printers for rbac api group 2016-06-07 15:26:57 -07:00
Łukasz Oleś 2b46aea495 Custom sort function for InitContainersStatuses
Order in init container statuses should be the same as defined in pod.
Statues shoudln't be sorted by name.
2016-06-07 23:57:23 +02:00
Yifan Gu 8596d25ad5 rkt: Fix incomplete selinux context string when the option is partial.
Add Getfilecon() into the selinux interface.
2016-06-07 14:43:35 -07:00
Wojciech Tyczynski 528713bcc2 Fix Retry-After in clients 2016-06-07 21:04:44 +02:00
Vishnu Kannan f4e4156089 add owners for quota package 2016-06-07 11:46:50 -07:00
derekwaynecarr 7a5412a259 Move quota usage testing for loadbalancers into unit tests 2016-06-07 12:54:11 -04:00
derekwaynecarr f796cc335d Align quota BestEffort scope with recent changes 2016-06-07 12:08:08 -04:00
Zach Loafman ce6537aa48 GCE provider: Log full contents of long operations
Dump JSON of long running (>1m) GCE operations.
2016-06-07 06:58:43 -07:00
Janet Kuo c3d905776e Avoid comparing pod-template-hash when getting a deployment's new/old RSes 2016-06-06 17:09:35 -07:00
Andy Goldstein 04ce042ff9 Extract interface for master endpoints reconciler.
Make the master endpoints reconciler an interface so its implementation can be overridden, if
desired.
2016-06-06 17:56:23 -04:00
Clayton Coleman e1dc3ef933
Remove unused deep_copies 2016-06-06 17:18:22 -04:00
Clayton Coleman 0181ac61da
DeepCopy should only generate types in k8s.io/kubernetes
Also make generation more selective (require opt in) to prevent lots of
unnecessary generated deep copies.
2016-06-06 17:18:22 -04:00
Clayton Coleman 653ddbb01e
Tolerate YAML and JSON numbers
Both YAML and JSON can contain numbers
2016-06-06 17:14:50 -04:00
Clayton Coleman 2ed3246631
Resource quantity must support leading and trailing whitespace
For backwards compatibility reasons, we must continue to support leading
or trailing whitespace on Quantity values when deserialized from JSON.
2016-06-06 16:53:42 -04:00
k8s-merge-robot 5c41b93d8b Merge pull request #26719 from pwittrock/kubectl-owners
Automatic merge from submit-queue

Add pwittrock to the kubectl OWNERS file



[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-06-06 13:46:13 -07:00
k8s-merge-robot 1de4b05442 Merge pull request #25490 from rootfs/rbd-defaults
Automatic merge from submit-queue

correction on rbd volume object and defaults

- add `omitempty` to `RBDPool RadosUser Keyring SecretRef ReadOnly`
- move defaults from `pkg/volume/rbd/rbd.go` to `pkg/api/v1/defaults.go`

addressing #18885
2016-06-06 13:02:22 -07:00
k8s-merge-robot dfe5de3bcb Merge pull request #25731 from Pensu/master
Automatic merge from submit-queue

Adding version.Info in apiserver.go

Fixes #17176
2016-06-06 12:06:32 -07:00
Huamin Chen 4b4048a084 correction on rbd volume object and defaults
Signed-off-by: Huamin Chen <hchen@redhat.com>
2016-06-06 17:27:47 +00:00
k8s-merge-robot 2cc0f2f040 Merge pull request #25280 from timothysc/http2_clients
Automatic merge from submit-queue

Option to enable http2 on client connections.

Addresses #21081

Enables http2 connection by default.  

before:
``` 
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 127.0.0.1:10248         0.0.0.0:*               LISTEN      21868/kubelet       
tcp        0      0 127.0.0.1:10249         0.0.0.0:*               LISTEN      21924/kube-proxy    
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      754/sshd            
tcp        0      0 192.2.5.12:47080        192.2.5.11:443          ESTABLISHED 21924/kube-proxy    
tcp        0      0 192.2.5.12:47082        192.2.5.11:443          ESTABLISHED 21924/kube-proxy    
tcp        0      0 192.2.5.12:55776        169.254.169.254:80      ESTABLISHED 21868/kubelet       
tcp        0    304 192.2.5.12:22           192.2.5.10:49978        ESTABLISHED 22287/sshd: root [p 
tcp        0      0 192.2.5.12:34568        192.2.5.11:2379         ESTABLISHED 3029/flanneld       
tcp        0      0 192.2.5.12:55774        169.254.169.254:80      ESTABLISHED 21868/kubelet       
tcp        0      0 192.2.5.12:47086        192.2.5.11:443          ESTABLISHED 21924/kube-proxy    
tcp        0      0 192.2.5.12:47102        192.2.5.11:443          ESTABLISHED 21868/kubelet       
tcp        0      0 192.2.5.12:47108        192.2.5.11:443          ESTABLISHED 21868/kubelet       
tcp        0      0 192.2.5.12:55772        169.254.169.254:80      ESTABLISHED 21868/kubelet       
tcp        0      0 192.2.5.12:47104        192.2.5.11:443          ESTABLISHED 21868/kubelet       
tcp        0      0 192.2.5.12:34718        192.2.5.11:2379         ESTABLISHED 3029/flanneld       
tcp        0      0 192.2.5.12:47110        192.2.5.11:443          ESTABLISHED 21868/kubelet       
tcp        0      0 192.2.5.12:47106        192.2.5.11:443          ESTABLISHED 21868/kubelet       
tcp        0      0 192.2.5.12:47084        192.2.5.11:443          ESTABLISHED 21924/kube-proxy    
tcp6       0      0 :::4194                 :::*                    LISTEN      21868/kubelet       
tcp6       0      0 :::10250                :::*                    LISTEN      21868/kubelet       
tcp6       0      0 :::10255                :::*                    LISTEN      21868/kubelet       
tcp6       0      0 :::22                   :::*                    LISTEN      754/sshd            
tcp6       0      0 192.2.5.12:10255        192.2.5.15:41570        ESTABLISHED 21868/kubelet       
udp        0      0 0.0.0.0:8472            0.0.0.0:*                           -                   
udp        0      0 0.0.0.0:22824           0.0.0.0:*                           600/dhclient        
udp        0      0 0.0.0.0:68              0.0.0.0:*                           600/dhclient        
udp6       0      0 :::4195                 :::*                                600/dhclient 
```

after
```
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 127.0.0.1:10248         0.0.0.0:*               LISTEN      16962/kubelet       
tcp        0      0 127.0.0.1:10249         0.0.0.0:*               LISTEN      17024/kube-proxy    
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      754/sshd            
tcp        0      0 192.2.5.12:47046        192.2.5.11:443          ESTABLISHED 17024/kube-proxy    
tcp        0      0 192.2.5.12:47052        192.2.5.11:443          ESTABLISHED 16962/kubelet       
tcp        0      0 192.2.5.12:34568        192.2.5.11:2379         ESTABLISHED 3029/flanneld       
tcp        0      0 192.2.5.12:55720        169.254.169.254:80      ESTABLISHED 16962/kubelet       
tcp        0      0 192.2.5.12:55724        169.254.169.254:80      ESTABLISHED 16962/kubelet       
tcp        0      0 192.2.5.12:34718        192.2.5.11:2379         ESTABLISHED 3029/flanneld       
tcp        0      0 192.2.5.12:55726        169.254.169.254:80      ESTABLISHED 16962/kubelet       
tcp        0    304 192.2.5.12:22           192.2.5.10:49938        ESTABLISHED 17653/sshd: root [p 
tcp6       0      0 :::4194                 :::*                    LISTEN      16962/kubelet       
tcp6       0      0 :::10250                :::*                    LISTEN      16962/kubelet       
tcp6       0      0 :::10255                :::*                    LISTEN      16962/kubelet       
tcp6       0      0 :::22                   :::*                    LISTEN      754/sshd            
tcp6       0      0 192.2.5.12:10255        192.2.5.15:41472        ESTABLISHED 16962/kubelet       
udp        0      0 0.0.0.0:8472            0.0.0.0:*                           -                   
udp        0      0 0.0.0.0:22824           0.0.0.0:*                           600/dhclient        
udp        0      0 0.0.0.0:68              0.0.0.0:*                           600/dhclient        
udp6       0      0 :::4195                 :::*                                600/dhclient
```

/cc @jeremyeder
2016-06-06 10:22:49 -07:00
Dr. Stefan Schimanski 12346d5171 Fix seccomp prefix check 2016-06-06 14:08:17 +02:00
Dr. Stefan Schimanski ad6bd78007 Move /seccomp/ into domain prefix in seccomp annotations
Double slashes are not allowed in annotation keys. Moreover, using the 63
characters of the name component in an annotation key will shorted the space
for the container name.
2016-06-06 14:08:17 +02:00
Wojciech Tyczynski 394db3b407 Fix traces 2016-06-06 10:49:46 +02:00
Peeyush Gupta 1a9f7e9a0c Adding version.Info in apiserver.go 2016-06-06 14:15:24 +05:30
Xiang Li 9a1779110c daemon/controller.go: refactor worker 2016-06-05 23:29:57 -07:00
Yifan Gu 3699b70b00 rkt: Refactor the systemd interface.
Replace shell out calls with dbus API calls.
Remove unused 'Reload()'.
2016-06-06 05:27:08 +00:00
Xiang Li c530a5810a cacher: remove unnecessary initialzation 2016-06-04 22:49:45 -07:00
Xiang Li e2aab093aa cacher.go: remove NewCacher func
NewCacher is a wrapper of NewCacherFromConfig. NewCacher understands
how to create a key func from scopeStrategy. However, it is not the
responsibility of cacher. So we should remove this function, and
construct the config in its caller, which should understand scopeStrategy.
2016-06-04 22:46:58 -07:00
AdoHe 9d28bab847 make kubectl get ingress output more consistency 2016-06-04 22:43:51 -04:00
k8s-merge-robot 1c860c9a7e Merge pull request #26849 from olegshaldybin/add-list-options
Automatic merge from submit-queue

Add ListOptions to RBAC group

[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()

Otherwise clientset complains about unregistered kind when ListOptions
are passed.
2016-06-04 16:32:57 -07:00
k8s-merge-robot 421c16addd Merge pull request #25894 from brendandburns/thirdparty-watch
Automatic merge from submit-queue

Fix third party

Fixes https://github.com/kubernetes/kubernetes/issues/25421
Fixes https://github.com/kubernetes/kubernetes/issues/25422

@AdoHe @sjenning @caesarxuchao @lavalamp 

@kubernetes/sig-api-machinery 

[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-06-04 15:42:41 -07:00
k8s-merge-robot 9bf1ce42f8 Merge pull request #26843 from AdoHe/describe_ingress
Automatic merge from submit-queue

update ingress describe output

refer #26684 for more detail. @bprashanth ptal.
2016-06-04 13:27:46 -07:00
Oleg Shaldybin ba3c7d33cd Add {List,Delete,Export}Options to RBAC group
Otherwise clientset complains about unregistered kind when options
are passed.
2016-06-04 12:54:18 -07:00
Paul Morie 6415c2d288 Wrap more comments in pkg/volume 2016-06-04 14:14:00 -04:00
k8s-merge-robot 74aaa14390 Merge pull request #26796 from nikhiljindal/publicAddress
Automatic merge from submit-queue

Fixing logic to generate ExternalHost in genericapiserver

@ncdc pointed it out (https://kubernetes.slack.com/archives/sig-api-machinery/p1464974528000139) that lines 305 and 306 dont match. We should be using ReadWritePort instead of ServiceReadWritePort in line 306.

https://github.com/kubernetes/kubernetes/pull/20626 seems to be the culprit PR.
2016-06-04 10:48:55 -07:00
k8s-merge-robot 95e2535682 Merge pull request #26793 from fabianofranz/expose_show_labels_in_printers
Automatic merge from submit-queue

Expose printer utils that append labels

So that it can be reused downstream. @smarterclayton 

[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-06-04 09:59:39 -07:00
k8s-merge-robot 8e091e254f Merge pull request #26666 from euank/fix-wrong-err
Automatic merge from submit-queue

rkt: Wrap exec errors as utilexec.ExitError

This is needed by the exec prober to distinguish error types and exit
codes correctly. Without this, the exec prober used for liveness probes
doesn't identify errors correctly and restarts aren't triggered. Fixes #26456

An alternative, and preferable solution would be to use utilexec
everywhere, but that change is much more involved and should come at a
later date. Unfortunately, until that change is made, writing tests for
this is quite difficult.

cc @yifan-gu @sjpotter
2016-06-04 05:11:16 -07:00
k8s-merge-robot 22d405477b Merge pull request #26568 from derekwaynecarr/kubectl_qos
Automatic merge from submit-queue

Update kubectl describe pod to use pod level qos

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

/cc @vishh
2016-06-04 02:40:47 -07:00
AdoHe ab743708fe update ingress describe output 2016-06-04 04:58:37 -04:00
k8s-merge-robot 707cc2bbb8 Merge pull request #26493 from caesarxuchao/fix-gc-flake
Automatic merge from submit-queue

Fixes 25890 flake. Let GC convert ListOptions to v1 before passing it to the dynamic client

GC's ListWatcher directly passed the api.ListOptions to the dynamic client, but the parameter codec of dynamic client converts the options to queries based on the tags in the struct, which are not present in api.ListOptions, so the queries are not sent to the server. As a result, the Watch request was sent without a resourceVersion, causing missed events. Flake #25890 is caused by the missed deletion events.

This PR converts the api.ListOptions to v1.ListOptions before the GC passes it to the dynamic codec. The flaky test has successfully passed 79 times ([log](https://00e9e64bacd064560a027fbee9c5a373a1614f3a56e652ae40-apidata.googleusercontent.com/download/storage/v1_internal/b/kubernetes-jenkins/o/pr-logs%2Fpull%2F25923%2Fkubernetes-pull-test-unit-integration%2F28364%2Fbuild-log.txt?qk=AD5uMEv72OjSUqDyk5i-ZLurcmM4i7gket1c7WaqR7yuIYz7WhPYT7ewVBafijV0ymnPTYqxRYt1kp6S9YQv7chPwC-3UtrKetKfhYnvAFrPGXAIBxHytTmpFohRAYgsARN1B6j1f9vyK5lM-8jyzRGhCK3sCRsAPnbDBWIWFlbH4b1n3vUET3P71QamHrF5itYyaqRU5pMZV3Cwwr81X8q7h5hCzm3Ip78RpMzfjEqTG0RcM2TLGccUrlkWVBLh4hn0NFpUIkzVFugFA5ooJffo-0AdJnO3mGWEOnXNVFWftJbK8cKnTns0DISrYFOyH_PlOe_YHCxgIXIT-dW8G-nbqoUjn5SBqunr36rcpaYCIwe2va4W_AcLCT43xiEAezRER_U9AuIqi_22KMd6SuHTyljhmWFPvPk8-gpjthLWXhcE7LPO5dV41hnZHnbI4n_9eI1nSVm7q9XdSvX1sWKV1GCwn8oj017AnxVvl9bScultko_0dTC747UqJ6UTFakLuFcHFe-F5Tz7ItDWlBVPoXeC7gTpyuicFKLsdqGlW9F5X6kIwNrBRj9uRsS-QuzSER-fVkQCn4dUTcokttRH_0bYvyfr9oqiDXmywMgOp-L0sKayk8JOVynh2q0Tju9sdkvFr0PxoAjhofomfIC1SZ_JkOzwAT1TUW8dLjPHluMct34xW_-qna1AmkoxM4bZQLhllap96NTC-0IdtzeKDrTul8p7u3WXSJjjEMSijibTNMlnkB0AluT1_RNO94OnzuFv4YlcV24FPhJzchhbyKREkOb_wzgcnSbRwGHjIcfRgkX-IzoXHVBcMYFUrPmsXrnRcfad4XwjkUOgvivkURW2_EwnzgrLDh-IKek51_0FpT1MnFCSG0gQbVSs_iMVPr6UXNAw62LGbKVtl3ZMXyapEpcO8azNbn6Wvd550R704JXxYlU)).

@lavalamp @krousey @smarterclayton
2016-06-04 01:52:31 -07:00
k8s-merge-robot 48d87a0c57 Merge pull request #26393 from bprashanth/dns
Automatic merge from submit-queue

Fix srv record lookup

Took longer than expected for unrelated reasons. This is intentionally a pretty dumb fix.
Fixes https://github.com/kubernetes/kubernetes/issues/26116
2016-06-04 01:00:15 -07:00
k8s-merge-robot bd2bc25308 Merge pull request #25865 from jsafrane/devel/pv-convert-from-12
Automatic merge from submit-queue

volume controller: Convert PersistentVolumes from Kubernetes 1.2

In Kubernetes 1.2 we used template PersistentVolume for provisioning. When a claim for dynamic volume was detected, Kubernetes did:

- create template PV for the claim with dummy pointer to storage asset
- allocate storage asset such as AWS EBS
- fill real pointer to the created storage asset to the template PV

In refactored volume provisioner, Kubernetes allocates the storage asset first and then creates a Kubernetes PV instance already with the correct pointer to the storage asset.

To support seamles upgrade from 1.2 to 1.3 we need to remove these unprovisioned template PVs. The new controller does not use them, it will see PVC for dynamic provisioning and create real PV instead.

See https://github.com/pmorie/pv-haxxz/pull/3 for pseudocode.
2016-06-03 23:27:13 -07:00
k8s-merge-robot 14f2763724 Merge pull request #26777 from jsafrane/fix-attach-errors
Automatic merge from submit-queue

Fix GCE attacher/detacher to ignore return value of failed calls.

The plugin should ignore any return value if err is set. Found when writing unit tests in #26615 - my dummy `DiskIsAttached` returned `false, errors.New('fake error')` and the volume was **not** detached although the log message `"Error checking if PD (%q) is already attached to current node (%q). Will continue and try detach anyway."` suggested otherwise 

@saad-ali, PTAL
@kubernetes/sig-storage
2016-06-03 22:34:56 -07:00
Prashanth Balasubramanian 2439930592 Fix srv record lookup 2016-06-03 20:41:08 -07:00
k8s-merge-robot 4877153727 Merge pull request #26772 from jsafrane/flake-controller-cache-empty
Automatic merge from submit-queue

Wait for all volumes/claims to get synced in unit test.

Controller.HasSynced() returns true when all initial claims/volumes were sent
to appropriate goroutines, not when the goroutine has actually processed them.

Fixes #26712
2016-06-03 17:05:22 -07:00
k8s-merge-robot 9dc06e85fb Merge pull request #26807 from pmorie/wrap-volumes
Automatic merge from submit-queue

Wrap comments in pkg/volume

Supercedes #25300, line wrap some huge comments in `pkg/volume`.
2016-06-03 15:38:13 -07:00
k8s-merge-robot c1392ec51a Merge pull request #26747 from freehan/kubenetdir
Automatic merge from submit-queue

pass NetworkPluginDir to kubenet

to unblock GCI kubenet integration #26379

cc: @andyzheng0831
2016-06-03 15:38:09 -07:00
Paul Morie 029b97d5a1 Wrap comments in pkg/volume 2016-06-03 16:16:57 -04:00
k8s-merge-robot a00dbea133 Merge pull request #26758 from mqliang/lookupcache-threadsafe
Automatic merge from submit-queue

bugfix:lookupcache's Get method can not be called concurrently

ref https://github.com/kubernetes/kubernetes/issues/26376

@lavalamp @therc @mikedanese
2016-06-03 12:46:13 -07:00
derekwaynecarr 89ff3b2530 Update kubectl describe pod to use pod level qos 2016-06-03 15:32:32 -04:00
Chao Xu 06f49f7ca7 Let the dynamic client take a customized parameter codec for List, Watch, and DeleteCollection.
Let the gc's ListWatcher use api.ParameterCodec. Fixes 25890.
2016-06-03 11:22:51 -07:00
nikhiljindal 6e71b4a2dc Fixing externalAddress in genericapiserver 2016-06-03 11:21:29 -07:00
mqliang 9a0ff5a9e8 bugfix:lookupcache's Get method can not be called concurrently 2016-06-04 02:21:25 +08:00
Fabiano Franz 8f62a196fd Expose print utils to append labels 2016-06-03 15:00:50 -03:00
Minhan Xia e9f8c70eaf pass NetworkPluginDir to kubenet 2016-06-03 10:22:49 -07:00
k8s-merge-robot 525140a278 Merge pull request #26693 from AdoHe/init_containers
Automatic merge from submit-queue

exec support init containers

Partially fixes #25818 
@smarterclayton ptal.
2016-06-03 10:13:49 -07:00
Jan Safranek 27b11c5342 Convert PersistentVolumes from Kubernetes 1.2
In Kubernetes 1.2 we used template PersistentVolume for provisioning. When a
claim for dynamic volume was detected, Kubernetes did:
- create template PV for the claim with dummy pointer to storage asset
- allocate storage asset such as AWS EBS
- fill real pointer to the created storage asset to the template PV

In refactored volume provisioner, Kubernetes allocates the storage asset first
and then creates a Kubernetes PV instance already with the correct pointer
to the storage asset.

To support seamles upgrade from 1.2 to 1.3 we need to remove these
unprovisioned template PVs. The new controller does not use them, it will see
PVC for dynamic provisioning and create real PV instead.
2016-06-03 14:26:06 +02:00
Jan Safranek eb5a68319e Fix GCE attacher/detacher to ignore return value of failed calls.
The plugin should ignore any return value if err is set.
2016-06-03 14:16:17 +02:00
k8s-merge-robot 3157e87cb2 Merge pull request #26768 from wojtek-t/routecontroller_logs
Automatic merge from submit-queue

Improve logging in routecontroller

@zmerlynn
2016-06-03 04:51:12 -07:00
k8s-merge-robot 59e008dbcb Merge pull request #26733 from pmorie/pv-controller-typos
Automatic merge from submit-queue

Fix typo and linewrap comments in PV controller

Fix some typos and linewrap long comments that I found while going over this code investigating something.
2016-06-03 04:51:08 -07:00
k8s-merge-robot d93f80c86b Merge pull request #26677 from Random-Liu/add-image-pull-timeout
Automatic merge from submit-queue

Add timeout for image pulling

Fix #26300.

With this PR, if image pulling makes no progress for *1 minute*, the operation will be cancelled. Docker reports progress for every 512kB block (See [here](3d13fddd2b/pkg/progress/progressreader.go (L32))), *512kB/min* means the throughput is *<= 8.5kB/s*, which should be kind of abnormal?

It's a little hard to write unit test for this, so I just manually tested it. If I set the `defaultImagePullingStuckTimeout` to 0s, and `defaultImagePullingProgressReportInterval` to 1s, image pulling will be cancelled.
```
E0601 18:48:29.026003   46185 kube_docker_client.go:274] Cancel pulling image "nginx:latest" because of no progress for 0, latest progress: "89732b811e7f: Pulling fs layer "
E0601 18:48:29.026308   46185 manager.go:2110] container start failed: ErrImagePull: net/http: request canceled
```

/cc @kubernetes/sig-node 
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-06-03 04:02:20 -07:00
Wojciech Tyczynski de1d35a66d Improve logging in routecontroller 2016-06-03 12:05:12 +02:00
Jan Safranek 962505ad01 Wait for all volumes/claims to get synced in unit test.
Controller.HasSynced() returns true when all initial claims/volumes were sent
to appropriate goroutines, not when the goroutine has actually processed them.
2016-06-03 10:53:56 +02:00
KeZhang f76510d99e Update reason_cache.go 2016-06-03 16:33:36 +08:00
k8s-merge-robot 4adc00eceb Merge pull request #26454 from thockin/licenses_again
Automatic merge from submit-queue

Don't allow deps with no discernible license

This updates the few deps we had with no LICENSE file to current versions that do have that file.  It also disallows new deps without obvious licenses.
2016-06-03 01:18:14 -07:00
k8s-merge-robot dbaf18026f Merge pull request #26529 from gitfred/deep-copy-svc
Automatic merge from submit-queue

DeepCopy Service instead of shallow copy #2049 

fixes #2049
2016-06-03 00:18:19 -07:00
k8s-merge-robot 75ef1ca270 Merge pull request #26351 from saad-ali/attachDetachControllerKubeletChanges
Automatic merge from submit-queue

Attach/Detach Controller Kubelet Changes

This PR contains changes to enable attach/detach controller proposed in #20262.

Specifically it:
* Introduces a new `enable-controller-attach-detach` kubelet flag to enable control by attach/detach controller. Default enabled.
* Removes all references `SafeToDetach` annotation from controller.
* Adds the new `VolumesInUse` field to the Node Status API object.
* Modifies the controller to use `VolumesInUse` instead of `SafeToDetach` annotation to gate detachment.
* Modifies kubelet to set `VolumesInUse` before Mount and after Unmount.
  * There is a bug in the `node-problem-detector` binary that causes `VolumesInUse` to get reset to nil every 30 seconds. Issue https://github.com/kubernetes/node-problem-detector/issues/9#issuecomment-221770924 opened to fix that.
  * There is a bug here in the mount/unmount code that prevents resetting `VolumeInUse in some cases, this will be fixed by mount/unmount refactor.
* Have controller process detaches before attaches so that volumes referenced by pods that are rescheduled to a different node are detached first.
* Fix misc bugs in controller.
* Modify GCE attacher to: remove retries, remove mutex, and not fail if volume is already attached or already detached.

Fixes #14642, #19953

```release-note
Kubernetes v1.3 introduces a new Attach/Detach Controller. This controller manages attaching and detaching volumes on-behalf of nodes that have the "volumes.kubernetes.io/controller-managed-attach-detach" annotation.

A kubelet flag, "enable-controller-attach-detach" (default true), controls whether a node sets the "controller-managed-attach-detach" or not.
```
2016-06-02 23:30:32 -07:00
AdoHe 1cfcb24f37 exec support init container 2016-06-03 02:05:15 -04:00
Mike Metral 4409eed57f fix recursive & non-recursive kubectl get of generic output format 2016-06-02 21:46:15 -07:00
k8s-merge-robot a41d84408c Merge pull request #26518 from jsafrane/initial-sync
Automatic merge from submit-queue

Fill controller caches on startup

The controller needs to fill its caches before it starts binding/recycling/ deleting or provisioning volumes and claims. This was done using blocking initial 'xxx added' from going through syncClaim/syncVolume. However, when the caches were full, the controller waited for the next sync period to do actual binding/recycling etc.

In this patch, the controller fills its caches directly from etcd and then processes initial 'xxx added' events to reconcile the world and bind/recycle/ delete/provision stuff, resulting in faster binding after startup.

Fixes #25967 (properly)
2016-06-02 21:44:56 -07:00
k8s-merge-robot 0e9d809171 Merge pull request #26462 from mikedanese/fix-build-2
Automatic merge from submit-queue

fix go install ./pkg/...


appearantly this package is not imported
2016-06-02 20:51:41 -07:00
k8s-merge-robot dfb0d0eb0d Merge pull request #26727 from janetkuo/deployment-list-once
Automatic merge from submit-queue

List RSes only once when getting old+new RSes in deployment controller

Fixes #26204 #26509 

[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-06-02 19:31:03 -07:00
k8s-merge-robot 693dae70a8 Merge pull request #26226 from ArtfulCoder/reversedns
Automatic merge from submit-queue

Added DNS Reverse Record logic for service IPs
2016-06-02 18:43:39 -07:00
Tim Hockin 3c6ce53b7f Fix call-sites after dep updates 2016-06-02 16:57:28 -07:00
Saad Ali 9dbe943491 Attach/Detach Controller Kubelet Changes
This PR contains Kubelet changes to enable attach/detach controller control.
* It introduces a new "enable-controller-attach-detach" kubelet flag to
  enable control by controller. Default enabled.
* It removes all references "SafeToDetach" annoation from controller.
* It adds the new VolumesInUse field to the Node Status API object.
* It modifies the controller to use VolumesInUse instead of SafeToDetach
  annotation to gate detachment.
* There is a bug in node-problem-detector that causes VolumesInUse to
  get reset every 30 seconds. Issue https://github.com/kubernetes/node-problem-detector/issues/9
  opened to fix that.
2016-06-02 16:47:11 -07:00
k8s-merge-robot 4c316979c8 Merge pull request #25851 from euank/fixJournaldUsage
Automatic merge from submit-queue

rkt: Get logs via syslog identifier

This change works around https://github.com/coreos/rkt/issues/2630
Without this change, logs cannot reliably be collected for containers
with short lifetimes.

With this change, logs cannot be collected on rkt versions v1.6.0 and
before.

I'd like to also bump the required rkt version, but I don't want to do that until there's a released version that can be pointed to (so the next rkt release).

I haven't added tests (which were missing) because this code will be removed if/when logs are retrieved via the API. I have run E2E tests with this merged in and verified the tests which previously failed no longer fail.

cc @yifan-gu
2016-06-02 15:53:39 -07:00
k8s-merge-robot 0b7f8e5b74 Merge pull request #24808 from screeley44/gluster_errors
Automatic merge from submit-queue

read gluster log to surface glusterfs plugin errors properly in describe events

glusterfs.go does not properly expose errors as all mount errors go to a log file, I propose we read the log file to expose the errors without asking the users to 'go look at this log'

This PR does the following:
1.  adds a gluster option for log-level=ERROR to remove all noise from log file
2.  change log file name and path based on PV + Pod name - so specific per PV and Pod
3.  create a utility to read the last two lines of the log file when failure occurs

old behavior:
```
  13s	13s	1	{kubelet 127.0.0.1}		Warning	FailedMount	Unable to mount volumes for pod "bb-gluster-pod2_default(34b18c6b-070d-11e6-8e95-52540092b5fb)": glusterfs: mount failed: Mount failed: exit status 1
Mounting arguments: 192.168.234.147:myVol2 /var/lib/kubelet/pods/34b18c6b-070d-11e6-8e95-52540092b5fb/volumes/kubernetes.io~glusterfs/pv-gluster glusterfs [log-file=/var/lib/kubelet/plugins/kubernetes.io/glusterfs/pv-gluster/glusterfs.log]
Output: Mount failed. Please check the log file for more details.
```

improved behavior: (updated after suggestions from community)
```
  34m		34m		1	{kubelet 127.0.0.1}			Warning		FailedMount	Unable to mount volumes for pod "bb-multi-pod1_default(e7d7f790-0d4b-11e6-a275-52540092b5fb)": glusterfs: mount failed: Mount failed: exit status 1
Mounting arguments: 192.168.123.222:myVol2 /var/lib/kubelet/pods/e7d7f790-0d4b-11e6-a275-52540092b5fb/volumes/kubernetes.io~glusterfs/pv-gluster2 glusterfs [log-level=ERROR log-file=/var/lib/kubelet/plugins/kubernetes.io/glusterfs/pv-gluster2/bb-multi-pod1-glusterfs.log]
Output: Mount failed. Please check the log file for more details.

 the following error information was pulled from the log to help resolve this issue: 
[2016-04-28 14:21:29.109697] E [socket.c:2332:socket_connect_finish] 0-glusterfs: connection to 192.168.123.222:24007 failed (Connection timed out)
[2016-04-28 14:21:29.109767] E [glusterfsd-mgmt.c:1819:mgmt_rpc_notify] 0-glusterfsd-mgmt: failed to connect with remote-host: 192.168.123.222 (Transport endpoint is not connected)

```

also this PR is alternate approach to :  #24624
2016-06-02 13:42:54 -07:00
Paul Morie 277c0a4e90 Fix typo and linewrap comments in PV controller 2016-06-02 15:50:07 -04:00
Janet Kuo 36f704c975 List RSes only once when getting old+new RSes in deployment controller 2016-06-02 11:24:43 -07:00
Random-Liu 49c8683c24 Add timeout for image pulling 2016-06-02 10:49:17 -07:00
Brendan Burns 328a8392b1 Fix third party 2016-06-02 10:24:14 -07:00
Phillip Wittrock 198c95d3d7 Add pwittrock to the kubectl OWNERS file 2016-06-02 09:21:25 -07:00
k8s-merge-robot cae939b81c Merge pull request #26654 from janetkuo/e2e-deployment-list-rs
Automatic merge from submit-queue

List RSes once when getting old/new RSes in deployment e2e tests

Ref #26509 

[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-06-02 08:54:36 -07:00
k8s-merge-robot 8c66ffbddc Merge pull request #26581 from caesarxuchao/continue-25746
Automatic merge from submit-queue

fix kubectl patch example

Based on https://github.com/kubernetes/kubernetes/pull/25746, fix the kubectl example.

cc @tobstarr
2016-06-02 07:48:07 -07:00
k8s-merge-robot a27058156f Merge pull request #24901 from yifan-gu/support_selinux
Automatic merge from submit-queue

rkt: Add pod selinux support.

Currently only pod level selinux context is supported, besides when
running selinux, we will not be able to use the overlay fs, see:
https://github.com/coreos/rkt/issues/1727#issuecomment-173203129.


cc @kubernetes/sig-node  @alban @mjg59 @pmorie
2016-06-02 07:48:02 -07:00
Scott Creeley a36cd3d55b read gluster log to surface glusterfs plugin errors properly 2016-06-02 09:09:14 -04:00
deads2k bf22534101 add logging for flake 2016-06-02 07:44:17 -04:00
k8s-merge-robot 335da9b125 Merge pull request #26410 from jsafrane/fix-test-race
Automatic merge from submit-queue

Fix data race in volume controller unit test.

Reactor must be locked when fiddling with reactor.volumes and reactor.claims. Therefore add new functions to add/delete volume/claim with sending an event.

Fixes #26345
2016-06-02 04:25:08 -07:00
k8s-merge-robot cf234ab67d Merge pull request #26251 from caesarxuchao/add-serializer
Automatic merge from submit-queue

Add direct serializer

Fix #25589. Implemented a direct codec that doesn't do conversion, but sets the group, version and kind before serialization as Clayton suggested [here](https://github.com/kubernetes/kubernetes/issues/25589#issuecomment-219168009).

First commit is cherry-picked from #24826.

@kubernetes/sig-api-machinery
2016-06-01 23:31:47 -07:00
k8s-merge-robot 745eb08e83 Merge pull request #26595 from janetkuo/log-test-e2e-deployment
Automatic merge from submit-queue

Adding logs in deployment for debugging



Ref #26509
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-06-01 20:35:42 -07:00
Euan Kemp 40efc0fb33 rkt: Wrap exec errors as utilexec.ExitError
This is needed by the exec prober to distinguish error types and exit
codes correctly.

An alternative, and preferable solution would be to use utilexec
everywhere, but that change is much more involved and should come at a
later date. Unfortunately, until that change is made, writing tests for
this is quite difficult.
2016-06-01 15:34:49 -07:00
Janet Kuo 57ec715c61 Address comments 2016-06-01 15:00:29 -07:00
Janet Kuo 2ced966cd5 List RSes once when getting old/new RSes in deployment e2e tests 2016-06-01 14:19:35 -07:00
Janet Kuo 4615d1e24c Add more information when throwing errors in discoverying 3rd party resources 2016-06-01 13:18:50 -07:00
k8s-merge-robot 73eb45f22a Merge pull request #26624 from sttts/sttts-kubectl-run-attach-desc
Automatic merge from submit-queue

Fix kubectl --attach decription with deprecated --interactive

<!--
Checklist for submitting a Pull Request

Please remove this comment block before submitting.

1. Please read our [contributor guidelines](https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md).
2. See our [developer guide](https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md).
3. If you want this PR to automatically close an issue when it is merged,
   add `fixes #<issue number>` or `fixes #<issue number>, fixes #<issue number>`
   to close multiple issues (see: https://github.com/blog/1506-closing-issues-via-pull-requests).
4. Follow the instructions for [labeling and writing a release note for this PR](https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes) in the block below.
-->

```release-note
* Use the release-note-* labels to set the release note state 
* Clear this block to use the PR title as the release note 
-OR-
* Enter your extended release note here
```


[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-06-01 12:43:09 -07:00
k8s-merge-robot 517dedd419 Merge pull request #26619 from jsafrane/fix-fake-recorder-flake
Automatic merge from submit-queue

Fix fake event recorder race

Event recorder should wait for some time to get all expected events, the event may be written by another goroutine that just have finished.

It should not slow down the test in most cases, only when there is a bug and expected event is not sent.

Fixes #26578 

Using P2 to speed up merge and to prevent further flakes.

@kubernetes/sig-storage
2016-06-01 11:41:46 -07:00
k8s-merge-robot 46323336cb Merge pull request #26559 from wojtek-t/max_idle_conns_per_host
Automatic merge from submit-queue

Max idle conns per host

Ref #26519

Hopefully, this will at least somehow help with #26519 

@gmarek @krousey @lavalamp
2016-06-01 11:41:42 -07:00
Yifan Gu 0a7537ecbf rkt: Add pod selinux support.
Currently only pod level selinux context is supported, besides when
running selinux, for now we will not be able to use the overlay fs
except for coreos, see:
https://github.com/coreos/rkt/issues/1727#issuecomment-173203129.
2016-06-02 00:55:27 +08:00
Abhishek Shah 4224dbd6c6 Added DNS reverse lookup 2016-06-01 09:54:57 -07:00
Dr. Stefan Schimanski 026804c2be Fix kubectl --attach decription with deprecated --interactive 2016-06-01 13:21:39 +02:00
k8s-merge-robot 2976e892a4 Merge pull request #26562 from victorgp/master
Automatic merge from submit-queue

Minor typo in comment, SSLv3 instead of SSLv4

Minor fix in a comment from this PR https://github.com/kubernetes/kubernetes/pull/26169
2016-06-01 03:13:23 -07:00
k8s-merge-robot 6277eea57b Merge pull request #26200 from yifan-gu/remove_systemd_quotes
Automatic merge from submit-queue

rkt: Remove quotes in the systemd ExecStart command.

cc @euank @dcbw
2016-06-01 03:13:19 -07:00
k8s-merge-robot 99fab4a87d Merge pull request #25374 from brendandburns/plural
Automatic merge from submit-queue

Fix a bug with pluralization of third party resources

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

@kubernetes/sig-api-machinery 

[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-06-01 02:25:30 -07:00
Jan Safranek ee74cc4354 Fix fake event recorder race
Event recorder should wait for some time to get all expected events, the event
may be written by another goroutine that just have finished.

It should not slow down the test in most cases, only when there is a bug and
expected event is not sent.
2016-06-01 10:16:35 +02:00
k8s-merge-robot 0a6a52b19d Merge pull request #26597 from caesarxuchao/fix-26425
Automatic merge from submit-queue

retry GetThirdPartyGroupVersions

GetThirdPartyGroupVersions() may return a "NotFound" error if a thirdparty group is deleted in the interim between the group-discovery and the resource-discovery. This is causing e2e flakes in all tests that run kubectl, because test/e2e/thirdparty.go is creating/deleting thirdparty groups.

Fix #26425

The e2e flakes will have the following pattern:
1. the test is calling kubectl
2. error message is `Error from server: the server could not find the requested resource`
3. in the apiserver log, you should see `GET /apis/company.com/v1: (518.944µs) 404 [[kubectl/v1.3.0 (linux/amd64) kubernetes/ae28564] 104.154.110.118:46043]`

For detail see [here](https://github.com/kubernetes/kubernetes/issues/26425#issuecomment-222844523)

cc @janetkuo @brendanburns
2016-06-01 00:02:43 -07:00
Jan Safranek 2d43e4549e Fix data race in volume controller unit test.
Reactor must be locked when fiddling with reactor.volumes and reactor.claims.
Therefore add new functions to add/delete volume/claim with sending an event.
2016-06-01 08:35:33 +02:00
k8s-merge-robot 04f77dd602 Merge pull request #26556 from jsafrane/fix-format
Automatic merge from submit-queue

Fix log arguments.

'i' is not printed.
@kubernetes/sig-storage
2016-05-31 21:24:50 -07:00
Chao Xu 7cea7ccd8d retry GetThirdPartyGroupVersions 2016-05-31 17:14:24 -07:00
k8s-merge-robot 38d5be4f36 Merge pull request #26555 from jsafrane/stabilize-test-flakes
Automatic merge from submit-queue

Stabilize controller unit tests.

Remove test "5-1", it's flaky as it depends on order of execution of goroutines. When the controller starts, existing claim is enqueued as "initial sync event" and a new volume is enqueued to separate goroutine. It is not deterministic which goroutine processes its events first and there is no way how to tell that the claim event was processed.

Also, force resync of the controllers after the test to make sure all events are processed.

Fixes unit test flakes.
@kubernetes/sig-storage
2016-05-31 17:06:12 -07:00