1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/hack/make
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
..
.build-deb Tiny fix for rpm and deb descriptions 2015-08-10 09:34:10 +08:00
.build-rpm Add log reading to the journald log driver 2015-09-11 16:50:03 -04:00
.resources-windows Windows: Build docker.exe manifested and with icon 2015-06-04 11:49:10 -07:00
.dockerinit hack/make/test-integration-cli: introduce MAKEDIR variable 2015-04-15 10:44:14 +02:00
.dockerinit-gccgo Remove -lpthread and -ldl from ldflags 2015-09-08 17:01:14 -07:00
.ensure-emptyfs Move scripts back to hack/, leave docs in project/ 2015-03-13 14:04:08 -06:00
.ensure-frozen-images add unshare apparmor profile test 2015-05-20 14:06:00 -07:00
.ensure-httpserver Move scripts back to hack/, leave docs in project/ 2015-03-13 14:04:08 -06:00
.go-autogen Add branch and build time to version 2015-06-22 13:00:27 -07:00
.go-compile-test-dir Move scripts back to hack/, leave docs in project/ 2015-03-13 14:04:08 -06:00
.integration-daemon-setup hack: explicit bundles for integration-cli prequisites 2015-06-09 07:22:26 +02:00
.integration-daemon-start Make daemon to start with no userlandproxy by default 2015-09-11 11:58:35 -07:00
.integration-daemon-stop Check for apparmor file before reading it 2015-06-17 11:58:17 -05:00
.validate .: remove trailing white spaces 2015-03-25 13:38:17 -04:00
binary make windows cross compile static daemon work 2015-08-10 16:16:58 -07:00
build-deb pass DOCKER_EXPERIMENTAL into build images 2015-07-23 09:42:22 -07:00
build-rpm add selinux-policy and docker-engine-selinux rpm 2015-08-28 17:54:04 -07:00
cover Make "DEST" a make.sh construct instead of ad-hoc 2015-05-30 11:16:43 -07:00
cross make windows cross compile static daemon work 2015-08-10 16:16:58 -07:00
dynbinary Make "DEST" a make.sh construct instead of ad-hoc 2015-05-30 11:16:43 -07:00
dyngccgo Remove -lpthread and -ldl from ldflags 2015-09-08 17:01:14 -07:00
gccgo Remove -lpthread and -ldl from ldflags 2015-09-08 17:01:14 -07:00
README.md Move scripts back to hack/, leave docs in project/ 2015-03-13 14:04:08 -06:00
release-deb remove reprepro 2015-09-03 17:31:49 -07:00
release-rpm make docker-engine-selinux findable 2015-09-03 08:58:33 -07:00
sign-repos only sign the files that were changed in the last 2 hours 2015-08-04 13:16:57 -07:00
test-docker-py Update docker-py to current master (~docker-py 1.3.1) 2015-07-22 13:17:59 -04:00
test-install-script we dont need the tty in the install script 2015-08-31 08:12:01 -07:00
test-integration-cli Remove timer and use -check.v for tests formatting 2015-06-18 14:22:40 -07:00
test-unit typofix - https://github.com/vlajos/misspell_fixer 2015-08-07 23:25:49 +01:00
tgz Make "DEST" a make.sh construct instead of ad-hoc 2015-05-30 11:16:43 -07:00
ubuntu revert apparmor changes back to how it was in 1.7.1, but keep tests 2015-08-06 12:49:25 -07:00
validate-dco hack/make/test-integration-cli: introduce MAKEDIR variable 2015-04-15 10:44:14 +02:00
validate-gofmt hack/make/test-integration-cli: introduce MAKEDIR variable 2015-04-15 10:44:14 +02:00
validate-lint Golint only on changed files 2015-09-09 09:37:47 +02:00
validate-pkg Add new "validate-pkg" bundlescript 2015-06-12 12:28:23 -07:00
validate-test Validate we're not using the old testing stuff 2015-04-23 10:29:47 -07:00
validate-toml hack/make/test-integration-cli: introduce MAKEDIR variable 2015-04-15 10:44:14 +02:00
validate-vet hack/make/test-integration-cli: introduce MAKEDIR variable 2015-04-15 10:44:14 +02:00

This directory holds scripts called by make.sh in the parent directory.

Each script is named after the bundle it creates. They should not be called directly - instead, pass it as argument to make.sh, for example:

./hack/make.sh test
./hack/make.sh binary ubuntu

# Or to run all bundles:
./hack/make.sh

To add a bundle:

  • Create a shell-compatible file here
  • Add it to $DEFAULT_BUNDLES in make.sh