Commit Graph

3192 Commits (b038355c81ee621ef0bb199c20442879b97eadc1)

Author SHA1 Message Date
Kubernetes Submit Queue 1933462c7b Merge pull request #29925 from ronnielai/container-gc
Automatic merge from submit-queue

Delete containers when pod is evicted

#29803
2016-08-04 04:20:02 -07:00
Kubernetes Submit Queue c2614aee9a Merge pull request #29500 from lixiaobing10051267/masterFound
Automatic merge from submit-queue

Check all places to break the loop when object found

Check all places to break the loop when object found.
2016-08-03 20:05:15 -07:00
Kubernetes Submit Queue a2bef42f84 Merge pull request #29036 from ronnielai/image-gc-2
Automatic merge from submit-queue

Consolidating image pulling logic

Moving image puller logic into image manager by consolidating 2 pullers into one implementation.
2016-08-03 17:39:06 -07:00
Ron Lai 8bc4444f16 Delete containers when pod is deleted 2016-08-03 15:56:04 -07:00
Yu-Ju Hong 5c06d7e620 CRI: rename DeletePodSandbox to RemovePodSandbox
This makes it consistent with other calls (e.g., RemoveContainer, RemoveImage).
2016-08-03 15:46:34 -07:00
Ron Lai 321c289792 Consolidating imaging pulling logic 2016-08-03 10:48:50 -07:00
Kubernetes Submit Queue 804109d349 Merge pull request #29950 from andreykurilin/kubelet_typos
Automatic merge from submit-queue

Fix various typos in kubelet
2016-08-03 10:05:46 -07:00
Kubernetes Submit Queue 73deb72399 Merge pull request #29824 from feiskyer/kuberuntime
Automatic merge from submit-queue

Kubelet: add kubeGenericRuntimeManager for new runtime API

Part of #28789. Add `kubeGenericRuntimeManager` for kubelet new runtime API #17048. 

Note that:

- To facilitate code reviewing, #28396 is splited into a few small PRs. This is the first part.
- This PR also fixes some syntax errors in `api.proto`.
- This PR is depending on #29811 (already merged).

CC @yujuhong @Random-Liu @kubernetes/sig-node
2016-08-03 10:05:42 -07:00
Kubernetes Submit Queue 93385a2f97 Merge pull request #29623 from feiskyer/kuberuntime-remote
Automatic merge from submit-queue

Kubelet: add gRPC implementation of new runtime interface

Add gRPC implementation of new runtime interface.

CC @yujuhong @Random-Liu  @kubernetes/sig-node
2016-08-02 23:36:26 -07:00
Pengfei Ni 81a79cd4c0 Kubelet: add kubeGenericRuntimeManager for new runtime API 2016-08-03 08:26:53 +08:00
Pengfei Ni f8c51adbe1 Log id in error message 2016-08-03 07:22:06 +08:00
Yu-Ju Hong 5960d87d21 dockershim: Implement sandbox methods 2016-08-02 15:24:52 -07:00
Andrey Kurilin 9f1c3a4c56 Fix various typos in kubelet 2016-08-03 01:14:44 +03:00
k8s-merge-robot 68632db799 Merge pull request #27562 from 7ing/ipt
Automatic merge from submit-queue

improve iptables-restore implementation #27559

