Commit Graph

2 Commits

Author SHA1 Message Date
Brian Goff e4c03623c2 Use counter for tracking container states
Container state counts are used for reporting in the `/info` endpoint.
Currently when `/info` is called, each container is iterated over and
the containers 'StateString()' is called. This is not very efficient
with lots of containers, and is also racey since `StateString()` is not
using a mutex and the mutex is not otherwise locked.

We could just lock the container mutex, but this is proven to be
problematic since there are frequent deadlock scenarios and we should
always have the `/info` endpoint available since this endpoint is used
to get general information about the docker host.

Really, these metrics on `/info` should be deprecated. But until then,
we can just keep a running tally in memory for each of the reported
states.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2017-04-29 17:10:14 -04:00
Akihiro Suda 5a1b06d7fd rerun vndr
* run latest vndr so as to collect more LICENSE files
 * remove unused packages
 * vendor github.com/philhofer/fwd with LICENSE.md (MIT)
 * vendor github.com/bsphere/le_go with LICENSE (MIT)

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2017-03-08 02:29:34 +00:00