Rohit Jnagal
cdd355421f
Add check for state directory to validator.
2014-12-28 18:04:32 +00:00
Rohit Jnagal
275b3ed653
Don't use state.json from libcontainer to get cgroup paths.
...
This confuses cadvisor on systems where cadvisor doesn't see cgroup mounts at the same place as root namespace view.
2014-12-24 00:25:11 +00:00
Victor Marmol
7ca63db2c5
Handle old versions of the libcontainer config.
...
Libcontainer recently changed its config by changing the type of a
field. This commit tries parsing the config as the new and old types.
2014-12-16 17:52:44 -08:00
Victor Marmol
91c974e913
Generate CgroupPaths when not available.
...
This happens always for non-Docker containers and sometimes with older Docker
containers.
2014-12-15 16:57:30 -08:00
Victor Marmol
e3ab15417c
Ignore update errors for dead containers.
...
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.
2014-11-22 05:31:11 +08:00
Victor Marmol
0e603d2709
Let the raw driver handle the /docker container.
...
This will give us stats on this container and since the /docker UI
endpoint, it no longer serves the purpose it once did.
2014-11-20 06:44:35 +08:00
Victor Marmol
f97e57df88
Simplify how the Docker containers are handled.
...
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.
2014-11-12 18:01:47 -08:00
Victor Marmol
6e89bdef9f
Add /docker/ UI endpoint.
...
Fixes #294
2014-11-07 08:53:52 -08:00
Victor Marmol
e695c3820e
Only overwrite the Name and Parent in the libcontainer Cgroup.
...
Fixes #287
2014-10-29 11:41:23 -07:00
Victor Marmol
8aa05b0c39
Add API version v1.2 with /docker endpoint.
...
The /docker endpoint lists all Docker containers under one unified
namespace.
2014-10-20 22:24:01 -07:00
Vishnu Kannan
0699e7029d
Avoid storage usagge calculations when aufs driver is not being used.
2014-10-07 11:48:10 +00:00
Vishnu Kannan
5e8fecea6a
Adding filesystem usage calculation for docker containers. This patch also includes some internal refactoring.
...
'machine' api now exports a list of all existing 'ext*' filesystems along with the capacity.
2014-10-06 09:51:32 +00:00
Victor Marmol
ebf231e4df
Fix name resolution in Systemd systems
2014-09-23 20:01:35 -07:00
Victor Marmol
6f35cf8e6c
Supporting graceful signal shutdown.
...
Adding a signal handler and gracefully shutting down all threads.
2014-09-23 14:13:58 -07:00
Victor Marmol
e22831f1bd
Flatten ContainerSpec.
2014-09-19 10:14:22 -07:00
Victor Marmol
b63d61ca97
Use inotify to watch for new containers.
...
This reduces cAdvisor CPU usage below 1% in my CoreOS system.
We also reduce global housekeeping to every 60s as a fallback in case we
miss an event.
2014-09-18 12:52:09 -07:00
Victor Marmol
b75dea4021
Adding --docekr_root to customize where Docker stores state.
...
Fixes #199
2014-08-29 14:54:40 -07:00
Vishnu Kannan
3e390e0f33
Use glog instead of 'log' library.
...
Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <vishnuk@google.com> (github: vishh)
2014-08-07 18:38:58 +00:00
Victor Marmol
00f4f840ea
Move from filepath -> path for Join.
2014-08-03 10:06:39 -07:00
Victor Marmol
56054e3e31
Remove SplitName().
...
This is possible thanks to the new libcontainer interface that allows
the use of absolute paths.
2014-08-02 11:36:10 -07:00
Nan Monnand Deng
d6551d888b
list processes
2014-07-29 01:20:19 -04:00
Victor Marmol
7a3f7b9a29
Return an empty state for old versions of Docker.
...
Fixes #127 .
2014-07-25 08:20:55 -07:00
Rohit Jnagal
1fa48e8c39
Fix handling of cpumask for docker driver. Raw driver still reports all
...
cpus. Will fix it to read cpumask for cgroup seperately.
Docker-DCO-1.1-Signed-off-by: Rohit Jnagal <jnagal@google.com> (github: rjnagal)
2014-07-24 01:50:32 +00:00
Victor Marmol
239f4bad11
Added parent prefix to all Docker containers.
2014-07-23 13:23:27 -07:00
Victor Marmol
eef8c01e4e
Better handle nested containers and libcontainer.
2014-07-22 18:04:08 -07:00
Vishnu Kannan
a748b53743
Docker ListContainers will work only for the '/docker' container.
2014-07-22 19:55:14 +00:00
Vishnu Kannan
5dfa7b64ba
Removed NotActive error message from container package.
...
Imporved error messages.
2014-07-22 19:55:14 +00:00
Vishnu Kannan
ef13440034
Addressed comments. Another series of bug fixes.
...
Modified the docker driver and lmctfy driver to skip containers they cannot handle.
2014-07-22 19:55:14 +00:00
Vishnu Kannan
1edb798de5
Features:
...
Added Network Stats to Container Info. It still not exposed via the HTTP UI.
Bug fixes:
1. Modified docker handler to use libcontainer.GetStats instead of quering the fs package.
2. cAdvisor will not stall if any of its core operations fail.
3. cAdvisor will safely ignore any inactive or leaked docker containers. When containers are leaked cgroup state exists but docker is not aware of them.
2014-07-22 18:58:16 +00:00
Victor Marmol
a8863e6367
Initial version of the raw container driver.
2014-07-17 10:45:59 -07:00
Victor Marmol
c4c604c278
Handle systemd when it is present.
2014-07-14 10:00:21 -07:00
Nan Monnand Deng
304a166d7a
working set = usage - inactive
2014-06-27 14:47:02 -04:00
Nan Monnand Deng
875146e396
calculate working set based on #. pages in active LRU.
2014-06-27 13:03:05 -04:00
Victor Marmol
dcedfe3c9d
Rename libcontainer.Container -> libcontainer.Config
2014-06-24 14:54:30 -07:00
Nan Deng
3718b139b3
remove StatsPercentiles in container handler
2014-06-17 12:55:51 -07:00
Victor Marmol
410c27a84f
Track a container by all of its aliases
2014-06-13 18:24:59 -07:00
Nan Monnand Deng
6250bf3d0f
Add ContainerReference() to ContainerHandler().
2014-06-13 18:18:26 -04:00
Victor Marmol
b9738e6ee6
Switching from using Docker config to libcontainer config for ContainerSpec
2014-06-13 12:06:26 -07:00
Nan Deng
312bcae2db
gofmt -r "ContainerRef->ContainerReference" -w -l .
2014-06-12 17:32:46 -07:00
Nan Deng
89b5484734
changed actual handlers
2014-06-12 17:31:26 -07:00
Victor Marmol
e9ed0bfea5
Move to using the libcontainer repo directly.
...
Return empty stats for / and /docker in the docker driver
2014-06-12 17:11:01 -07:00
Victor Marmol
712f9fb32f
Migrating cAdvisor code from lmctfy
2014-06-09 12:12:07 -07:00