Closed mischief closed 7 years ago
fixes #13
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.
@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..
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
.
@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.
@marineam / @bcwaldon maybe one of y'all has thoughts about the previous comment?
@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.
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.