The stats are only populated when cAdvisor is running outside network namespaces.
We'll add a different backend to retrieve the same data from within namespaces.
This adds an Exists() interface to detect when the container is dead.
Before reporting an update error we check is Exists() is true.
Some documentation was added as well.
This is done by introducting the concept of "namespaces" of container
names. The aliases of a container are under this namespace. Namespace
names are of the form:
//<namespace>/<alias>
This allows us to (within cAdvisor) query all docker containers as
//docker regardless of whether this is a systemd or a non-systemd system.
This does break our ability to handle Docker aliases with the /container
endpoint. I think this is acceptable as our support there was not
consistent between system types.
If no resources are used by the container since the last housekeeping,
we double the housekeeping interval until --max_housekeeping_interval.
If usage was detected, we drop it back to the baseline
(--housekeeping_interval).
From my tests this reduces CPU usage in CoreOS from ~8% to ~3% with no
real loss of accuracy.
Fixes#159
The cache will now hold atlest the minimum number of stats required by the UI and more
if the buffer duration is longer than the default.
Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <vishnuk@google.com> (github: vishh)