coreos / mayday

A diagnostics tool for capturing system state.
Apache License 2.0
80 stars 27 forks source link

collect /var/log from enterprise registry container #18

Closed mischief closed 7 years ago

mischief commented 9 years ago

because the command to collect the registry logs is somewhat complex, an additional field is added to the mayday.Command struct to set the name of the output while when an automatically generated name is not sufficient.

mischief commented 9 years ago

fixes #13

brianredbeard commented 9 years ago

Part of the design pattern is to show the command which would be run... i.e.:

netstat -> mayday_commands/netstat_-neopa

Using the symlink from netstat to mayday_commands/netstat_-neopa helps both the user and the support technician determine the flags used with the command. In the case of the enterprise registry logs, the output is:

enterprise_registry_log.tar -> mayday_commands/enterprise_registry_log.tar

Possibly we should create an /assets directory and symlink them in that way?

Other than that, log output looks good. I was able to run it against an E.R. install and troubleshoot my intentionally manufactured problem.

mischief commented 9 years ago

@brianredbeard PTAL

now we use docker inspect to grab the /var/log volume of the host, but tar'ing the dir requires mayday be run as root, whereas it seemed to run OK as non-root before since core user is in the docker group..

brianredbeard commented 9 years ago

Is there any way we can do inspection over /var/run/docker.sock rather than shelling out? This does also raise issues in my head of what this looks like with rkt.

mischief commented 9 years ago

@brianredbeard it seems possible, but i'm unsure of what is an appropriate go docker client. github.com/fsouza/go-dockerclient seems like it can list containers and give volume paths.

brianredbeard commented 9 years ago

@marineam / @bcwaldon maybe one of y'all has thoughts about the previous comment?

jzelinskie commented 9 years ago

@brianredbeard @mischief You can use docker cp to copy files "out" of a container, I imagine that there's an equivalent via a client library.