[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
fixes #27559
- improve restoreInternal implementation in iptables
- add SetStdin and SetStdout functions to Cmd interface
- modify kubelet/prober and some tests in order to work with Cmd interface
2016-08-02 08:02:32 -07:00
k8s-merge-robot 6cd89cba62 Merge pull request #29811 from feiskyer/kuberuntime-fake
Automatic merge from submit-queue

Kubelet: add fake kube runtime

Add a new fake kube runtime with kubelet using the new runtime API.

CC @yujuhong @Random-Liu
2016-08-02 04:59:15 -07:00
k8s-merge-robot 6a61a1b4bd Merge pull request #29775 from ZTE-PaaS/zhangke-patch-012
Automatic merge from submit-queue

pods which can not be admitted should return directly

if the pod can not be admitted, the code runPod(pod, retryDelay) should not be run.
2016-08-02 03:11:10 -07:00
Pengfei Ni b581e23c93 Kubelet: add gRPC implementation of new runtime interface 2016-08-02 16:43:02 +08:00
k8s-merge-robot 01cd7f326e Merge pull request #29621 from resouer/uuid
Automatic merge from submit-queue

Refactor uuid into its own pkg util/uuid

Continuing my work ref #15634

Anyone can review this if he/she wants.
2016-08-01 22:21:30 -07:00
Pengfei Ni bf7a941b92 Kubelet: implement fake runtime/image service 2016-08-02 12:17:20 +08:00
k8s-merge-robot d9ca9e8cbf Merge pull request #29884 from yujuhong/mv_services
Automatic merge from submit-queue

kubelet: move kuberuntime.go to api/services.go
2016-08-01 18:41:27 -07:00
Yu-Ju Hong 97e30e134e kubelet: move kuberuntime.go to api/services.go
Also add a testing package and add placeholders for fake services.
2016-08-01 15:31:55 -07:00
Michal Rostecki 59ca5986dd Print/log pointers of structs with %#v instead of %+v
There are many places in k8s where %+v is used to format a pointer
to struct, which isn't working as expected.

Fixes #26591
2016-08-01 22:27:56 +02:00
k8s-merge-robot 63602348a4 Merge pull request #29009 from bboreham/hairpin-via-cni
Automatic merge from submit-queue

Use the CNI bridge plugin to set hairpin mode

Following up this part of #23711:

>  I'd like to wait until containernetworking/cni#175 lands and then just pass the request through to CNI.

The code here just
 * passes the required setting down from kubenet to CNI
 * disables `DockerManager` from doing hairpin-veth, if kubenet is in use

Note to test you need a very recent version of the CNI `bridge` plugin; the one brought in by #28799 should be OK.

Also relates to https://github.com/kubernetes/kubernetes/issues/19766#issuecomment-232722864
2016-07-31 10:08:06 -07:00
Harry Zhang c495397cae Refactor uuid into its own pkg 2016-07-30 00:07:02 -04:00
Ke Zhang e48f995987 pods can not admitted should return directly 2016-07-30 11:47:50 +08:00
k8s-merge-robot cc1a02620b Merge pull request #29766 from feiskyer/runtime-remove-clarify
Automatic merge from submit-queue

Kubelet: clarify the resource remove logic in runtime API

CC @yujuhong
2016-07-29 19:51:58 -07:00
k8s-merge-robot c5756d22e2 Merge pull request #29779 from 249043822/patch-1
Automatic merge from submit-queue

make log description more readable
2016-07-29 17:25:28 -07:00
k8s-merge-robot 2c4599bf45 Merge pull request #28793 from ronnielai/container-gc
Automatic merge from submit-queue

Trigger container cleanup within a pod when a container exiting event is detected

#25239
2016-07-29 16:40:01 -07:00
Pengfei Ni cce9405e15 Clarify the resource remove logic in runtime API
If the resource in the delete call does not exist, the runtime should
not return an error. This eliminates the need for kubelet to define a
resource "not found" error that every runtime has to return.
2016-07-30 07:00:16 +08:00
k8s-merge-robot 5760acf603 Merge pull request #29596 from matttproud/fix/time-leaks/remainder
Automatic merge from submit-queue

pkg/various: plug leaky time.New{Timer,Ticker}s

According to the documentation for Go package time, `time.Ticker` and
`time.Timer` are uncollectable by garbage collector finalizers.  They
leak until otherwise stopped.  This commit ensures that all remaining
instances are stopped upon departure from their relative scopes.

Similar efforts were incrementally done in #29439 and #29114.

```release-note
* pkg/various: plugged various time.Ticker and time.Timer leaks.
```
2016-07-29 14:06:47 -07:00
k8s-merge-robot 94b5d52b90 Merge pull request #29580 from yujuhong/dshim2
Automatic merge from submit-queue

dockershim: Implement more functions.

Based on #29553. Only the last two commits are new.
2016-07-29 12:55:56 -07:00
k8s-merge-robot 46c8dfd7a2 Merge pull request #29135 from Clarifai/kubelet-util-ipt
Automatic merge from submit-queue

kubelet: use util/iptables, which uses -w (lock wait) where safe

cc @thockin @dchen1107
2016-07-29 10:10:11 -07:00
Rudi Chiarito 13b082968b Add tests for container_bridge.go (really just ensureIPTablesMasqRule) 2016-07-29 11:57:17 -04:00
KeZhang fe031d3347 make log description more readable 2016-07-29 22:50:56 +08:00
k8s-merge-robot 821ff657f9 Merge pull request #27199 from derekwaynecarr/disk_eviction
Automatic merge from submit-queue

Initial support for pod eviction based on disk

This PR adds the following:

1. node reports disk pressure condition based on configured thresholds
1. scheduler does not place pods on nodes reporting disk pressure
1. kubelet will not admit any pod when it reports disk pressure
1. kubelet ranks pods for eviction when low on disk
1. kubelet evicts greediest pod

Follow-on PRs will need to handle:

1. integrate with new image gc PR (https://github.com/kubernetes/kubernetes/pull/27199)
1. container gc policy should always run (will not be launched from eviction, tbd who does that)
  1. this means kill pod is fine for all eviction code paths since container gc will remove dead container
1. min reclaim support will just poll summary provider (derek will do follow-on)
1. need to know if imagefs is same device as rootfs from summary (derek follow-on)

/cc @vishh @kubernetes/sig-node
2016-07-28 20:18:54 -07:00
Yu-Ju Hong e80ad2be38 dockershim: add support for legacy methods 2016-07-28 18:24:29 -07:00
Yu-Ju Hong 03971d3992 dockershim: implement ContainerStatus() 2016-07-28 18:24:29 -07:00
k8s-merge-robot 7aa592bfa3 Merge pull request #29553 from yujuhong/docker-shim
Automatic merge from submit-queue

Add a docker-shim package

Add a new docker integration with kubelet using the new runtime API.
This change adds the package with the skeleton and implements some of the basic operations.


This PR only implements a small sets of functions. The rest of the functions will be implemented
in the followup PRs to keep the changes readable, and the reviewers sane.

Note: The first commit is from #28396, only the second commit is for review. 

/cc @kubernetes/sig-node @feiskyer @Random-Liu
2016-07-28 17:58:56 -07:00
derekwaynecarr d37710f87b Allow cAdvisor to collect fs stats before building resource ranking funcs 2016-07-28 16:20:09 -04:00
derekwaynecarr 0de1e62b30 modify fsStats to fsStatsType to avoid confusion with cadvisor types 2016-07-28 16:01:38 -04:00
derekwaynecarr c3324b88a0 Eviction manager observes and acts on disk pressure 2016-07-28 16:01:38 -04:00
Rudi Chiarito d6427cd0d7 kubelet: use util/iptables, which uses -w (lock wait) where safe 2016-07-28 16:01:00 -04:00
k8s-merge-robot 61524b9e15 Merge pull request #29526 from vishh/logfilelen
Automatic merge from submit-queue

Restrict log sym link to 256 characters

This fix can potentially cause conflicts in log file names. The current model of exporting log data is fundamentally broken. This PR does not attempt to fix all of the issues.
2016-07-28 12:10:51 -07:00
k8s-merge-robot eae90a3631 Merge pull request #26332 from resouer/util-debt
Automatic merge from submit-queue

Refactor util clock into it's own pkg

Continue my work ref #15634
2016-07-28 11:37:06 -07:00
Vishnu Kannan acc74fbaa9 restrict log sym link filename to 255 characters
Signed-off-by: Vishnu Kannan <vishnuk@google.com>
2016-07-28 10:23:17 -07:00
k8s-merge-robot 7e1e51844f Merge pull request #29618 from aveshagarwal/master-rhbz-1357825
Automatic merge from submit-queue

Fix kubelet to not accept negative eviction (hard, soft) thresholds

@kubernetes/rh-cluster-infra @derekwaynecarr
2016-07-28 08:10:02 -07:00
Bryan Boreham f21d2dde5a Add comment per review feedback 2016-07-28 12:34:21 +01:00
k8s-merge-robot 2480ef5f1d Merge pull request #28178 from mikedanese/cni-reload
Automatic merge from submit-queue

periodically reload the cni plugin configuration

Might fix #28787
2016-07-28 02:27:43 -07:00
Harry Zhang cb14b35bde Refactor util clock into it's own pkg 2016-07-28 02:29:04 -04:00
k8s-merge-robot 1ae9b73cd3 Merge pull request #29673 from pmorie/mount-collision
Automatic merge from submit-queue

Fix mount collision timeout issue

Short- or medium-term workaround for #29555.  The root issue being fixed here is that the recent attach/detach work in the kubelet uses a unique volume name as a key that tracks the work that has to be done for each volume in a pod to attach/mount/umount/detach.  However, the non-attachable volume plugins do not report unique names for themselves, which causes collisions when a single secret or configmap is mounted multiple times in a pod.

This is still a WIP -- I need to add a couple E2E tests that ensure that tests break in the future if there is a regression -- but posting for early review.

cc @kubernetes/sig-storage 

Ultimately, I would like to refine this a bit further.  A couple things I would like to change:

1.  `GetUniqueVolumeName` should be a property ONLY of attachable volumes
2.  I would like to see the kubelet apparatus for attach/mount/umount/detach handle non-attachable volumes specifically to avoid things like the `WaitForControllerAttach` call that has to be done for those volume types now
2016-07-27 21:06:47 -07:00