Commit Graph

290 Commits (9fdd7935559aea05007643fca061fec99320a72c)

Author SHA1 Message Date
Paul Weil 982bf19c20 security context initial implementation - squash 2015-05-05 13:46:13 -04:00
Victor Marmol fe7cb95be6 Merge pull request #7746 from vishh/exec_fix
Fix kubelet's docker RunInContainer implementation
2015-05-04 16:49:57 -07:00
Victor Marmol a32d31d045 Merge pull request #7729 from yujuhong/runtime_up
Kubelet: wait until container runtime is up
2015-05-04 16:02:30 -07:00
Vishnu Kannan ec01265643 Fix docker exec logic. Without this patch, kubelet was not receiving any output from docker exec
and was incorrectly handling the output.
2015-05-04 16:01:32 -07:00
Yu-Ju Hong d231eb6bef Kubelet: wait until container runtime is up
Instead of waiting for the docker client to be up, we wait for the container
runtime to be up.
2015-05-04 15:16:38 -07:00
Victor Marmol b0129089da Merge pull request #7712 from rjnagal/kubelet
Expose pod name as a label on containers.
2015-05-04 14:52:16 -07:00
Rohit Jnagal 1511dbf0b5 Expose pod name as a label on containers.
Full pod name is exposed under key 'kubernetes.io/pod'.
It helps in introspection by looking at all containers in a pod through
docker ps -a -f label=kubernetes.io/pod=podXXX

We also plan to visualize this in cAdvisor.
2015-05-04 21:20:42 +00:00
Victor Marmol 79fc8bee34 Change GetContainerLogs() signature.
This works for both runtimes. We need to eventually unify the ID scheme
for this method.
2015-05-04 11:16:32 -07:00
Yu-Ju Hong 1ad4dd7803 Kubelet: replace DockerManager with the Runtime interface
This change instructs kubelet to switch to using the Runtime interface. In order
to do it, the change moves the Prober instantiation to DockerManager.

Note that most of the tests in kubelet_test.go needs to be migrated to
dockertools. For now, we use type assertion to convert the Runtime interface to
DockerManager in most tests.
2015-05-04 10:19:46 -07:00
Daniel Smith 4a6ab7fd36 Merge pull request #7597 from eparis/copyright
Use generic copyright holder name in license boilerplate
2015-05-01 17:01:39 -07:00
Eric Paris 6b3a6e6b98 Make copyright ownership statement generic
Instead of saying "Google Inc." (which is not always correct) say "The
Kubernetes Authors", which is generic.
2015-05-01 17:49:56 -04:00
Yu-Ju Hong 4fe3366b04 Removes RunPod in the Runtime interface
SyncPod subsumes RunPod, so the latter is no longer needed.
After this change, DockerManager implements the Runtime interface.
2015-05-01 14:47:04 -07:00
Victor Marmol 3b9eba2c1b Add SyncPod() to DockerManager and use in Kubelet.
This allows us to abstract away the logic of syncing a pod by the
runtime. It will allow other runtimes to perform their own sync as well.
2015-05-01 11:03:08 -07:00
Vish Kannan cadfde0bd1 Merge pull request #7277 from guenter/cgroup-parent
Add --cgroup_parent flag to Kubelet to set the parent cgroup for pods
2015-05-01 10:24:58 -07:00
Yifan Gu 3751ecc766 kubelet/container: Move ShouldContainerBeRestarted() to runtime. 2015-04-30 22:55:25 -07:00
Yu-Ju Hong b37f23f1eb Add KillContainerInPod in DockerManager
This changes adds one of the functions that DockerManager needs to implement
the Runtime interface.
2015-04-30 16:23:39 -07:00
Victor Marmol 441a4e6f30 Merge pull request #7578 from yujuhong/docker_manager
Add image-related methods to DockerManager
2015-04-30 16:16:39 -07:00
Yu-Ju Hong 83c599e4d4 Add image-related methods to DockerManager
This change is part of the efforts to make DockerManager implement the Runtime
interface.

