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

EBS CSI Log to file #4010

Merged
merged 1 commit into from Nov 2, 2023
Merged

EBS CSI Log to file #4010

merged 1 commit into from Nov 2, 2023

Conversation

fierlion
Copy link
Member

@fierlion fierlion commented Nov 1, 2023

Summary

The EBS CSI logs weren't showing up in the host. This is due to a misconfiguration in the logging cli arguments passed to the container.

Implementation details

The configuration required --log_file=/var/log/csi.log and --logtostderr=false as the klog documentation recommends

Testing

Ran with latest CSI Driver image; built a new agent with this change.
I now see the CSI Driver container logs showing up in their expected host directory.

[ec2-user ebs-csi-driver]$ pwd
/var/log/ecs/daemons/ebs-csi-driver
[ec2-user ebs-csi-driver]$ ls
csi.log
[ec2-user ebs-csi-driver]$ cat csi.log
Log file created at: 2023/11/01 18:09:31
Running on machine: 
Binary: Built with gc go1.20.10 for linux/amd64
Log line format: [IWEF]mmdd hh:mm:ss.uuuuuu threadid file:line] msg
I1101 18:09:31.455041       1 driver.go:45] "Driver Information" Driver="csi-driver" Version="v1.0.0"
I1101 18:09:31.639455       1 node_linux.go:55] "Device Path:" Driver="/dev/nvme2n1" VolumeID="vol-0a9c635c74e3da29d" Partition=""
I1101 18:09:31.639471       1 node_linux.go:69] "Device Path:" Driver="/dev/nvme2n1" VolumeID="vol-0a9c635c74e3da29d" Partition=""
I1101 18:09:31.639503       1 node.go:161] "NodeStageVolume: path exists:" exists=false
I1101 18:09:31.639511       1 node.go:172] "NodeStageVolume: creating target dir" target="/mnt/ecs/ebs/ca4e2f08a78e43f698bef10faa5be302_vol-0a9c635c74e3da29d"
...

New tests cover the changes: no

Description for the changelog

Bugfix to log EBS CSI to a file.

Licensing

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@fierlion fierlion requested a review from a team as a code owner November 1, 2023 18:17
xxx0624
xxx0624 previously approved these changes Nov 1, 2023
amogh09
amogh09 previously approved these changes Nov 1, 2023
mythri-garaga
mythri-garaga previously approved these changes Nov 1, 2023
mye956
mye956 previously approved these changes Nov 1, 2023
@fierlion fierlion merged commit 7382c87 into aws:dev Nov 2, 2023
40 checks passed
@fierlion fierlion deleted the fierlion/fixCsiLog branch November 2, 2023 22:17
@chienhanlin chienhanlin mentioned this pull request Nov 13, 2023
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.

None yet

7 participants