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

improve logging for eni attachment issues #2703

Merged
merged 1 commit into from
Nov 5, 2020
Merged

Conversation

sparrc
Copy link
Contributor

@sparrc sparrc commented Nov 3, 2020

Summary

Makes the log messages a bit more readable by removing unecessary semicolons and formats the timestamp to rfc3339. Also adds full eni details whenever available, where previously we were only printing the mac address.

log messages go from this:

level=info time=2020-11-02T16:08:49Z msg="Starting ENI ack timer with duration=2m59.99997755s, ENI Attachment: task=arn:aws:ecs:us-west-1:815665286609:task/stage-us-portal-ecs/6e8b2feb312c4e25a5cb2eeda2123c8a;attachment=arn:aws:ecs:us-west-1:815665286609:attachment/86d74d88-de5d-422c-a71f-4411a3a536e8;attachmentType=task-eni;attachmentSent=false;mac=06:5a:98:fe:4f:67;status=NONE;expiresAt=2020-11-02 16:11:49.2183602 +0000 UTC m=+672.840860713" module=eniattachment.go
...
level=warn time=2020-11-02T16:11:49Z msg="Timed out waiting for ENI ack; removing ENI attachment record with MAC address: 06:5a:98:fe:4f:67" module=attach_eni_handler_common.go

to this:

level=info time=2020-11-02T16:08:49Z msg="Starting ENI ack timer with duration=2m59.99997755s, ENI Attachment: task=arn:aws:ecs:us-west-1:815665286609:task/stage-us-portal-ecs/6e8b2feb312c4e25a5cb2eeda2123c8a attachment=arn:aws:ecs:us-west-1:815665286609:attachment/86d74d88-de5d-422c-a71f-4411a3a536e8 attachmentType=task-eni;attachmentSent=false mac=06:5a:98:fe:4f:67 status=NONE expiresAt=2020-11-02T16:11:49Z" module=eniattachment.go
...
level=warn time=2020-11-02T16:11:49Z msg="Timed out waiting for ENI ack; removing ENI attachment, ENI Attachment: task=arn:aws:ecs:us-west-1:815665286609:task/stage-us-portal-ecs/6e8b2feb312c4e25a5cb2eeda2123c8a attachment=arn:aws:ecs:us-west-1:815665286609:attachment/86d74d88-de5d-422c-a71f-4411a3a536e8 attachmentType=task-eni attachmentSent=false mac=06:5a:98:fe:4f:67 status=NONE expiresAt=2020-11-02T16:11:49Z" module=attach_eni_handler_common.go

Implementation details

Testing

New tests cover the changes: no

Description for the changelog

enhancement: more informative eni attachment logs

Licensing

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

@sparrc sparrc force-pushed the eni-attach-logging branch 2 times, most recently from 25d9136 to 55100e4 Compare November 4, 2020 23:52
@sparrc sparrc added the bot/test label Nov 5, 2020
@sparrc sparrc merged commit 6915dc9 into aws:dev Nov 5, 2020
@sparrc sparrc deleted the eni-attach-logging branch November 5, 2020 23:41
@sparrc sparrc added this to the 1.48.0 milestone Nov 12, 2020
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.

4 participants