kubernetes/pkg/kubelet/container
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
..
container_reference_manager.go Make copyright ownership statement generic 2015-05-01 17:49:56 -04:00
fake_runtime.go Merge pull request #7597 from eparis/copyright 2015-05-01 17:01:39 -07:00
helpers.go Make copyright ownership statement generic 2015-05-01 17:49:56 -04:00
os.go Make copyright ownership statement generic 2015-05-01 17:49:56 -04:00
readiness_manager.go Make copyright ownership statement generic 2015-05-01 17:49:56 -04:00
ref_test.go Make copyright ownership statement generic 2015-05-01 17:49:56 -04:00
ref.go Make copyright ownership statement generic 2015-05-01 17:49:56 -04:00
runtime_cache_test.go Kubelet: fix the runtime cache to not cache the stale pods 2015-05-05 18:28:38 -07:00
runtime_cache.go Kubelet: fix the runtime cache to not cache the stale pods 2015-05-05 18:28:38 -07:00
runtime.go Make rkt implement the container Runtime 2015-05-04 11:16:33 -07:00