Skip to content
This repository has been archived by the owner on Apr 3, 2020. It is now read-only.

collect /var/log from enterprise registry container #18

Closed
wants to merge 1 commit into from

Conversation

mischief
Copy link
Contributor

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
Copy link
Contributor Author

fixes #13

@brianredbeard
Copy link
Member

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.

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
Copy link
Contributor Author

@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
Copy link
Member

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
Copy link
Contributor Author

@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
Copy link
Member

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

@jzelinskie
Copy link

@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.

@mischief mischief closed this Feb 10, 2017
@mischief mischief deleted the registry-logs branch February 10, 2017 02:26
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants