moby/daemon
Nalin Dahyabhai e611a189cb Add log reading to the journald log driver
If a logdriver doesn't register a callback function to validate log
options, it won't be usable.  Fix the journald driver by adding a dummy
validator.

Teach the client and the daemon's "logs" logic that the server can also
supply "logs" data via the "journald" driver.  Update documentation and
tests that depend on error messages.

Add support for reading log data from the systemd journal to the
journald log driver.  The internal logic uses a goroutine to scan the
journal for matching entries after any specified cutoff time, formats
the messages from those entries as JSONLog messages, and stuffs the
results down a pipe whose reading end we hand back to the caller.

If we are missing any of the 'linux', 'cgo', or 'journald' build tags,
however, we don't implement a reader, so the 'logs' endpoint will still
return an error.

Make the necessary changes to the build setup to ensure that support for
reading container logs from the systemd journal is built.

Rename the Jmap member of the journald logdriver's struct to "vars" to
make it non-public, and to make it easier to tell that it's just there
to hold additional variable values that we want journald to record along
with log data that we're sending to it.

In the client, don't assume that we know which logdrivers the server
implements, and remove the check that looks at the server.  It's
redundant because the server already knows, and the check also makes
using older clients with newer servers (which may have new logdrivers in
them) unnecessarily hard.