The change also modifies the interface slightly to work with existing
code, and aggregates the type converting functions to convert.go.
2015-04-30 13:27:52 -07:00
Yu-Ju Hong 2f7b951140 Remove more docker references in kubelet
This change also renames TrimRuntimePrefixFromImage to TrimRuntimePrefix to
better reflect that the usage is not limited to images (e.g. ID).
2015-04-30 13:16:11 -07:00
Tobi Knaup b96c4046a8 Add --cgroup_root flag to Kubelet to set the parent cgroup for all pods.
Implements #6991.
2015-04-30 10:32:27 -07:00
Yu-Ju Hong 919d78281f Clean up dockertools/manager.go and add more unit tests.
This change refactors the GetPods function and add some basic unit tests.
We should start migrating docker specific tests from kubelet_test to
manager_test.go.
2015-04-29 18:32:52 -07:00
Yu-Ju Hong d81ecc58f8 Adapt pod killing and cleanup for generic container runtime
This change removes docker-specifc code in killUnwantedPods. It
also instructs the cleanup code to move away from interacting with
containers directly. They should always deal with the pod-level
abstraction if at all possible.
2015-04-29 16:08:09 -07:00
Yu-Ju Hong ba1140a54f Merge pull request #7480 from vmarmol/runtime-syncpod
Move ComputePodChanges to the Docker runtime
2015-04-29 16:05:20 -07:00
Victor Marmol 209b4fcbef Merge pull request #6718 from vishh/sys_oom1
Adding system oom events from kubelet
2015-04-29 14:29:38 -07:00
Victor Marmol fe4600ba17 Move ComputePodChanges to DockerManager.
This logic is specific to the Docker runtime. This move is the first
step towards making syncPod() runtime-agnostic.
2015-04-29 14:00:37 -07:00
Vishnu Kannan 020950fd0f Adding events for system ooms.
Kubelet will continuously watch for system OOMs and generate events whenever it
encounters a system OOM.
2015-04-29 11:19:11 -07:00
Yu-Ju Hong 33b8f487f6 Merge pull request #7449 from vmarmol/runtime-network-plugins
Move network plugin TearDown to DockerManager
2015-04-29 10:09:58 -07:00
Yifan Gu fb1c55aa11 kubelet/container: Add GetContainerLogs to runtime interface. 2015-04-28 20:26:16 -07:00
Victor Marmol 787d42d50b Move network plugin teardown to DockerManager.
This teardown is Docker-specific and will let us also do the setup in
the manager in future cleanups.
2015-04-28 16:58:54 -07:00
Victor Marmol de0957ccb1 Create Kubelet types package for common shared types. 2015-04-28 16:57:45 -07:00
Vishnu Kannan 820d0f3e83 Adding a 'PastEventf' method to EventRecorder interface. This will be
useful for recording the timestamp of events that happened in the past.
2015-04-28 16:13:29 -07:00
Dawn Chen 1de4c45115 Merge pull request #7401 from vmarmol/rkt-kill-pod
Kubelet: Move killPod() logic to DockerManager's KillPod()
2015-04-28 09:25:12 -07:00
Sam Ghods 5ceebb4a5f Add error message to log of docker error 2015-04-27 21:49:46 -07:00
Victor Marmol 6b0db76e85 Move killPod() logic to DockerManager KillPod().
This moved Docker specific logic there and allows it to align with the
runtime API. There is still a pod infra container reference in the
function due to network plugins. We can handle this in the Kubelet since
we'll need to be explicit in stating that the network plugin will not
work in a non-Docker runtime.
2015-04-27 17:15:37 -07:00
Victor Marmol 7404b7019c Move Docker-specific log handling to DockerManager.
Eases the separation of Docker-specific code into the Docker-specific
runtime.
2015-04-27 13:10:10 -07:00
Victor Marmol 0c52f7b6a5 Move CreatePodInfraContainer to DockerManager.
This will allow us to start making it an implementation detail of the
Docker runtime.
2015-04-27 11:07:38 -07:00
Yifan Gu 6c98b9daee kubelet/metrics: Move instrumented_docker.go to dockertools.
This can solve the circular import problem when we move the
kubelet.pullImage to kubelet/metrics or kubelet/container package.
2015-04-24 22:03:11 -07:00
Yifan Gu b5a1b32aa4 kubelet/dockertools: Move RunContainer into container runtime.
Also removed ContainerRunner interface.
2015-04-23 16:40:37 -07:00
Yifan Gu 6ed27d06f7 kubelet: Move KillContainer to container runtime.
Rename KillContainerID(string) with KillContainer(string).
Delete the old KillContainer(*kubecontainer.Container).
2015-04-23 15:44:00 -07:00
Yifan Gu e8d485a3a1 kubelet/dockertools: Add readinessManage/containerRefManager to dockerManager.
This can enable us to move KillContainer() to container runtime.
2015-04-23 14:20:34 -07:00
Satnam Singh 2444c1f943 Propagate pod and container name for log files 2015-04-22 15:08:51 -07:00
Yifan Gu c55c879ffe kubelet/dockertools: Remove dockerContainerCommandRunner.
Replace with docker manager.
2015-04-22 11:00:54 -07:00
Victor Marmol 1a41ec9c86 Merge pull request #7116 from yujuhong/container_status
Print container statuses in `kubectl get pods`
2015-04-22 09:18:14 -07:00
Dawn Chen a666c1e731 Merge pull request #7134 from yifan-gu/version
kubelet: Refactor GetDockerVersion().
2015-04-21 16:49:45 -07:00
Yu-Ju Hong 06125f37d3 Print container statuses in `kubectl get pods`
`kubectl get pod` already prints one container per line. This change fills in
the status for each container listed. This aims to help users quickly identify
unhealthy pods (e.g. in a crash loop) at a glance.

 - The first row of every pod would display the pod information and status
 - Each row of the subsequent rows corresponds to a container in that pod:
    * STATUS refers to the container status (Running, Waiting, Terminated).
    * CREATED refers to the elapsed time since the last start time of the
      container.
    * MESSAGE is a string which explains the last termination reason, and/or
      the reason behind the waiting status.
