Commit Graph

8 Commits (2803fbe3434b24a623a7714b0c34b2a81eefe096)

Author SHA1 Message Date
Yifan Gu f197a9db4e kubelet: Minor refactors.
Remove some TODOs.
Unexport DockerManager.Puller and DockerManager.PodInfraContainerImage.
Add "docker" for all "go-dockerclient" imports.
2015-06-04 16:08:45 -07:00
Prashanth B da42f13941 Merge pull request #7749 from yujuhong/stale_cache
Kubelet: record the timestamp correctly in the runtime cache
2015-05-06 09:20:30 -07:00
Yu-Ju Hong c075719f05 Kubelet: fix the runtime cache to not cache the stale pods
If a pod worker sees stale pods from the runtime cache which were retrieved
before their last sync finished, it may think that the pod were not started
correctly, and attemp to fix that by killing/restarting containers.
There are two issues that may cause runtime cache to store stale pods:
  1. The timstamp is recorded *after* getting the pods from the container
     runtime. This may lead the consumer to think the pods are newer than they
     actually are.
  2. The cache updates are triggered by many goroutines (pod workers, and the
     updating thread). There is no mechanism to enforece that the cache would
     only be updated to newer pods.

This change fixes the above two issues by making sure one always record the
timestamp before getting pods from the container runtime, and updates the
cached pods only if the timestamp is newer.
2015-05-05 18:28:38 -07:00
Paul Morie d90689bb71 Fix typo in runtime_cache.go 2015-05-04 16:33:48 -04: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
Yifan Gu e1feed9a8b kubelet/container: Replace DockerCache with RuntimeCache. 2015-04-13 18:16:05 -07:00
Yifan Gu a5e6bea9b5 kubelet/container: Update the cache interface. 2015-04-13 17:38:18 -07:00
Yifan Gu 487d34e409 kubelet: add container runtime cache and fake runtime. 2015-03-20 13:15:20 -07:00