Commit Graph

31770 Commits

Author SHA1 Message Date
Pawel Skrzynski
50751f73ab Unset KUBERNETES_PROVIDER when KUBERNETES_CONFORMANCE_TEST is set 2016-07-11 18:43:37 +02:00
k8s-merge-robot
9b74e24fa3 Merge pull request #28769 from wojtek-t/optimize_priorities
Automatic merge from submit-queue

Optimize priorities in scheduler

Ref #28590

It's probably easier to review it commit by commit, since those changes are kind of independent from each other.

@davidopp - FYI
2016-07-11 07:49:23 -07:00
Wojciech Tyczynski
d02e8d2885 Avoid unnecessary conversions 2016-07-11 15:41:27 +02:00
Wojciech Tyczynski
dcb2ca54ad Avoid unnecessary copies 2016-07-11 15:41:27 +02:00
Wojciech Tyczynski
989202c384 Cache AllowedPodNumber to avoid conversions. 2016-07-11 15:41:26 +02:00
Wojciech Tyczynski
4eed5e07a5 Precompute pod resources 2016-07-11 15:41:26 +02:00
Wojciech Tyczynski
e8e8e2d086 Remove unneeded factories 2016-07-11 15:41:26 +02:00
k8s-merge-robot
897d277095 Merge pull request #28762 from lixiaobing10051267/masterToScheduler
Automatic merge from submit-queue

Error info "scheduler" modify

File "plugin\pkg\scheduler\algorithm\scheduler_interface_test.go“, line 49, "st.t.Errorf("Unexpected error %v\nTried to scheduler: %#v", err, pod)", here "scheduler" should be "schedule" because it is to schedule pod.
2016-07-11 03:30:34 -07:00
k8s-merge-robot
39bfa168cd Merge pull request #28684 from kargakis/deployment-controller-updates
Automatic merge from submit-queue

Deployment controller updates

@kubernetes/deployment @deads2k PTAL
2016-07-11 02:56:47 -07:00
lixiaobing10051267
ce83c04251 Error info "scheduler" modify 2016-07-11 15:17:43 +08:00
k8s-merge-robot
0a6561f5e9 Merge pull request #28704 from dims/fix-issue-11747
Automatic merge from submit-queue

E2E test for kubectl replace
2016-07-11 00:14:57 -07:00
k8s-merge-robot
6462f82243 Merge pull request #28697 from Random-Liu/fix-kube-proxy-panic
Automatic merge from submit-queue

Prevent kube-proxy from panicing when sysfs is mounted as read-only.

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

This PR:
* Checks the permission of sysfs before setting conntrack hashsize, and returns an error "readOnlySysFSError" if sysfs is readonly. As I know, this is the only place we need write permission to sysfs, CMIIW.
* Update a new node condition 'RuntimeUnhealthy' with specific reason, message and hit to the administrator about the remediation.

I think this should be an acceptable fix for now.
Node problem detector is designed to integrate with different problem daemons, but **the main logic is in the problem detection phase**. After the problem is detected, what node problem detector does is also simply updating a node condition.

If we let kube-proxy pass the problem to node problem detector and let node problem detector update the node condition. It looks like an unnecessary hop. The logic in kube-proxy won't be different from this PR, but node problem detector will have to open an unsafe door to other pods because the lack of authentication mechanism.

It is a bit hard to test this PR, because we don't really have a bad docker in hand. I can only manually test it:
* If I manually change the code to let it return `"readOnlySysFSError`, the node condition will be updated:
```
  NetworkUnavailable 	False 	Mon, 01 Jan 0001 00:00:00 +0000 	Fri, 08 Jul 2016 01:36:41 -0700 	RouteCreated 			RouteController created a route
  OutOfDisk 		False 	Fri, 08 Jul 2016 01:37:36 -0700 	Fri, 08 Jul 2016 01:34:49 -0700 	KubeletHasSufficientDisk 	kubelet has sufficient disk space available
  MemoryPressure 	False 	Fri, 08 Jul 2016 01:37:36 -0700 	Fri, 08 Jul 2016 01:34:49 -0700 	KubeletHasSufficientMemory 	kubelet has sufficient memory available
  Ready 		True 	Fri, 08 Jul 2016 01:37:36 -0700 	Fri, 08 Jul 2016 01:35:26 -0700 	KubeletReady 			kubelet is posting ready status. WARNING: CPU hardcapping unsupported
  RuntimeUnhealthy 	True 	Fri, 08 Jul 2016 01:35:31 -0700 	Fri, 08 Jul 2016 01:35:31 -0700 	ReadOnlySysFS 			Docker unexpectedly mounts sysfs as read-only for privileged container (docker issue #24000). This causes the critical system components of Kubernetes not properly working. To remedy this please restart the docker daemon.
  KernelDeadlock 	False 	Fri, 08 Jul 2016 01:37:39 -0700 	Fri, 08 Jul 2016 01:35:34 -0700 	KernelHasNoDeadlock 		kernel has no deadlock
Addresses:		10.240.0.3,104.155.176.101
```
* If not, the node condition `RuntimeUnhealthy` won't appear.
* If I run the permission checking code in a unprivileged container, it did return `readOnlySysFSError`.