2015-04-21 15:42:18 -07:00
Yifan Gu 611fb25926 kubelet: Refactor GetDockerVersion().
Remove GetDockerServerVersion() from DockerContainerCommandRunner interface,
replaced with runtime.Version(). Also added Version type in runtime for version
comparision.
2015-04-21 14:52:08 -07:00
Akram Ben Aissi b7fc22be8a Fixes an issue with hosts having an IPv6 address on localhost
- When 'getent hosts localhost' returns '::1' the creation of the
  listener fails because of the port parsing which uses ":" as a
separator
- Use of net.SplitHostPort() to do the job
- Adding unit tests to ensure that the creation succeeds
- On docker.go: adds a test on the presence the socat command which was
  failing silenty if not installed

- Code Review 1
  - Fixed typo on Expected
  - The UT now fails if the PortForwarder could not be created

- Code Review 2
  - Simplify socat error message
  - Changing t.Fatal to to.Error on unit tests

- Code Review 3
  - Removing useless uses cases in unit tests

- Code Review 4
  - Removing useless initiliasiation of PortForwarder
  - Changing error message

- Code Review 5
  - Simplifying TestCast struct
  - Adding addition test in one test case
  - Closing the listener

- Code Review 6
  - Improving unit test
2015-04-21 20:16:22 +02:00
Victor Marmol d44e9b4880 Merge pull request #7048 from yujuhong/para_cleanup
Kubelet: parallelize cleaning up containers in unwanted pods
2015-04-20 14:59:07 -07:00
Yu-Ju Hong 275002173e Kubelet: parallelize cleaning up containers in unwanted pods
Kubelet kills unwanted pods in SyncPods, which directly impact the latency of a
sync iteration. This change parallelizes the cleanup to lessen the effect.

