Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

host-ctr: add a mount for system logs #2295

Merged
merged 1 commit into from
Jul 27, 2022

Conversation

mchaker
Copy link
Contributor

@mchaker mchaker commented Jul 22, 2022

Issue number:

Closes #2196

Description of changes:

Add a container-visible mount for /var/log/support,
which contains system logs.

Testing done:

  • booted an aws-dev host and checked that both the control and admin containers could see /.bottlerocket/support/
  • in the aws-dev host, ran logdog under sheltie and checked that I could see the generated file in the control container.

Terms of contribution:

By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.

@mchaker
Copy link
Contributor Author

mchaker commented Jul 22, 2022

Latest force push: added a mention of the log visibility in the README.

README.md Outdated
@@ -909,6 +909,8 @@ ssh -i YOUR_KEY_FILE \

For a list of what is collected, see the logdog [command list](sources/logdog/src/log_request.rs).

Log archives are also visible to host containers.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: move this line a few lines above, before "You can use SSH", and say something like:

This archive is accessible from host containers at `<blah>`.
....

@mchaker mchaker force-pushed the mchaker-2022-07-mount-logs branch from 10e589e to d1b92b6 Compare July 22, 2022 19:46
@mchaker
Copy link
Contributor Author

mchaker commented Jul 22, 2022

Latest force push: revise README documentation

Copy link
Contributor

@bcressey bcressey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to go under a separate directory for the purpose, like /.bottlerocket/support. rootfs is a different directory with a different purpose - exposing the host's entire root filesystem.

@mchaker mchaker force-pushed the mchaker-2022-07-mount-logs branch from d1b92b6 to 0022e8d Compare July 22, 2022 22:15
@mchaker
Copy link
Contributor Author

mchaker commented Jul 22, 2022

Latest force push: change mount destination directory to align with directory purposes

@mchaker mchaker marked this pull request as ready for review July 22, 2022 23:59
@@ -896,6 +896,7 @@ logdog
```

This will write an archive of the logs to `/var/log/support/bottlerocket-logs.tar.gz`.
This archive is accessible from host containers at `/.bottlerocket/support`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can also fix the URL in the code block below to reflect this path.

Add a container-visible mount for /var/log/support, which contains
system logs.
@mchaker mchaker force-pushed the mchaker-2022-07-mount-logs branch from 0022e8d to 3bd7ae5 Compare July 25, 2022 22:26
@mchaker
Copy link
Contributor Author

mchaker commented Jul 25, 2022

Latest force push: fix sample SSH command referencing the new log mount path

@mchaker mchaker requested a review from bcressey July 26, 2022 00:17
@mchaker mchaker merged commit 2e4049a into bottlerocket-os:develop Jul 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

make it easier to get logs
3 participants