When we try to "logs" and have to report that the container's logdriver
doesn't support reading, send the error message through the
might-be-a-multiplexer so that clients which are expecting multiplexed
data will be able to properly display the error, instead of tripping
over the data and printing a less helpful "Unrecognized input header"
error.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com> (github: nalind)
2015-09-11 16:50:03 -04:00
..
events Make events test more deterministic in go1.5 2015-08-24 09:35:11 -07:00
execdriver Minor typo 2015-09-10 14:13:15 +08:00
graphdriver Lint package pkg/devicemapper 2015-09-05 23:15:13 +02:00
links Cleanup links top level pkg 2015-07-29 23:39:18 +02:00
logger Add log reading to the journald log driver 2015-09-11 16:50:03 -04:00
network Docker changes for libnetwork Sandbox 2015-09-02 17:24:56 -07:00
archive.go Merge pull request #15834 from Microsoft/10662-fixdockercp 2015-09-01 08:41:59 -07:00
archive_unix.go Windows: Factoring out unused fields 2015-07-27 17:44:18 -07:00
archive_windows.go Windows: Factoring out unused fields 2015-07-27 17:44:18 -07:00
attach.go golint fixes for daemon/ package 2015-08-27 22:07:42 -07:00
changes.go golint fixes for daemon/ package 2015-08-27 22:07:42 -07:00
commit.go Windows: Fix golint daemon breaking commit 2015-09-02 14:36:45 -07:00
config.go golint fixes for daemon/ package 2015-08-27 22:07:42 -07:00
config_experimental.go cli: new daemon command and new cli package 2015-07-23 19:44:46 -04:00
config_stub.go cli: new daemon command and new cli package 2015-07-23 19:44:46 -04:00
config_unix.go Make daemon to start with no userlandproxy by default 2015-09-11 11:58:35 -07:00
config_windows.go Change all docker -d to docker daemon 2015-08-10 20:48:08 +08:00
container.go Add STOPSIGNAL instruction to dockerfiles. 2015-09-10 19:56:05 -04:00
container_unit_test.go Add STOPSIGNAL instruction to dockerfiles. 2015-09-10 19:56:05 -04:00
container_unix.go daemon: remove unused function params 2015-09-09 22:37:46 +02:00
container_windows.go Windows: Fix golint daemon breaking commit 2015-09-02 14:36:45 -07:00
create.go Merge pull request #15798 from calavera/volume_driver_host_config 2015-09-08 22:05:40 -04:00
create_unix.go Merge pull request #15798 from calavera/volume_driver_host_config 2015-09-08 22:05:40 -04:00
create_windows.go Move VolumeDriver to HostConfig to make containers portable. 2015-09-04 12:42:44 -04:00
daemon.go Add STOPSIGNAL instruction to dockerfiles. 2015-09-10 19:56:05 -04:00
daemon_aufs.go Move graph.SetupInitLayer to daemon package where it is used 2015-06-16 16:50:56 -07:00
daemon_btrfs.go golint fixes for daemon/ package 2015-08-27 22:07:42 -07:00
daemon_devicemapper.go golint fixes for daemon/ package 2015-08-27 22:07:42 -07:00
daemon_no_aufs.go make docker compile on freebsd 2015-07-29 21:25:56 +03:00
daemon_overlay.go golint fixes for daemon/ package 2015-08-27 22:07:42 -07:00
daemon_test.go Remove PortMapping from container NetworkSettings 2015-09-02 14:32:53 +02:00
daemon_unix.go selinux/overlay incompatible err 2015-09-02 18:52:10 -04:00
daemon_unix_test.go Cleanup: Merge adjustCPUShares to adoptContainerSettings 2015-08-06 08:15:14 +08:00
daemon_unsupported.go Add platformSupported flag to enable daemon mode by platform. 2015-08-07 09:45:24 -07:00
daemon_windows.go golint fixes for daemon/ package 2015-08-27 22:07:42 -07:00
daemon_zfs.go golint fixes for daemon/ package 2015-08-27 22:07:42 -07:00
debugtrap_unix.go Windows: Win32 event for sigusr1 linux equivalence 2015-07-06 18:58:53 -07:00
debugtrap_unsupported.go Windows: Win32 event for sigusr1 linux equivalence 2015-07-06 18:58:53 -07:00
debugtrap_windows.go Windows: Win32 event for sigusr1 linux equivalence 2015-07-06 18:58:53 -07:00
delete.go Merge pull request #16162 from cpuguy83/16071_fix_lstat_errors 2015-09-09 11:55:14 -07:00
exec.go Merge pull request #15913 from mountkin/abstract 2015-09-01 17:06:13 +02:00
exec_freebsd.go make docker compile on freebsd 2015-07-29 21:25:56 +03:00
exec_linux.go Windows: Split ContainerExecCreate 2015-05-06 16:19:27 -07:00
exec_windows.go Windows: Split ContainerExecCreate 2015-05-06 16:19:27 -07:00
export.go golint fixes for daemon/ package 2015-08-27 22:07:42 -07:00
history.go golint fixes for daemon/ package 2015-08-27 22:07:42 -07:00
image_delete.go [daemon] Refactor image_delete.go 2015-08-28 11:01:24 -07:00
info.go golint fixes for daemon/ package 2015-08-27 22:07:42 -07:00
inspect.go Move VolumeDriver to HostConfig to make containers portable. 2015-09-04 12:42:44 -04:00
inspect_unix.go Move VolumeDriver to HostConfig to make containers portable. 2015-09-04 12:42:44 -04:00
inspect_windows.go Move VolumeDriver to HostConfig to make containers portable. 2015-09-04 12:42:44 -04:00
kill.go golint fixes for daemon/ package 2015-08-27 22:07:42 -07:00
list.go Fix docker volume dangling filter 2015-09-06 20:17:56 +02:00
logdrivers_linux.go Add awslogs driver for Amazon CloudWatch Logs 2015-09-09 13:52:40 -07:00
logdrivers_windows.go Add awslogs driver for Amazon CloudWatch Logs 2015-09-09 13:52:40 -07:00
logs.go Add log reading to the journald log driver 2015-09-11 16:50:03 -04:00
monitor.go golint fixes for daemon/ package 2015-08-27 22:07:42 -07:00
pause.go golint fixes for daemon/ package 2015-08-27 22:07:42 -07:00
README.md Docs: remove networkdriver from README.md in daemon 2015-08-22 10:09:07 +08:00
rename.go golint fixes for daemon/ package 2015-08-27 22:07:42 -07:00
resize.go golint fixes for daemon/ package 2015-08-27 22:07:42 -07:00
restart.go golint fixes for daemon/ package 2015-08-27 22:07:42 -07:00
start.go golint fixes for daemon/ package 2015-08-27 22:07:42 -07:00
state.go golint fixes for daemon/ package 2015-08-27 22:07:42 -07:00
state_test.go golint fixes for daemon/ package 2015-08-27 22:07:42 -07:00
stats.go Don't lookup container 4 times for stats 2015-09-08 10:12:46 -04:00
stats_collector_unix.go Don't read CPU usage if there is no subscribers for stats 2015-09-08 11:57:22 -07:00
stats_collector_windows.go Windows: Factor out stat collector 2015-06-01 09:11:03 -07:00
stats_freebsd.go make docker compile on freebsd 2015-07-29 21:25:56 +03:00
stats_linux.go fix golint warnings/errors on package api/types/ 2015-08-07 09:43:43 +08:00
stats_windows.go Update libcontainer 2015-07-16 16:02:26 -07:00
stop.go golint fixes for daemon/ package 2015-08-27 22:07:42 -07:00
top_unix.go golint fixes for daemon/ package 2015-08-27 22:07:42 -07:00
top_windows.go golint fixes for daemon/ package 2015-08-27 22:07:42 -07:00
unpause.go golint fixes for daemon/ package 2015-08-27 22:07:42 -07:00
utils_freebsd.go make docker compile on freebsd 2015-07-29 21:25:56 +03:00
utils_linux.go make docker compile on freebsd 2015-07-29 21:25:56 +03:00
utils_nounix.go Windows: Tidy up daemon\utils*.go 2015-07-09 18:47:32 -07:00
utils_test.go Windows: Tidy up daemon\utils*.go 2015-07-09 18:47:32 -07:00
volumes.go Don't hold lock around volume driver for volume create. 2015-08-28 16:28:28 -04:00
volumes_linux_unit_test.go daemon: remove unused function params 2015-09-09 22:37:46 +02:00
volumes_unit_test.go Merge pull request #15846 from ZJU-SEL/11646-fix-path-validations 2015-09-03 20:42:37 -04:00
volumes_unix.go daemon: remove unused function params 2015-09-09 22:37:46 +02:00
volumes_windows.go Tidy volume*.go 2015-07-31 13:13:40 -07:00
wait.go golint fixes for daemon/ package 2015-08-27 22:07:42 -07:00

This directory contains code pertaining to running containers and storing images

Code pertaining to running containers:

  • execdriver

Code pertaining to storing images:

  • graphdriver