Eventually, we should leverage per-pod workers for cleanup, with the exception
of truly orphaned pods.
2015-04-20 14:42:12 -07:00
Andy Goldstein a0a80ea76e Use go-dockerclient's APIVersion
Use go-dockerclient's APIVersion to check the minimum required Docker
version, as it contains methods for parsing the ApiVersion response from
the Docker daemon and for comparing 2 APIVersion objects.
2015-04-20 13:48:18 -04:00
Xiang Li 2f2247dae3 pkg/kubelet: no more self receiver in kubelet pkg 2015-04-19 20:26:07 -07:00
Yu-Ju Hong 2fd87597a4 Fix data race in kubelet_test.go
Ensure that FakeDockerClient make a copy of the internal list and return it.
2015-04-16 11:36:10 -07:00
Victor Marmol 54406a5b7c Merge pull request #6794 from yujuhong/restart_counts
Kubelet: persist restart count of a container
2015-04-14 16:01:49 -07:00
Yu-Ju Hong fd34441d2d Kubelet: persist restart count of a container
Currently, restart count are generated by examine dead docker containers, which
are subject to background garbage collection. Therefore, the restart count is
capped at 5 and can decrement if GC happens.

This change leverages the container statuses recorded in the pod status as a
reference point. If a container finished after the last observation, restart
count is incremented on top of the last observed count. If container is created
after last observation, but GC'd before the current observation time, kubelet
would not be aware of the existence of such a container, and would not increase
the restart count accordingly. However, the chance of this should be low, given
that pod statuses are reported frequently. Also, the restart cound would still
be increasing monotonically (with the exception of container insepct error).
2015-04-14 15:06:42 -07:00
Victor Marmol ca9e209ccb Merge pull request #6795 from yifan-gu/cache
kubelet/container: Replace DockerCache with RuntimeCache.
2015-04-14 09:37:34 -07:00
Dawn Chen 8420abeea8 Merge pull request #6786 from yifan-gu/cleankube
kubelet: Remove unused docker functions.
2015-04-14 09:16:53 -07:00
Yifan Gu e1feed9a8b kubelet/container: Replace DockerCache with RuntimeCache. 2015-04-13 18:16:05 -07:00
Yifan Gu 7fedb14c27 kubelet: Remove unused docker functions.
Remove kubelet.getPodInfraContainer().
Remove dockertools.RemoveContainerWithID().
Remove dockertools.FindContainersByPod().

Also replace the useless test with a test for GetPods().
2015-04-13 16:32:18 -07:00
Yifan Gu d14cb8f1dd kubelet: Introduce PodInfraContainerChanged().
This functions computes in ahead whether we need to restart the pod
infra container.
2015-04-13 16:18:52 -07:00
Yifan Gu dda600e45c kubelet/dockertools: Add puller interfaces in the containerManager. 2015-04-13 15:34:22 -07:00
Yifan Gu a3675e08f2 kubelet/dockertool: Move Getpods() to DockerManager. 2015-04-13 14:05:22 -07:00
Yu-Ju Hong bb417e82d7 Kubelet: surface the container creation/start failure reason
Container creation/start failure cannot be reproduced by inspecting the
containers. This change caches such errors so that kubelet can retrieve it
later.

