Skip to content

eks-log-collector.sh: copy AWS EBS/EFS driver logs #979

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

Merged
merged 1 commit into from
Aug 8, 2022
Merged

eks-log-collector.sh: copy AWS EBS/EFS driver logs #979

merged 1 commit into from
Aug 8, 2022

Conversation

tzneal
Copy link
Contributor

@tzneal tzneal commented Aug 8, 2022

Description of changes:

Copy the AWS EBS/EFS driver logs if available as part of the log archive.

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

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.

@tzneal tzneal changed the title copy AWS EBS/EFS driver logs eks-log-collector.sh: copy AWS EBS/EFS driver logs Aug 8, 2022
@cartermckinnon cartermckinnon self-requested a review August 8, 2022 17:04
@cartermckinnon
Copy link
Member

How does this work? The EFS CSI driver has this script that does kubectl logs on the efs-driver container: https://github.com/kubernetes-sigs/aws-efs-csi-driver/blob/master/troubleshooting/log_collector.py

@tzneal
Copy link
Contributor Author

tzneal commented Aug 8, 2022

How does this work? The EFS CSI driver has this script that does kubectl logs on the efs-driver container: https://github.com/kubernetes-sigs/aws-efs-csi-driver/blob/master/troubleshooting/log_collector.py

It copies them directly from where containerd/docker are writing them. kubectl isn't installed on the EKS AMI by default so that method doesn't work.

sh-4.2$ find /var/log/containers/ebs-csi-* /var/log/pods/kube-system_ebs-csi*
/var/log/containers/ebs-csi-node-zs7tv_kube-system_ebs-plugin-73aacb8f2301fbc6b03df17c97cc26e89a5f22696547e90cfd6f49041344f4d1.log
/var/log/containers/ebs-csi-node-zs7tv_kube-system_liveness-probe-c3a1d55ecb5f2f29b381229475f16ca430e2717dcf0c2f3dfb966d83a6aa082d.log
/var/log/containers/ebs-csi-node-zs7tv_kube-system_node-driver-registrar-09f366b84dd9c82a964a833fffdad29d2cf5f9406f048c37e8679817e33c6de9.log
/var/log/pods/kube-system_ebs-csi-node-zs7tv_eae4539e-ece0-4241-a688-29e5cd7d4d70
/var/log/pods/kube-system_ebs-csi-node-zs7tv_eae4539e-ece0-4241-a688-29e5cd7d4d70/ebs-plugin
/var/log/pods/kube-system_ebs-csi-node-zs7tv_eae4539e-ece0-4241-a688-29e5cd7d4d70/ebs-plugin/0.log
/var/log/pods/kube-system_ebs-csi-node-zs7tv_eae4539e-ece0-4241-a688-29e5cd7d4d70/node-driver-registrar
/var/log/pods/kube-system_ebs-csi-node-zs7tv_eae4539e-ece0-4241-a688-29e5cd7d4d70/node-driver-registrar/0.log
/var/log/pods/kube-system_ebs-csi-node-zs7tv_eae4539e-ece0-4241-a688-29e5cd7d4d70/liveness-probe
/var/log/pods/kube-system_ebs-csi-node-zs7tv_eae4539e-ece0-4241-a688-29e5cd7d4d70/liveness-probe/0.log

@cartermckinnon
Copy link
Member

Makes sense!

@tzneal tzneal merged commit 1cf9757 into awslabs:master Aug 8, 2022
@tzneal tzneal deleted the copy-ebs-efs-driver-logs branch August 8, 2022 18:25
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