Commit Graph

166 Commits

Author SHA1 Message Date
Rohit Jnagal
a0a419614f Add /storage endpoint to 2.0 API.
/storage returns {device, mountpoint, capacity, usage} for all filesystems.
In addition, it also detect and applies label for each filesystem - currently two - "root", "docker-images".

/storage/<label> returns info about the filesystem with specific label. eg. /storage/root returns info for root filesystem.
2015-03-11 01:49:58 +00:00
Rohit Jnagal
872546ba3a Bulk move current info api to info/v1. Making room for info/v2. 2015-03-04 00:47:28 +00:00
Rohit Jnagal
e09f9684e6 Fix cpuset returned in spec on a single core machine.
Switch from "0-0" to "0".
2015-02-19 18:54:23 +00:00
Victor Marmol
131a0c21ea Detect Docker containers by asking the Docker.
No longer do deduction from the cgroup path (only to get the Docker
container ID).

Fixes #450.
2015-02-06 09:15:59 -08:00
Victor Marmol
45ba276ae8 Add container creation time to ContainerSpec. 2015-02-05 09:52:10 -08:00
Victor Marmol
86238d0179 Allow partial success of GetStats().
This should make us more robust in the face of failure (at the cost of
making the failures less prominent). We allow GetStats() to return an
error and a partial result. We will process the result and report the
error.

Fixes #306.
2015-02-03 15:26:31 -08:00
Victor Marmol
01b456c129 Fix detection of AUFS layers.
We were using the container name instead of the Docker ID which breaks
in systemd systems.

Fixes #475.
2015-02-03 10:06:19 -08:00
Vishnu Kannan
aedf42ba8c Adding 'HasDiskIo' to Container Spec to indicate if diskio stats are available for a given container. 2015-01-20 05:06:57 +00:00
Arkadi Shishlov
fe7df00aec Add blkio cgroup to list of supported subsystems 2015-01-17 17:09:35 +02:00
Victor Marmol
909fa133e1 Merge pull request #445 from rjnagal/docker
Add task load stats to containers.
2015-01-16 16:00:50 -08:00
Rohit Jnagal
cbdd96a554 Add task load stats to containers.
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.
2015-01-16 23:25:22 +00:00
Rohit Jnagal
ed155019ac Verify and fix error message nit :) 2015-01-14 01:15:13 +00:00
Rohit Jnagal
55fceed402 Add some more missing copyrights and script to verify copyright.
Add to travis next.
2015-01-09 19:31:25 +00:00
Victor Marmol
adfccb7c1c Updating to latest libcontainer. 2015-01-08 12:15:03 -08:00
Rohit Jnagal
3df5d4f08d Merge pull request #419 from vmarmol/cleanup
Cleanup of libcontainer state generation.
2015-01-05 14:25:20 -08:00
Victor Marmol
4e3629101d Cleanup of libcontainer state generation. 2015-01-05 13:47:35 -08:00
Victor Marmol
643d647761 Gofmt all files. 2015-01-05 11:26:23 -08:00
Vish Kannan
54834156eb Merge pull request #407 from rjnagal/diskinfo
Add network stats to root container.
2015-01-02 10:06:11 -08:00
Vish Kannan
5897f3e970 Merge pull request #410 from rjnagal/docker
Fix vet errors
2015-01-02 09:59:01 -08:00
Rohit Jnagal
aee5c36313 Fix vet errors 2015-01-01 22:41:55 +00:00
Rohit Jnagal
45334c6f71 Add network stats to root container. Provides machine-level networking stats. 2014-12-30 17:12:42 +00:00
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
6ad13d126b Check filesystem before accessing it in UI.
Fixes #377.
2014-12-18 16:09:50 -08: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
Rohit Jnagal
8eec529106 Merge pull request #358 from vmarmol/update-libcontainer
Update libcontainer dependency
2014-12-15 17:01: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
084e809507 Merge pull request #356 from rjnagal/rename
Add systemd information to validate output.
2014-12-16 07:35:30 +08:00
Rohit Jnagal
4ec9894ea2 Add systemd information to validate output. 2014-12-15 23:26:30 +00:00
Victor Marmol
0123fe1d07 Merge pull request #355 from rjnagal/syst
Fix Docker handler for machines that use systemd just as a naming service
2014-12-16 07:07:42 +08:00
Eric Paris
b74d2c6296 update to support newest libcontainer update 2014-12-15 15:00:45 -08:00
Rohit Jnagal
f585e4bc5e Fix Docker handler for machines that use systemd just as a naming service without controlling cgroups. 2014-12-15 22:58:44 +00:00
Rohit Jnagal
1953bd0e94 Bump minimum docker supported version to 1.0. 2014-12-15 16:57:22 +00:00
Victor Marmol
cb0387b41e Try to detect systemd by checking for its named cgroup hierarchy.
Fixes #342
2014-12-11 17:30:33 -08:00
Victor Marmol
ff9a4995a1 Report error while fetching network stats. 2014-12-10 13:26:42 -08:00
Victor Marmol
18e9394dbc Adding runtime options docs.
Also some cleanups of other docs.
2014-12-04 09:16: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
Vish Kannan
c005bc1722 Merge pull request #326 from vmarmol/integration
Register inotify watches on all cgroup hierarchies.
2014-11-21 09:11:10 -08:00
Victor Marmol
fa00344601 Register inotify watches on all cgroup hierarchies.
We used to only register them on the first hierarchy that was created (I
think this was unintentional). This caused some weird edgecases where
we'd try to delete a watch event we didn't create. It is an error we
ignore today (since we fix it in < 60s) but delays our destruction of
the container.
2014-11-21 20:05:50 +08:00
Rohit Jnagal
6885e0c8f2 Merge pull request #320 from vmarmol/docker-raw
Let the raw driver handle the /docker container.
2014-11-19 22:40:06 -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
fc622a4b56 Fix raw driver's setting of CPU mask.
We used to include it with the trailing "\n" which gave us parsing
errors in the UI (and the reason why they didn't show up in any of those
containers).
2014-11-20 06:32:54 +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
Vish Kannan
4910466050 Merge pull request #296 from vmarmol/docker
Add /docker/ UI endpoint.
2014-11-12 09:48:52 -08:00
Victor Marmol
6e89bdef9f Add /docker/ UI endpoint.
Fixes #294
2014-11-07 08:53:52 -08:00
Vish Kannan
26921c3643 Merge pull request #277 from vmarmol/flat
Flatten ContainerStats struct
2014-11-05 11:26:10 -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
Abin Shahab
e6406ef6d0 Additional blkio stats
This adds blkio.io_wait_time, blkio.io_service_time, blkio.io_merged, and blkio.time to the api
2014-10-21 22:41:33 +00:00
Abin Shahab
7133ab0f7d gofmt all files 2014-10-21 05:23:23 +00:00
Abin Shahab
48129c03d1 code review fixes 2014-10-21 05:19:24 +00:00