This change also extends FakeDockerClient to support setting error response
for a specific function.
2015-04-10 16:02:27 -07:00
Victor Marmol 1563a7636a Merge pull request #6652 from dchen1107/podstatus
Populate last terminated container information
2015-04-10 09:21:58 -07:00
Clayton Coleman fce3e5a2bb Merge pull request #6574 from ncdc/exec-portforward-no-command-pipes
Don't use command pipes for exec/port forward
2015-04-10 12:07:21 -04:00
Dawn Chen 563f2965ba Populate last terminated container information 2015-04-09 16:10:13 -07:00
Yifan Gu 12b382ce76 kubelet/fake_docker_client: Use self's PID instead of 42 in testing.
This is safer to use self's PID than some arbitrary PID (say 42),
since the kubelet will set the oom_score_adj for real.
2015-04-09 14:31:44 -07:00
Yifan Gu b868f421e0 kubelet: Move pod infra container image setting to dockertools. 2015-04-09 09:53:07 -07:00
Yifan Gu d4513c2890 kubelet/DockerManager: Fix returning empty error from GetPodStatus(). 2015-04-08 17:55:30 -07:00
Andy Goldstein 4c1cba5312 Don't use command pipes for exec/port forward
Switch to passing the streams for Stdin/Stdout/Stderr instead of using
StdinPipe() etc because the pipes are incompatible with Run()/Wait().
2015-04-08 13:42:42 -04:00
Yifan Gu 4b945e7218 kubelet: Remove GetRecentDockerContainersWithNameAndUUID().
Add unit tests to test the restart behaviour under different
restart policy.
2015-04-08 09:44:23 -07:00
Yifan Gu 6103b144e0 kubelet: Remove GetRecentDockerContainersWithNameAndUUID().
Use the pod status to get the recent stopped containers in
shouldContainerBeRestarted().
2015-04-08 09:44:23 -07:00
Quinton Hoole c670071e87 Revert "kubelet: Remove GetRecentDockerContainersWithNameAndUUID." 2015-04-07 14:25:10 -07:00
Yifan Gu ba1ad9fad2 kubelet: Refactor RunInContainer/ExecInContainer/PortForward.
Replace GetKubeletDockerContainers() with findContainer().
2015-04-06 17:14:46 -07:00
Yifan Gu a8c02412b2 kubelet: Remove GetRecentDockerContainersWithNameAndUUID().
Use the pod status to get the recent stopped containers in
shouldContainerBeRestarted().
2015-04-06 12:43:49 -07:00
Yu-Ju Hong d01bc660b5 Kubelet: a step towards to better encapsulation of docker functions
We want to stop leaking more docker details into kubelet, and we also want to
consolidate some of the existing docker interfaces/structs. This change creates
DockerManager as the new home of some functions in dockertools/docker.go. It
also absorbs containerRunner. In addition, GetDockerPodStatus is renamed to
GetPodStatus with the entire pod passed to it so that it is simialr to the what
is defined in the container Runtime interface.

Eventually, DockerManager should implement the container Runtime interface, and
integrate DockerCache with a flag to turn on/off caching. Code in kubelet.go
should not be using docker client directly.
2015-04-02 13:26:39 -07:00
Paul Morie 0335e350c7 Fix issue 6294: networking e2e should set args, not command 2015-04-01 11:40:23 -04:00
Paul Morie 7628b37d78 Add control over container entrypoint 2015-03-31 12:32:03 -04:00
Yifan Gu 7b1ea6b41d kubelet_test: Fix copy bug.
Initialize the slice before copying in verifyUnorderedCalls()
and verifyStringArrayEqualsAnyOrder().
2015-03-30 17:17:42 -07:00
Yu-Ju Hong 3ad0e22cdd Kubelet: allow docker to examine terminated container
Removing the if statement so that docker can continue returning the status of
terminated containers.
2015-03-27 18:04:50 -07:00
Vishnu Kannan 14a48ad026 Update pod ip using active container only. 2015-03-27 00:38:43 +00:00
Victor Marmol 0fb131c4f9 Merge pull request #5975 from yifan-gu/refactor_runContainer
kubelet: Refactor kubelet.runContainer.
2015-03-26 15:50:37 -07:00
Yifan Gu aa2e7fe688 kubelet_test: Add verifyUnorderedCalls().
This fixes TestSyncPodsDeletesWithNoPodInfraContainer.
Since we need to sync two pods in parallel, we should not verify
the docker calls in strict order.
2015-03-26 15:25:51 -07:00
Yifan Gu 5f08555f45 kubelet: Refactor kubelet.runContainer.
Push the run container logic into container runtime.
2015-03-26 13:43:45 -07:00
Piotr Szczesniak 31901ed9d0 Changed PodInfo to be a list
This change is to make API consistent with our convention.

