Commit Graph

432 Commits (7ffa2faeacb213d25c86ab91a2ce5b67f30b9c33)

Author SHA1 Message Date
deads2k 6a4d5cd7cc start the apimachinery repo 2017-01-11 09:09:48 -05:00
Jeff Grafton 20d221f75c Enable auto-generating sources rules 2017-01-05 14:14:13 -08:00
Kubernetes Submit Queue f5d9c430e9 Merge pull request #39298 from feiskyer/images
Automatic merge from submit-queue

Kubelet: add image ref to ImageService interfaces

This PR adds image ref (digest or ID, depending on runtime) to PullImage result, and pass image ref in CreateContainer instead of image name. It also

* Adds image ref to CRI's PullImageResponse
* Updates related image puller
* Updates related testing utilities

~~One remaining issue is: it breaks some e2e tests because they [checks image repoTags](https://github.com/kubernetes/kubernetes/blob/master/test/e2e/framework/util.go#L1941) while docker always returns digest in this PR. Should we update e2e test or continue to return repoTags in `containerStatuses.image`?~~

Fixes #38833.
2016-12-30 22:51:18 -08:00
Pengfei Ni 67a5bf8454 Rename imageservice.IsImagePresent to GetImageRef 2016-12-31 08:36:55 +08:00
Mike Danese 161c391f44 autogenerated 2016-12-29 13:04:10 -08:00
Pengfei Ni 394aad9d6b rkt: add image ref to ImageService interfaces 2016-12-29 16:53:09 +08:00
Dan Winship c788793868 Port remaining code to pkg/util/version 2016-12-13 08:53:24 -05:00
Mike Danese c87de85347 autoupdate BUILD files 2016-12-12 13:30:07 -08:00
Clayton Coleman 3454a8d52c
refactor: update bazel, codec, and gofmt 2016-12-03 19:10:53 -05:00
Clayton Coleman 5df8cc39c9
refactor: generated 2016-12-03 19:10:46 -05:00
Chao Xu bcc783c594 run hack/update-all.sh 2016-11-23 15:53:09 -08:00
Chao Xu 5e1adf91df cmd/kubelet 2016-11-23 15:53:09 -08:00
Rodolfo Carvalho 506129ba4e Add timeout argument to ExecInContainer
This allows us to interrupt/kill the executed command if it exceeds the
timeout (not implemented by this commit).

Set timeout in Exec probes. HTTPGet and TCPSocket probes respect the
timeout, while Exec probes used to ignore it.

Add e2e test for exec probe with timeout. However, the test is skipped
while the default exec handler doesn't support timeouts.
2016-11-07 13:00:59 +01:00
Random-Liu 4bd9dbf6ad Add RuntimeStatus in container/runtime.go 2016-11-05 00:02:05 -07:00
Tim St. Clair 86d849e374
Separate Direct and Indirect streaming paths, implement indirect path with CRI 2016-11-03 13:26:33 -07:00
Kubernetes Submit Queue a02750dd8f Merge pull request #35490 from bprashanth/dockershim_probe_net
Automatic merge from submit-queue

Migrate Network Logic into runtime II

- [x] Probing
- [x] Bootstrap CIDR
- [x] Setup/Teardown
- [ ] ~~Hostports~~
- [ ] ~~BWShaping~~

https://github.com/kubernetes/kubernetes/pull/34780
2016-11-01 11:08:34 -07:00
bprashanth 9c585baf1f Teach cri about podCIDR 2016-10-31 13:05:18 -07:00
Paul Morie 7fb99442a6 Refactor pkg/util/selinux 2016-10-26 09:38:03 -04:00
Mike Danese 763c4987f2 autogenerated 2016-10-24 14:47:27 -07:00
Random-Liu 0655ae56bb Add pod log garbage collection unit test. 2016-10-24 00:03:34 -07:00
Mike Danese 3b6a067afc autogenerated 2016-10-21 17:32:32 -07:00
Euan Kemp aff69401ae rkt: Convert image name to be a valid acidentifier
This fixes a bug whereby an image reference that included a port was not
recognized after being downloaded, and so could not be run
2016-10-10 20:36:35 -07:00
Yu-Ju Hong 2c64a29de1 Add fewer more owners for packages in kubelet 2016-09-28 17:57:24 -07:00
Ke Zhang 41ece9a901 Fix TODO: Rename podStatus to apiPodStatus, rename internalPodStatus to podStatus 2016-09-24 16:17:11 +08:00
Kubernetes Submit Queue 509096af21 Merge pull request #33301 from yujuhong/docker_hacks
Automatic merge from submit-queue

Fake container exec/logs support for in-process docker CRI integration

This is necessary to unblock other work on docker integration, while we are addressing
`logs` and `exec` in the meantime.

This is part of #31459 and #33189

/cc @kubernetes/sig-node
2016-09-22 17:44:37 -07:00
Yu-Ju Hong c43a106b26 Move ConvertPodStatusToRunningPod back to the kubelet/container package
This avoids unnecessary imports between of kuberuntime from dockertools/rkt,
which implements the same kubecontainer.Runtime interface.
2016-09-22 12:13:44 -07:00
Kubernetes Submit Queue 5b609f212c Merge pull request #32126 from intelsdi-x/kvm_fw
Automatic merge from submit-queue

Add port forwarding for rkt with kvm stage1

Port forwarding for rkt kvm using `socat`.
cc @yifan-gu @euank @pskrzyns @lukasredynk
2016-09-22 10:57:09 -07:00
Yu-Ju Hong ee5b6a2550 Move image pull throttling logic to kubelet/images
This allows runtimes in different packages (dockertools, rkt, kuberuntime) to
share the same logic. Before this change, only dockertools support this
feature. Now all three packages support image pull throttling.
2016-09-21 18:31:04 -07:00
Yifan Gu 27d4866c4e CRI: Add missing sandbox in runningPod.
Append containers that represent pod sandboxes when converting the
pod status to runningPod.
2016-09-19 11:52:00 -07:00
Kubernetes Submit Queue ff1a92fa03 Merge pull request #32410 from euank/revert-rktshim-image-service
Automatic merge from submit-queue

Revert "Merge pull request #30513 from tmrts/kubelet-rkt-cri/use-imag…

This reverts commit aff7dfcaab, reversing
changes made to 7a4d81ea43.

See https://github.com/kubernetes/kubernetes/pull/30513#issuecomment-245949664, this breaks tests for the rkt runtime.

The original PR also changed the source of image truth from the api-service to cli, which could have further implications which @yifan-gu could speak better to, so I think it's safer to just revert for now and discuss further in the rktlet repo / pr. The reverted code effectively already exists (with the bug in question already fixed) here https://github.com/kubernetes-incubator/rktlet/pull/5 .. once that's merged, we can vendor and call it over here in place of #30513.

@yifan-gu / @tmrts  if you think continuing with the changes and rolling forwards (just adding the `--full` flag to list to fix the immediate bug) is better, feel free to close this and open a PR with that change, but I think this approach is overall better for the reasons in the previous paragraph.

cc @tmrts @yifan-gu @kubernetes/sig-rktnetes @pskrzyns
2016-09-12 22:26:34 -07:00
Kubernetes Submit Queue 56242964ca Merge pull request #32148 from yifan-gu/hostnetwork_mount
Automatic merge from submit-queue

rkt: Refactor host file mounts for host network.

Do not mount /etc/hosts/ /etc/resolv.conf if they are already mounted.

Ref https://github.com/coreos/rkt/issues/2430#issuecomment-244343576
2016-09-09 21:50:39 -07:00
Euan Kemp b1ee543463 Revert "Merge pull request #30513 from tmrts/kubelet-rkt-cri/use-image-service"
This reverts commit aff7dfcaab, reversing
changes made to 7a4d81ea43.
2016-09-09 13:35:22 -07:00
Jacek J. Łakis 3a557c6127 kubelet: port forward for rkt-kvm 2016-09-09 13:46:17 +02:00
Kubernetes Submit Queue aff7dfcaab Merge pull request #30513 from tmrts/kubelet-rkt-cri/use-image-service
Automatic merge from submit-queue

Kubelet rkt CRI use ImageService

Implements `container.ImageService` and refactors the `pkg/kubelet/rkt` to use it
2016-09-08 02:49:58 -07:00
Yifan Gu 25786aca98 rkt: Refactor host file mounts for host network.
Do not mount /etc/hosts/ /etc/resolv.conf if they are already mounted.
2016-09-06 15:07:52 -07:00
Euan Kemp a2a324bf8b cluster/rkt: Update default rkt version 2016-09-06 12:09:11 -07:00
Euan Kemp 807d7ba8ec rkt: Remove recommended rkt version
This has been unhelpful logspam forever basically. We always want newer
versions of rkt to be viable options, and often they have bugfixes as
well.
2016-09-02 15:52:37 -07:00
Kubernetes Submit Queue 9deb18b989 Merge pull request #31378 from yifan-gu/rkt_fetch_no_store
Automatic merge from submit-queue

rkt: Force `rkt fetch` to fetch from remote to conform the image pull policy.

Fix https://github.com/kubernetes/kubernetes/issues/27646

Use `--no-store` option for `rkt fetch` to force it to fetch from remote.
However, `--no-store` will fetch the remote image regardless of whether the content of the image has changed or not. 
This causes performance downgrade when the image tag is ':latest' and the image pull policy is 'always'. 
The issue is tracked in https://github.com/coreos/rkt/issues/2937.
2016-08-26 01:53:20 -07:00
Yifan Gu de402ac2c5 rkt: Force `rkt fetch` to fetch from remote to conform the fetch policy. 2016-08-25 14:44:44 -07:00
Kubernetes Submit Queue 6901a00078 Merge pull request #31286 from yifan-gu/rkt_privileged
Automatic merge from submit-queue

rkt: Improve support for privileged pod (pod whose all containers are privileged) 

Fix https://github.com/kubernetes/kubernetes/issues/31100

This takes advantage of https://github.com/coreos/rkt/pull/2983 . By appending the new `--all-run` insecure-options to `rkt run-prepared` command when all the containers are privileged. The pod now gets more privileged power.
2016-08-25 06:58:43 -07:00
Tamer Tas e2fa97c411 pkg/kubelet/rkt: use rktshim.ImageService 2016-08-24 18:13:09 +03:00
Yifan Gu 173dbd700b rkt: Append `all-run` to `insecure-options` when the pod's all containers are privileged. 2016-08-23 14:07:18 -07:00
Yifan Gu d65a96a600 rkt: Override the config using the response from rkt api service. 2016-08-23 11:42:20 -07:00
Kubernetes Submit Queue f75910b7b4 Merge pull request #30934 from yifan-gu/fix_subpath
Automatic merge from submit-queue

rkt: Support subPath volume mounts feature

So that at most one volume object will be created for every unique
host path. Also the volume's name is random generated UUID to avoid
collision since the mount point's name passed by kubelet is not
guaranteed to be unique when 'subpath' is specified.

Should partially fix https://github.com/kubernetes/kubernetes/issues/26986 
The non-existing host path creation issue is not touched here.

cc @kubernetes/sig-rktnetes 
also cc @kubernetes/sig-node for the Mount name comments I added.
2016-08-21 03:07:20 -07:00
Kubernetes Submit Queue 4e571eafab Merge pull request #31032 from tmrts/fix/os-release-check
Automatic merge from submit-queue

pkg/kubelet/rkt: skip empty lines in getOSReleaseInfo

Follow-up of #31022
2016-08-21 02:29:33 -07:00
Tamer Tas d992c0e7c7 pkg/kubelet/rkt: skip empty lines in getOSReleaseInfo 2016-08-20 00:49:51 +03:00
Yifan Gu ce15f0e831 rkt: Refactoring the construction of the mount points.
So that at most one volume object will be created for every unique
host path. Also the volume's name is random generated UUID to avoid
collision since the mount point's name passed by kubelet is not
guaranteed to be unique when 'subpath' is specified.
2016-08-19 13:09:27 -07:00
Yifan Gu 3fac36585b rkt: Do not error out when there are unrecognized lines in os-release file.
Also fix the error handling which will cause panic.
2016-08-19 12:05:37 -07:00
Jess Frazelle 7e9d82129e
fix go vet errors
Signed-off-by: Jess Frazelle <jessfraz@google.com>

fix composites

Signed-off-by: Jess Frazelle <me@jessfraz.com>
2016-08-10 16:45:41 -07:00
Andrey Kurilin 9f1c3a4c56 Fix various typos in kubelet 2016-08-03 01:14:44 +03: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
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
Harry Zhang c495397cae Refactor uuid into its own pkg 2016-07-30 00:07:02 -04:00
k8s-merge-robot ab7d039c81 Merge pull request #29388 from ronnielai/image-gc-check
Automatic merge from submit-queue

Avoiding trying to gc images with no tags which are still in use

#29325
2016-07-27 16:44:50 -07:00
Ron Lai 64981aaf46 Avoiding trying to gc images with no tags which are still in use 2016-07-27 10:31:47 -07:00
Quentin Machu 9bf0ae5d78 rkt: Fix /etc/hosts /etc/resolv.conf permissions
This enables any users on the container to resolve DNS, instead of only root.
2016-07-23 13:32:37 +00:00
k8s-merge-robot d525d5345e Merge pull request #29119 from wongma7/pv-gid-squash2
Automatic merge from submit-queue

Allow PVs to specify supplemental GIDs

Retry of https://github.com/kubernetes/kubernetes/pull/28691 . Adds a Kubelet helper function for getting extra supplemental groups
2016-07-22 22:36:51 -07:00
Matthew Wong ae1575b5cc Set extra supplemental groups for rkt 2016-07-22 17:43:24 -04:00
k8s-merge-robot ac17b239b6 Merge pull request #29145 from yifan-gu/no_chtime
Automatic merge from submit-queue

rkt: Don't return if the service file doesn't exist when killing the pod

Remove an unused logic. Also this prevents the KillPod() from failing
when the service file doesn't exist. E.g., it can be removed by garbage
collection in a rare case:

1, There are already more than `gcPolicy.MaxContainers` containers running
   on the host.
2, The new pod(A) starts to run but doesn't enter 'RUNNING' state yet.
3, GC is triggered, and it sees the pod(A) is in an inactive state (not running),
   and the it needs to remove the pod to force the `gcPolicy.MaxContainers`.
4, GC fails to remove the pod because `rkt rm` fails when the pod is running,
   but it removes the service file anyway.
5, Follow up KillPod() call will fail because it cannot find the service file
   on disk.

Also this is possible only when the pod has been in prepared state for longer
than 1 min, which sounds like another issue.

cc @kubernetes/sig-rktnetes
2016-07-21 05:20:15 -07:00
Ron Lai 56b9daf50f Moving image pullers to images directory 2016-07-20 09:47:11 -07:00
k8s-merge-robot 3786701280 Merge pull request #28865 from ronnielai/image-gc-0
Automatic merge from submit-queue

Moving event.go from kubelet/container to kubelet/events
2016-07-18 22:54:03 -07:00
Yifan Gu b212662c1e rkt: Don't return if the service file doesn't exist when killing the pod.
Remove an unused logic. Also this prevents the KillPod() from failing
when the service file doesn't exist. E.g., it can be removed by garbage
collection in a rare case:

1, There are already more than `gcPolicy.MaxContainers` containers running
   on the host.
2, The new pod(A) starts to run but doesn't enter 'RUNNING' state yet.
3, GC is triggered, and it sees the pod(A) is in an inactive state (not running),
   and the it needs to remove the pod to force the `gcPolicy.MaxContainers`.
4, GC fails to remove the pod because `rkt rm` fails when the pod is running,
   but it removes the service file anyway.
5, Follow up KillPod() call will fail because it cannot find the service file
   on disk.

Also this is possible only when the pod has been in prepared state for longer
than 1 min, which sounds like another issue.
2016-07-18 14:48:13 -07:00
k8s-merge-robot fa174bcdaf Merge pull request #29042 from dims/fixup-imports
Automatic merge from submit-queue

Use Go canonical import paths

Add canonical imports only in existing doc.go files.
https://golang.org/doc/go1.4#canonicalimports

Fixes #29014
2016-07-18 07:23:38 -07:00
Davanum Srinivas 2b0ed014b7 Use Go canonical import paths
Add canonical imports only in existing doc.go files.
https://golang.org/doc/go1.4#canonicalimports

Fixes #29014
2016-07-16 13:48:21 -04:00
k8s-merge-robot d6336c4f4b Merge pull request #29024 from yifan-gu/copy_etc_hosts_resolv
Automatic merge from submit-queue

rkt: Copy the /etc/hosts /etc/resolv.conf into pod dir before mounting.

rkt: Copy the /etc/hosts /etc/resolv.conf into pod dir before mounting.
    
This enables the container to modify the /etc/hosts/ /etc/resolv.conf without changing the host's ones.
With this PR, we now match the docker's behavior.

Fix https://github.com/kubernetes/kubernetes/issues/29022

cc @kubernetes/sig-rktnetes @quentin-m
2016-07-15 18:56:48 -07:00
Yifan Gu 56698a6c3e rkt: Copy the /etc/hosts /etc/resolv.conf into pod dir before mounting.
This enables the container to modify the /etc/hosts/ /etc/resolv.conf
without changing the host's ones.

With this PR, we now match the docker's behavior.
2016-07-15 17:40:29 -07:00
k8s-merge-robot 50172148e4 Merge pull request #25273 from ncdc/exec-sigwinch
Automatic merge from submit-queue

Support terminal resizing for exec/attach/run

```release-note
Add support for terminal resizing for exec, attach, and run. Note that for Docker, exec sessions
inherit the environment from the primary process, so if the container was created with tty=false,
that means the exec session's TERM variable will default to "dumb". Users can override this by
setting TERM=xterm (or whatever is appropriate) to get the correct "smart" terminal behavior.
```

Fixes #13585
2016-07-14 07:26:49 -07:00
Andy Goldstein 3b21a9901b Support terminal resizing for exec/attach/run
Add support for terminal resizing for exec, attach, and run. Note that for Docker, exec sessions
inherit the environment from the primary process, so if the container was created with tty=false,
that means the exec session's TERM variable will default to "dumb". Users can override this by
setting TERM=xterm (or whatever is appropriate) to get the correct "smart" terminal behavior.
2016-07-13 17:06:16 -04:00
joe2far 5ead89b5bb Fixed several typos 2016-07-13 15:06:24 +01:00
Ron Lai e6b745122d Moving event.go from kubelet/container to kubelet/events 2016-07-12 17:42:29 -07:00
Ron Lai 0a651402f2 - Added a DeleteContainer method in Runtime interface
- Implemented DeleteContainer for docker
2016-07-08 10:40:30 -07:00
David McMahon ef0c9f0c5b Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
k8s-merge-robot 151c2249cc Merge pull request #28044 from yifan-gu/bump_rkt
Automatic merge from submit-queue

rkt: Bump required rkt version to 1.9.1.

Bump the rkt version to use the one that fixed the [go-systemd sdjournal issue](https://github.com/coreos/rkt/pull/2837), also match [release doc](https://github.com/kubernetes/kubernetes.github.io/blob/release-1.3/docs/getting-started-guides/rkt/index.md#prerequisite).

cc @kubernetes/sig-rktnetes @kubernetes/sig-node
2016-06-24 22:50:29 -07:00
Yifan Gu 8b1b9120c6 rkt: Fix the 'privileged' check when stage1 annotation is provided.
Previously when stage1 annotation is provided, we only checks if
the kubelet allows privileged, which is not useful as that is a global
setting.

Instead, we should check if the pod has explicitly set the privileged
security context to 'true'.
2016-06-24 16:33:12 -07:00
Yifan Gu 30c913e211 rkt: Bump required rkt version to 1.9.1. 2016-06-24 13:54:32 -07:00
k8s-merge-robot 89bb77d3e8 Merge pull request #27737 from yifan-gu/grace_period
Automatic merge from submit-queue

rkt: Refactor grace termination period.

Add `TimeoutStopSec` service option to support grace termination.

Found we can improve the grace-period-termination by adding a systemd service option.

cc @kubernetes/sig-rktnetes
2016-06-22 19:23:25 -07:00
Dan Williams a657d0587b kubelet/kubenet: Fix getRunningPods() to support rkt pods
Don't assume there's an infra container.
2016-06-22 13:45:13 -05:00
k8s-merge-robot ee35555cb6 Merge pull request #27570 from Random-Liu/add-runtime-request-timeout-flag
Automatic merge from submit-queue

Add runtime-request-timeout kubelet flag.

XRef #23563.

Addresses https://github.com/kubernetes/kubernetes/issues/27388#issuecomment-226570083.

Add a new kubelet flag `runtime-request-timeout`, and set to 2 minutes by default.
Now the flag only affects dockertools, rkt may also want to set request timeout according to the flag. @yifan-gu 

This PR also removed the timeout for all long running operations to avoid issues like #27588 and #26122.

@yujuhong @rrati 
/cc @kubernetes/sig-node 

[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-06-21 01:26:54 -07:00
Yifan Gu 4329ba700f rkt: Refactor grace termination period.
Add `TimeoutStopSec` service option to support grace termination.
2016-06-20 17:18:12 -07:00
Yifan Gu 4e9298cd99 rkt: Map kubelet's `--stage1-image` flag to rkt's `--stage1-name` flag.
This enables rkt to use cached stage1 image instead of unpacking the
stage1 image every time for every pod.

After this change, users need to preload the stage1 images in order to
enable rkt to find the stage1 image with the name specified by this flag.
2016-06-20 10:39:46 -07:00
k8s-merge-robot 090e6ff660 Merge pull request #27625 from goltermann/spell2
Automatic merge from submit-queue

Fix several spelling errors in comments

What the title says
2016-06-18 23:08:28 -07:00
Random-Liu 3cc9ca3988 Add timeout for rkt requests. 2016-06-17 18:18:41 -07:00
goltermann 218645b346 Fix several spelling errors in comments. 2016-06-17 10:41:18 -07:00
Yu-Ju Hong f279e36292 Don't remove all containers of deleted pods until sources are ready
Without this fix, kubelet may assume a pod from a not-ready source has already
been deleted, and GC all its dead containers.
2016-06-16 10:47:12 -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
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
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
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
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
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
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 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 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
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
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
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
Euan Kemp f028a9f410 rkt: Update minimum rkt version to 1.7.0
Also remove the redundant `appcVersion` check, that version should
already be captured in the rkt version
2016-05-31 15:24:51 -07:00
Euan Kemp d0a31873d7 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.
2016-05-31 15:23:46 -07:00