I'm not sure whether we want to mark the node as `Unscheduable` when this happened, which only needs few lines change. I can do that if we think we should.

I'll add some unit test if we think this fix is acceptable.

/cc @bprashanth @dchen1107 @matchstick @thockin @alex-mohr 

Mark P1 to match the original issue.
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-07-10 23:42:43 -07:00
k8s-merge-robot
d6e84cc2e9 Merge pull request #28570 from kevinjkj/kevinjkj-patch-3
Automatic merge from submit-queue

Optimizing the processing flow of HandlePodAdditions and canAdmitPod …

Optimizing the processing flow of HandlePodAdditions and canAdmitPod methods. If the following loop body in canAdmitPod method is removed, the detection speed can be improved, and the change is very small.
------
otherPods := []*api.Pod{}
	for _, p := range pods {
		if p != pod {
			otherPods = append(otherPods, p)
		}
	}
------
2016-07-10 23:11:00 -07:00
Random-Liu
4246853211 Prevent kube-proxy from panicing when sysfs is mounted as read-only.
Send a node event when this happens and hint to the administrator
about the remediation.
2016-07-10 22:32:51 -07:00
k8s-merge-robot
1c535008ca Merge pull request #28672 from ping035627/ping035627-patch-0708
Automatic merge from submit-queue

Inspect the nodeInfo first for CheckServiceAffinity in predicates.go

Suggest to inspect the nodeInfo first for CheckServiceAffinity in predicates.go. When nodeInfo.Node() is nil, return quickly.
2016-07-10 21:17:37 -07:00
Kevin Wang
09344c1ffc Optimizing the processing flow of HandlePodAdditions and canAdmitPod methods.
Signed-off-by: Kevin Wang <wang.kanghua@zte.com.cn>

change the note for the canAdmitPod method.

Signed-off-by: Kevin Wang <wang.kanghua@zte.com.cn>

gofmt kubelet.go

Signed-off-by: Kevin Wang <wang.kanghua@zte.com.cn>
2016-07-11 10:34:51 +08:00
PingWang
4fde2ff3a5 Update CheckServiceAffinity in predicates.go
Signed-off-by: PingWang <wang.ping5@zte.com.cn>

gofmt -s -w

Signed-off-by: PingWang <wang.ping5@zte.com.cn>
2016-07-11 09:57:57 +08:00
k8s-merge-robot
710374b65f Merge pull request #22217 from davidopp/rescheduling
Automatic merge from submit-queue

[WIP/RFC] Rescheduling in Kubernetes design proposal

Proposal by @bgrant0607 and @davidopp (and inspired by years of discussion and experience from folks who worked on Borg and Omega).

This doc is a proposal for a set of inter-related concepts related to "rescheduling" -- that is, "moving" an already-running pod to a new node in order to improve where it is running. (Specific concepts discussed are priority, preemption, disruption budget, quota, `/evict` subresource, and rescheduler.)

Feedback on the proposal is very welcome. For now, please stick to comments about the design, not spelling, punctuation, grammar, broken links, etc., so we can keep the doc uncluttered enough to make it easy for folks to comment on the more important things. 

ref/ #22054 #18724 #19080 #12611 #20699 #17393 #12140 #22212

@HaiyangDING @mqliang @derekwaynecarr @kubernetes/sig-scheduling @kubernetes/huawei @timothysc @mml @dchen1107
2016-07-10 16:12:21 -07:00
David Oppenheimer
b77e39298e Rescheduling in Kubernetes design proposal. 2016-07-10 14:59:59 -07:00
k8s-merge-robot
00d00cdac0 Merge pull request #26315 from dims/fix-issue-26303
Automatic merge from submit-queue

Support --all-namespaces in kubectl describe


Work In Progress :)

