1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/integration-cli
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
..
fixtures Add integration cli trust tests 2015-07-24 14:08:20 -07:00
check_test.go Windows: Get Integration CLI running 2015-09-04 12:32:40 -07:00
docker_api_attach_test.go Windows: Get Integration CLI running 2015-09-04 12:32:40 -07:00
docker_api_build_test.go Windows: Get Integration CLI running 2015-09-04 12:32:40 -07:00
docker_api_containers_test.go Add unit tests for integration cli utils function 2015-09-09 15:36:44 +02:00
docker_api_create_test.go Minor fix: remove redundant tag name in error message of create failed. 2015-08-30 10:43:33 +08:00
docker_api_events_test.go Send resp immediately on GET /events 2015-07-02 11:45:24 -04:00
docker_api_exec_resize_test.go Windows: Get Integration CLI running 2015-09-04 12:32:40 -07:00
docker_api_exec_test.go Windows: Get Integration CLI running 2015-09-04 12:32:40 -07:00
docker_api_images_test.go Windows: Get Integration CLI running 2015-09-04 12:32:40 -07:00
docker_api_info_test.go
docker_api_inspect_test.go Added tags list to /images/:id/json api. 2015-09-10 11:55:01 +03:00
docker_api_logs_test.go Windows: Get Integration CLI running 2015-09-04 12:32:40 -07:00
docker_api_network_test.go register libnetwork API and UI with docker parent chain 2015-06-18 12:07:58 -07:00
docker_api_resize_test.go Windows: Get Integration CLI running 2015-09-04 12:32:40 -07:00
docker_api_service_test.go attaching services api and UI chain to docker parent 2015-06-19 09:19:09 -07:00
docker_api_stats_test.go Windows: Get Integration CLI running 2015-09-04 12:32:40 -07:00
docker_api_test.go Ensure body is closed after error is checked 2015-07-23 14:34:38 +02:00
docker_api_version_test.go
docker_api_volumes_test.go Windows: Get Integration CLI running 2015-09-04 12:32:40 -07:00
docker_cli_attach_test.go Windows: Get Integration CLI running 2015-09-04 12:32:40 -07:00
docker_cli_attach_unix_test.go Remove/Comment time.Sleep in integration tests 2015-08-18 20:36:08 +02:00
docker_cli_build_test.go Add STOPSIGNAL instruction to dockerfiles. 2015-09-10 19:56:05 -04:00
docker_cli_build_unix_test.go Add ulimit to docker build. 2015-07-23 10:26:06 +08:00
docker_cli_by_digest_test.go Windows: Get Integration CLI running 2015-09-04 12:32:40 -07:00
docker_cli_commit_test.go Windows: Get Integration CLI running 2015-09-04 12:32:40 -07:00
docker_cli_config_test.go Add missing defer to delete temp dir 2015-09-01 07:19:38 -07:00
docker_cli_cp_from_container_test.go Windows: Get Integration CLI running 2015-09-04 12:32:40 -07:00
docker_cli_cp_test.go Windows: Get Integration CLI running 2015-09-04 12:32:40 -07:00
docker_cli_cp_to_container_test.go Windows: Get Integration CLI running 2015-09-04 12:32:40 -07:00
docker_cli_cp_utils.go Fix docker cp Behavior With Symlinks 2015-07-30 12:14:28 -07:00
docker_cli_create_test.go Add STOPSIGNAL instruction to dockerfiles. 2015-09-10 19:56:05 -04:00
docker_cli_daemon_experimental_test.go Windows: Workaround for CI 2015-08-05 11:20:30 -07:00
docker_cli_daemon_test.go Add log reading to the journald log driver 2015-09-11 16:50:03 -04:00
docker_cli_diff_test.go Windows: Get Integration CLI running 2015-09-04 12:32:40 -07:00
docker_cli_events_test.go Windows: Get Integration CLI running 2015-09-04 12:32:40 -07:00
docker_cli_events_unix_test.go
docker_cli_exec_test.go Windows: Get Integration CLI running 2015-09-04 12:32:40 -07:00
docker_cli_exec_unix_test.go Windows: Get Integration CLI running 2015-09-04 12:32:40 -07:00
docker_cli_experimental_test.go dockerCmd when possible 2015-07-20 14:55:40 +08:00
docker_cli_export_import_test.go Windows: Get Integration CLI running 2015-09-04 12:32:40 -07:00
docker_cli_help_test.go Merge pull request #14626 from kunalkushwaha/add-network-cli-help 2015-09-09 13:36:43 -07:00
docker_cli_history_test.go Windows: Get Integration CLI running 2015-09-04 12:32:40 -07:00
docker_cli_images_test.go Windows: Get Integration CLI running 2015-09-04 12:32:40 -07:00
docker_cli_import_test.go Windows: Get Integration CLI running 2015-09-04 12:32:40 -07:00
docker_cli_info_test.go dockerCmd when possible 2015-07-20 14:55:40 +08:00
docker_cli_inspect_experimental_test.go Windows: Get Integration CLI running 2015-09-04 12:32:40 -07:00
docker_cli_inspect_test.go Windows: Get Integration CLI running 2015-09-04 12:32:40 -07:00
docker_cli_kill_test.go Windows: Get Integration CLI running 2015-09-04 12:32:40 -07:00
docker_cli_links_test.go Windows: Get Integration CLI running 2015-09-04 12:32:40 -07:00
docker_cli_links_unix_test.go Moved unix links tests to non-platform 2015-09-01 09:10:24 -07:00
docker_cli_login_test.go
docker_cli_logs_test.go Windows: Get Integration CLI running 2015-09-04 12:32:40 -07:00
docker_cli_nat_test.go Windows: Get Integration CLI running 2015-09-04 12:32:40 -07:00
docker_cli_netmode_test.go Windows: Get Integration CLI running 2015-09-04 12:32:40 -07:00
docker_cli_network_test.go Recfactor: Use dockerCmd when possible in integration-cli tests 2015-07-20 14:44:22 +08:00
docker_cli_pause_test.go Windows: Get Integration CLI running 2015-09-04 12:32:40 -07:00
docker_cli_port_test.go Windows: Get Integration CLI running 2015-09-04 12:32:40 -07:00
docker_cli_proxy_test.go Windows: Get Integration CLI running 2015-09-04 12:32:40 -07:00
docker_cli_ps_test.go Windows: Get Integration CLI running 2015-09-04 12:32:40 -07:00
docker_cli_pull_local_test.go Fix race condition when waiting for a concurrent layer pull 2015-09-11 10:52:34 -07:00
docker_cli_pull_test.go Add unit tests for integration cli utils function 2015-09-09 15:36:44 +02:00
docker_cli_pull_trusted_test.go Update image pull tests 2015-09-03 15:57:41 -07:00
docker_cli_push_test.go Remove TestPushInterrupt 2015-09-02 15:30:55 -07:00
docker_cli_rename_test.go Windows: Get Integration CLI running 2015-09-04 12:32:40 -07:00
docker_cli_restart_test.go Windows: Get Integration CLI running 2015-09-04 12:32:40 -07:00
docker_cli_rm_test.go Windows: Get Integration CLI running 2015-09-04 12:32:40 -07:00
docker_cli_rmi_test.go Windows: Get Integration CLI running 2015-09-04 12:32:40 -07:00
docker_cli_run_test.go integration-cli: add missing err check in TestRunNetworkNotInitializedNoneMode 2015-09-08 23:05:54 +02:00
docker_cli_run_unix_test.go Signal to stop a container. 2015-09-10 19:56:05 -04:00
docker_cli_save_load_test.go Windows: Get Integration CLI running 2015-09-04 12:32:40 -07:00
docker_cli_save_load_unix_test.go CI: use dockerCmd in integration-cli when possible 2015-07-22 17:55:41 +08:00
docker_cli_search_test.go Windows: Get Integration CLI running 2015-09-04 12:32:40 -07:00
docker_cli_service_test.go CI: use dockerCmd in integration-cli when possible 2015-07-22 17:55:41 +08:00
docker_cli_start_test.go Windows: Get Integration CLI running 2015-09-04 12:32:40 -07:00
docker_cli_start_volume_driver_unix_test.go Merge pull request #15798 from calavera/volume_driver_host_config 2015-09-08 22:05:40 -04:00
docker_cli_stats_test.go Windows: Get Integration CLI running 2015-09-04 12:32:40 -07:00
docker_cli_tag_test.go Windows: Get Integration CLI running 2015-09-04 12:32:40 -07:00
docker_cli_top_test.go Windows: Get Integration CLI running 2015-09-04 12:32:40 -07:00
docker_cli_version_test.go Test infrastructure for cross platform 2015-08-31 09:10:18 -07:00
docker_cli_volume_test.go Add unit tests for integration cli utils function 2015-09-09 15:36:44 +02:00
docker_cli_wait_test.go Windows: Get Integration CLI running 2015-09-04 12:32:40 -07:00
docker_hub_pull_suite_test.go Windows: Get Integration CLI running 2015-09-04 12:32:40 -07:00
docker_test_vars.go Windows: Test infrastructure plumbing 2015-08-05 14:34:32 -07:00
docker_utils.go Make daemon to start with no userlandproxy by default 2015-09-11 11:58:35 -07:00
registry.go [graph] Enforce manifest/layer digest verification 2015-08-03 11:41:23 -07:00
requirements.go Test infrastructure for cross platform 2015-08-31 09:10:18 -07:00
requirements_unix.go Add some missing cgroup test require and refactor the require check. 2015-08-24 11:37:11 +08:00
test_vars_exec.go
test_vars_noexec.go
test_vars_unix.go
test_vars_windows.go
trust_server.go Updated to use latest version of notary 2015-07-31 17:32:35 -07:00
utils.go Add unit tests for integration cli utils function 2015-09-09 15:36:44 +02:00