Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

launching proxy fails with non-default logging driver #1453

Closed
errordeveloper opened this issue Sep 21, 2015 · 4 comments
Closed

launching proxy fails with non-default logging driver #1453

errordeveloper opened this issue Sep 21, 2015 · 4 comments

Comments

@errordeveloper
Copy link
Contributor

I've tested it on latest CoreOS 808.0.0 (alpha) that ships with Docker 1.8.2 and runs it with --log-driver=journald and got this

Sep 21 19:08:41 core-01 weave[1357]: The weaveproxy container has died. Consult the logs with 'docker logs weaveproxy' for further details.

where docker logs weaveproxy says:

"logs" command is supported only for "json-file" logging driver (got: journald)
@rade rade added the bug label Sep 21, 2015
@errordeveloper errordeveloper changed the title Proxy fails to start when logging driver is not the default one Proxy fails to start with non-default logging driver Sep 21, 2015
@rade rade added this to the 1.2.0 milestone Sep 21, 2015
@rade
Copy link
Member

rade commented Sep 21, 2015

So there are two issues here: 1) the proxy startup (as well as weave env|config) depend on docker log working, and 2) weave's container death error reporting recommends docker logs <container> when this evidently is not guaranteed.

(2) is a usability nightmare. We introduced these very specific instructions precisely because docker newbies didn't know what to do when presented with "consult the container logs". Looks like modern docker has become a lot less newbie friendly, and I am afraid we are going to have to folllow suit :(

I have no idea what to do about (1). Since the proxy runs in the host network namespace we really don't want to make it listen on some fixed port for 'control' messages.

@paulbellamy
Copy link
Contributor

We use the logs for two things: a) to wait for the proxy to start, and b) to get back the proxy's listen address.

b) is easy, as we could stash it somewhere else (env var, labels, whatever)
a) is hard, but we could just check the container state, until it's running. But it will slow down weave launch.

@paulbellamy
Copy link
Contributor

We could have a fifo (or unix socket, maybe) inside the weaveproxy container, exec in, and check that.

@rade rade changed the title Proxy fails to start with non-default logging driver launching proxy fails with non-default logging driver Sep 29, 2015
@rade
Copy link
Member

rade commented Sep 29, 2015

Note that the proxy doesn't actually fail to start, despite what the message says.

@rade rade closed this as completed in 58515ca Sep 29, 2015
rade added a commit that referenced this issue Sep 29, 2015
use a container-local unix socket to get the address, instead of logs

Fixes #1453. Fixes #1472.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants