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

Include /etc/fstab in log collection #1836

Merged
merged 2 commits into from
Jun 14, 2024

Conversation

JoeNorth
Copy link
Contributor

@JoeNorth JoeNorth commented Jun 6, 2024

Issue #, if available:
N/A

Description of changes:

Updates the get_mounts_info() function to include collecting /etc/fstab as some troubleshooting requires validating the contents of this file.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Testing Done
Ran on the latest AL2 and AL2023 EKS optimized AMIs to confirm it works as expected.

See this guide for recommended testing for PRs. Some tests may not apply. Completing tests and providing additional validation steps are not required, but it is recommended and may reduce review time and time to merge.

@@ -312,6 +312,7 @@ get_mounts_info() {
lvs > "${COLLECT_DIR}"/storage/lvs.txt
pvs > "${COLLECT_DIR}"/storage/pvs.txt
vgs > "${COLLECT_DIR}"/storage/vgs.txt
cp --force /etc/fstab "${COLLECT_DIR}"/storage/fstab.txt
Copy link
Member

Choose a reason for hiding this comment

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

what is --force for?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There may not be any need for it. Just following the conventions already in place like the below command for collect dmesg logs:

cp --force /var/log/dmesg "${COLLECT_DIR}/kernel/dmesg.boot"

https://github.com/awslabs/amazon-eks-ami/blob/main/log-collector-script/linux/eks-log-collector.sh#L398

@cartermckinnon cartermckinnon merged commit 5e0f781 into awslabs:main Jun 14, 2024
10 checks passed
@JoeNorth JoeNorth deleted the log-collector-fstab branch June 14, 2024 19:46
atmosx pushed a commit to gathertown/amazon-eks-ami that referenced this pull request Jun 18, 2024
mebays pushed a commit to mebays/amazon-eks-ami that referenced this pull request Jul 26, 2024
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.

2 participants