Fixes #26303
2016-07-10 08:00:23 -07:00
Eric Tune
b983849abe Merge pull request #28564 from erictune/foof
Update changelog.
2016-07-10 07:57:36 -07:00
k8s-merge-robot
a261776f3e Merge pull request #28670 from wojtek-t/scheduler_metadata
Automatic merge from submit-queue

Add meta field to predicate signature to avoid computing the same things multiple times

This PR only uses it to avoid computing QOS of a pod for every node from scratch.

Ref #28590
2016-07-09 22:28:14 -07:00
k8s-merge-robot
c12de567cd Merge pull request #26931 from xiang90/fix_daemon
Automatic merge from submit-queue

daemon/controller.go: fix bugs in updateDaemonSetStatus

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

1. return when there is any error

2. fix StatusUpdateRetries loop

3. a few minor cleanup
2016-07-09 15:31:48 -07:00
k8s-merge-robot
836c60ccff Merge pull request #28624 from lorrin/gnu_sed_osx
Automatic merge from submit-queue

Fix build on OS X when GNU sed is present.

See #20147, which fixed it when system default BSD sed was present but did not account for possibility of GNU sed on OS X.

See also http://unix.stackexchange.com/questions/92895/how-to-achieve-portability-with-sed-i-in-place-editing

[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-07-09 10:30:56 -07:00
Davanum Srinivas
87771957d0
E2E test for kubectl replace
Fixes #10764
2016-07-09 09:41:01 -04:00
k8s-merge-robot
322e1c97e0 Merge pull request #28686 from smarterclayton/name_check_wrong
Automatic merge from submit-queue

Name check for go-to-protobuf in wrong spot

@thockin this can land after your change, but is wrong today.
2016-07-09 03:38:21 -07:00
k8s-merge-robot
91226f77a1 Merge pull request #28680 from wojtek-t/advanced_node_info_map_copy
Automatic merge from submit-queue

Avoid creating NodeInfoMap from scratch on every scheduling.

Ref #28590
2016-07-09 03:03:05 -07:00
k8s-merge-robot
6eae13e0c4 Merge pull request #28133 from freehan/e2ejunit
Automatic merge from submit-queue

add junit recording in e2e runner

2nd part of #27825  

Injected junit recorder at a few places.
2016-07-09 01:55:07 -07:00
Erick Fejta
a77010b3b3 Merge pull request #28725 from fejta/auth
Only activate service account when file exists
2016-07-09 00:21:54 -07:00
Erick Fejta
4ea125f9eb Only activate service account when file exists 2016-07-09 00:16:20 -07:00
k8s-merge-robot
3961631b0f Merge pull request #28634 from fejta/auth
Automatic merge from submit-queue

Activate a service account if this is defined

For https://github.com/kubernetes/test-infra/issues/266 and https://github.com/kubernetes/kubernetes/issues/28612

This will activate a service account if the service account file exists.
2016-07-08 23:17:45 -07:00
k8s-merge-robot
e712b3c47a Merge pull request #28627 from ronnielai/disk-gc2
Automatic merge from submit-queue

RemoveContainer in Runtime interface

- Added a DeleteContainer method in Runtime interface
- Implemented DeleteContainer for docker

#28552
2016-07-08 22:18:51 -07:00
k8s-merge-robot
3b3f7fb09c Merge pull request #27977 from ciwang/move-storage-examples
Automatic merge from submit-queue

Move storage examples

Fixes #23671 

Consolidate storage examples into separate folders for storage and volume plugins
2016-07-08 21:45:38 -07:00
k8s-merge-robot
01c0f8cb54 Merge pull request #28587 from wojtek-t/remove_codec_from_content_config
Automatic merge from submit-queue

Remove Codec from ContentConfig.

This is the remaining cleanup after adding NegotiatedSerializer to ContentConfig.
2016-07-08 21:12:24 -07:00
k8s-merge-robot
66522389b7 Merge pull request #28572 from atombender/master
Automatic merge from submit-queue

Fixes bad heuristic when calling "tc show" to check interface

`tc` sometimes returns stuff that has more than 12 words in its response. The heuristic is bad, but this at least fixes the case when `tc` is returning too much.

Fixes #28571.
2016-07-08 19:47:45 -07:00
k8s-merge-robot
0f20ab63af Merge pull request #28566 from dubstack/dubstack-refactor-cgroup-manager
Automatic merge from submit-queue

Add checks in Create and Update Cgroup methods

This PR is connected to upstream issue for adding pod level cgroups in Kubernetes: #27204 
Libcontainer currently doesen't support updates to parent devices cgroups. Until we get libcontainer to support skipping devices cgroup we will have that logic on the kubelet side.
This PR includes:
1. Skip the devices cgroup when updating a cgroup. We only update the memory and cpu subsytems.
2. We explicitly pass all the cgroup paths that don't already exist to Apply() 
3. Adds an AlreadyExists() method which is a utility function to check if all the subsystems of a cgroup already exist. 
On cgroupManager.Update() we only call Set() and cgroupManager.Create() we only call Apply() method

@vishh PTAL
2016-07-08 19:12:01 -07:00
k8s-merge-robot
516fba7183 Merge pull request #28511 from pmorie/kubelet-move
Automatic merge from submit-queue

Extract kubelet network code into its own file

Continuing the effort to begin modularizing the kubelet, this PR extracts the networking code into its own file.

@kubernetes/sig-node cc @kubernetes/sig-network
2016-07-08 17:50:23 -07:00
k8s-merge-robot
9a4cc9979a Merge pull request #28504 from deads2k/allow-quota-injection
Automatic merge from submit-queue

allow lock acquisition injection for quota admission

Allows for custom lock acquisition when composing the quota admission controller.

@derekwaynecarr I'm still experimenting to make sure this satisfies the need downstream, but looking for agreement in principle
2016-07-08 17:15:39 -07:00
k8s-merge-robot
b71b6eb8e8 Merge pull request #25646 from nhlfr/kubectl-petset-resource
Automatic merge from submit-queue

Include petsets in kubectl valid commands

Petsets are already implemented in kubectl, but there were no hints
for that subcommand.

Fixes #25615
2016-07-08 16:36:54 -07:00
k8s-merge-robot
1376c99327 Merge pull request #27412 from liggitt/test-etcd-dir
Automatic merge from submit-queue

Allow specifying base location for test etcd data

Allows controlling where etcd test data goes. Needed in some environments (like AWS/EBS) to allow putting etcd data on a higher performing volume than /tmp
2016-07-08 15:16:40 -07:00
k8s-merge-robot
66d580bf3c Merge pull request #28661 from dubstack/dubstack-update-coreos
Automatic merge from submit-queue

Update coreos node e2e image to a version that uses cgroupfs

Temporary fix for #28192. This PR updates coreos node e2e image to a version that uses cgroupfs.

cc @vishh @yifan-gu
2016-07-08 14:40:23 -07:00
Cindy Wang
fedc513658 Consolidated examples into storage/ and volume/ folders
Search and replace for references to moved examples

Reverted find and replace paths on auto gen docs

Reverting changes to changelog

Fix bugs in test-cmd.sh

Fixed path in examples README

ran update-all successfully

Updated verify-flags exceptions to include renamed files
2016-07-08 13:34:32 -07:00
k8s-merge-robot
f83f21f399 Merge pull request #28623 from elsonrodriguez/openstack-release-tar-fix
Automatic merge from submit-queue

Fixes #28205, Check release tar location for Openstack-Heat provider

This does a basic check to see where the release tars are located.

Allows people to use openstack-heat outside of compiling k8s.
2016-07-08 13:32:14 -07:00
k8s-merge-robot
96f2e94056 Merge pull request #27808 from david-mcmahon/kube-upstream
Automatic merge from submit-queue

Move KUBE_GIT_UPSTREAM out of init.sh and into *-munge-docs.sh.

It is only used in those 2 scripts and this way we can set the value dynamically.
Clean up a bit too (80col, formatting)
2016-07-08 13:32:09 -07:00
Jordan Liggitt
e43e58c787
Allow specifying base location for test etcd data 2016-07-08 16:24:41 -04:00
Paul Morie
5c836f3582 Extract kubelet network code into its own file 2016-07-08 15:18:07 -04:00
k8s-merge-robot
04602bb9e5 Merge pull request #28655 from freehan/kubeproxyfix
Automatic merge from submit-queue

Don't delete affinity when endpoints are empty

closes: #25316
2016-07-08 11:28:43 -07:00
Buddha Prakash
fb7f18f542 Update node e2e image copy script 2016-07-08 11:10:23 -07:00
Eric Tune
b7c62a6d7e Update changelog. 2016-07-08 10:48:01 -07:00
Ron Lai
0a651402f2 - Added a DeleteContainer method in Runtime interface
- Implemented DeleteContainer for docker
2016-07-08 10:40:30 -07:00