Fixes #3622
2015-03-26 10:15:25 +01:00
Yifan Gu 31bb11ac2a kubelet: Move pod name helpers to pkg/kubelet/container/runtime.go 2015-03-24 16:08:04 -07:00
Yifan Gu 13250c904f kubelet: Replace GetKubeletDockerContainers with GetPods in syncPod/SyncPods. 2015-03-24 16:01:38 -07:00
Yifan Gu f4c3ccf639 dockertools: Introduce GetPods() for docker runtime. 2015-03-24 16:01:37 -07:00
Nataliia Uvarova 73c2338320 Refactor build/parse dockername. #3511
Functions Build/ParseDockerName now work with struct instead of the long
list of arguments. This new struct also was reused in the kubelet.go
instead of auxilary podContainer struct.
2015-03-21 09:09:03 +01:00
Dawn Chen 4910be6dcb Remove PodIP from ContainerStatus 2015-03-19 10:42:01 -07:00
Victor Marmol 9586b39bb7 Merge pull request #5555 from fgrzadkowski/sync_pod_status
Periodically update pod status from kubelet.
2015-03-18 10:14:07 -07:00
Filip Grzadkowski 1a352b74ba Periodically update pod status from kubelet. 2015-03-18 12:11:39 +01:00
Andy Goldstein 7b07960758 Use docker's ParseRepositoryTag when pulling 2015-03-17 20:15:13 -04:00
Victor Marmol 0c664a343c Adding errors to Kubelet events.
This will help while debugging issues that generate events.

Also removed unecessary log line.
2015-03-17 15:55:25 -07:00
Zach Loafman 5496686f33 Revert "Use docker's ParseRepositoryTag when pulling" 2015-03-17 15:16:33 -07:00
Andy Goldstein c08f41c18b Use docker's ParseRepositoryTag when pulling 2015-03-17 13:23:17 -04:00
Filip Grzadkowski 18b728ff44 Revert "Periodically update pod status from kubelet." 2015-03-17 13:51:45 +01:00
Filip Grzadkowski 336525a27d Periodically update pod status from kubelet. 2015-03-16 23:03:03 +01:00
Dawn Chen 732d4cb2b9 Fix a regression introduced lately: When any given PodInfraContainer on a node
is killed, kubelet kills all remaining containers no matter which pod that
container belongs to.

Fixed #5373
2015-03-13 15:46:30 -07:00
Victor Marmol 4675fcc57d Make ParseDockerName() return an error.
This forces callers to handle cases where the container name could not
be parsed.
2015-03-12 16:33:16 -07:00
Dawn Chen 88e0b04916 Merge pull request #5287 from ncdc/master
Remove debugging log message from ExecInContainer
2015-03-11 09:45:37 -07:00
Wojciech Tyczynski 80576dfed3 Change PodWorkers to have desired cache. 2015-03-11 16:38:31 +01:00
Andy Goldstein 0c798bbe52 Remove debugging log message from ExecInContainer 2015-03-11 10:07:14 -04:00
Yu-Ju Hong fe70be9261 kubelet: revamp the pod/container naming scheme
There are two main goals for this change.

 1. Fix the naming scheme in kubelet so that it accepts DNS subdomain
    name/namespaces correctly (#4920). The design is discussed in #3453.

 2. Prepare for syncing the static pods back to the apiserver(#4090). This
    includes

  - Eliminate the source component in the internal full pod name (#4922). Pods
    no longer need sources as they will all be sync'd via apiserver.

  - Changing the naming scheme for the static (file-, http-, and etcd-based)
    pods such that they are distinguishable when syncing back to the apiserver.

The changes includes:
  *	name = <pod.Name>-<hostname>
  * namespace = <cluster_namespace> (i.e. "default" for now).
  * container_name = k8s_<contianer_name>.<hash_of_container>_<pod_name>_<namespace>_<uid>_<random>

Note that this is not backward-compatible, meaning the kubelet won't recognize
existing running containers using the old naming scheme.
2015-03-06 13:14:45 -08:00
Victor Marmol b314dc6025 Merge pull request #5032 from yifan-gu/clean_syncPod
Refactor pkg/kubelet/kubelet.go: syncPod().
2015-03-05 17:24:20 -08:00
Yifan Gu ed1823e276 Refactor pkg/kubelet/kubelet.go: syncPod().
Makes the syncPod() takes only the containers that belongs to the pod.
2015-03-05 16:40:50 -08:00
Victor Marmol 33e6c3ebb3 DockerCache doesn't get containers at startup.
Fixes #5092.
2015-03-05 16:25:13 -08:00
Dawn Chen dad365fb2b Hide POD container from end users 2015-03-02 17:03:28 -08:00
Wojciech Tyczynski dcef5e2955 Introduce DockerCache in Kubelet. 2015-02-24 09:10:07 +01:00
Victor Marmol da2f4b6d61 Check Docker init PID is valid before we use it.
This gives us an error if the PID is not returned as we expect.
2015-02-20 13:10:40 -08:00
Andy Goldstein 5bd0e9ab05 Add streaming command execution & port forwarding
Add streaming command execution & port forwarding via HTTP connection
upgrades (currently using SPDY).
2015-02-20 09:57:02 -05:00
Dawn Chen c843adbd8f Create docker.Container obj with Name. Integration test is using fake_docker_client
to create and start a fake container. When StartContainer, it pass a name as docker
ID for testing purpose, but leave Name uninitialized. This PR fixes such issue.

Fixed #4472.
2015-02-17 15:23:21 -08:00
Victor Marmol 5d6ad845cc Use Docker name (not ID) to parse Kubernetes components.
Since the parsing function doesn't return an error all the components
returned empty strings. This caused us to enforce the MaxContainerLimit
as a global limit instead of a per-container limit.

Fixes #4413.
2015-02-13 13:08:15 -08:00
Clayton Coleman 09f18031fe Merge pull request #4285 from brendandburns/auth
Add a more detailed error message for potential auth fails in docker pull.
2015-02-13 12:08:48 -05:00
Brendan Burns 0532c46217 Add a more detailed error message for potential auth fails in docker pull. 2015-02-12 17:00:59 -08:00
Vishnu Kannan 922881fcd2 Improve error handling for '/containerLogs' API in kubelet. 2015-02-12 02:22:26 +00:00
Mike Danese 043794492e implement readiness. 2015-02-10 08:30:09 -08:00
Federico Simoncelli e01df69565 api: add image's id to ContainerStatus
Sometimes for external applications it is important to identify
exactly what images are running. Since tags can be moved to point
to newer builds this information can be used to identify old images
running.

Signed-off-by: Federico Simoncelli <fsimonce@redhat.com>
2015-02-06 09:01:14 -05:00
Brendan Burns 8b25b43039 Merge pull request #4117 from wojtek-t/validate_docker_version
Check Docker version in Kubelet /healthz handler
2015-02-05 10:06:33 -08:00
Brendan Burns cfe5b14114 Wait until containers actually finish running before trying to clean up
volumes or pods.
2015-02-04 17:28:41 -08:00
Wojciech Tyczynski 524cdba101 Fix hack/test-cmd.sh test. 2015-02-05 01:58:26 +01:00
Wojciech Tyczynski ead67108ce Use existing method to get Docker version. 2015-02-04 20:50:21 +01:00
Tim Hockin 70ab406751 Use a constant for the pod infra container name
This is an implementation detail that has leaked out of kubelet.  Use a
constant to prevent divergence, for now.  Plan to get rid of it.

@dchen1107
2015-01-28 10:13:02 -08:00
Tim Hockin 7e6f3af937 Merge pull request #3817 from mrunalp/feature/shared_ipc
Shared IPC namespace for containers in a pod
2015-01-27 15:41:34 -08:00
Mrunal Patel b6a0ff1003 IP: Shared IPC. 2015-01-27 09:26:36 -08:00
Matt Moore 2d396797a9 Fix for issue 3797.
Docker's logic for resolving credentials from .dockercfg accepts two kinds of matches:
1. an exact match between the dockercfg entry and the image prefix
2. a hostname match between the dockercfg entry and the image prefix

This change implements the latter, which permits the docker client to take .dockercfg entries of the form:
   https://quay.io/v1/
and use them for images of the form:
   quay.io/foo/bar
even though they are not a prefix-match.
2015-01-26 14:06:12 -08:00
Dawn Chen 2299c04cea Remove image GC.
Fix #3617,#3611, and #3393.
2015-01-20 13:43:08 -08:00
Andrew Seidl 6dee1d7fa4 Fix typos in user-facing strings 2015-01-18 01:32:34 -06:00
Tim Hockin 1be3de895c Move util.UID to pkg/types 2015-01-14 15:22:21 -08:00
Tim Hockin e86d4cd3c6 Use a strong type for UID fields 2015-01-14 13:53:43 -08:00
Tim Hockin 0d92da6b15 Remove logic to handle if UID is blank
This should only have been triggered by tests, and those should now be fixed.
I tested by calling panic() if UID was blank in BuildDockerName() or if number
of fields was < 5 in ParseDockerName().  All errors were fixed.
2015-01-12 14:27:34 -08:00
Tim Hockin 905514a12b Ensure Namespace and UID are set in kubelet
Make all kubelet config sources ensure that UID and Namespace are defaulted, if
need be.

We can *almost* disable the "if blank" logic for UID, except for tests that
call APIs that do not run through SyncPods.  We really ought to be enforcing
invariants better.
2015-01-12 14:27:34 -08:00
saadali f92f830e1f Modify hash to be computed using spew library so that nested object values are used instead of pointer 2015-01-05 15:48:06 -08:00
Brendan Burns b8781c04bb Add support for garbage collecting images. 2014-12-22 16:56:58 -08:00
Dawn Chen f073ecf4cc Understand OOMKilled reason 2014-12-18 15:59:44 -08:00
Dawn Chen 608c3d5046 Update kubelet package on latest go-dockerclient package. 2014-12-18 13:49:13 -08:00
Brendan Burns 7da0378f3c Track the sources that the kubelet has seen, and only delete pods
when every source has been seen at least once.
2014-12-17 13:08:43 -08:00
Brendan Burns bb28949291 Merge pull request #2831 from jdef/unit_test_for_2815
unit test for #2815, as requested by @brendandburns
2014-12-16 15:08:41 -08:00
Brendan Burns 3a0d16ff35 Add an e2e test for exec liveness probes. Fix the docker exec integration. 2014-12-16 13:53:32 -08:00
Vishnu Kannan f4ef05bc20 Updated docker version that supports exec to '1.3.0'. 2014-12-15 20:44:58 +00:00
James DeFelice 3afc9fffba fixed minor formatting 2014-12-12 20:43:07 -05:00
Jordan Liggitt 51bfb50698 Use util.Time consistently in types.go 2014-12-11 11:14:25 -05:00
Federico Simoncelli 4af64b8911 api: add container's id to ContainerStatus
Sometimes for external applications it is useful to correlate the pod
containers to the real docker instances.

This patch adds a new entry in the container status (containerID) which
is used to identify the instance.

Signed-off-by: Federico Simoncelli <fsimonce@redhat.com>
2014-12-10 20:38:41 +00:00
James DeFelice 85b4b4677e unit test for #2815, as requested by @brendandburns 2014-12-10 15:33:38 -05:00
James DeFelice ca2840a8e8 inspect the full repo/image:tag name 2014-12-09 15:41:08 -05:00
James DeFelice 76ef747927 avoid panics when docker CT has no name 2014-12-05 15:48:25 -05:00
Eric Tune 54859cf1ea Remove format specifiers with no options. 2014-11-26 12:05:00 -08:00
Brendan Burns a5bc6301a4 Revert "Using util.Time for ContainerStatus" 2014-11-24 21:32:31 -08:00
Daniel Smith 610ab9a0db Merge pull request #2586 from dchen1107/cleanup
Using util.Time for ContainerStatus
2014-11-24 15:35:07 -08:00
Dawn Chen acb0f1198b Using util.Time for ContainerStatus 2014-11-24 15:15:33 -08:00
bgrant0607 9f5ebef3d8 Merge pull request #2513 from lavalamp/verifyNetwork
Fix crash (loop?) in kubelet
2014-11-21 10:10:32 -08:00