-
Notifications
You must be signed in to change notification settings - Fork 169
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
Add gateway log rotatation #2988
Conversation
961f39b
to
4d54040
Compare
e2ea971
to
bb81733
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@s-fairchild I believe you need to re-run make generate
and commit/push the results in order for CI to pass.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I went through the logrotate options and things are making sense, just a few comments. Thanks!
bb81733
to
a594af9
Compare
@@ -67,6 +72,18 @@ include /etc/logrotate.d | |||
create 0600 root utmp | |||
rotate 1 | |||
} | |||
|
|||
# Maximum log directory size is 100G with this configuration | |||
# Setting limit to 100G to allow space for other logging services |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please update this comment to match the size on line 80
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment is correct, it's a multiple of size
and rotate
options. 5 logs of size 20G will be kept.
Please rebase pull request. |
a594af9
to
c03e29d
Compare
c03e29d
to
d809427
Compare
Please rebase pull request. |
The gateway container log is mounted in /var/log/aro-gateway to allow logrotate access to the file. Logs are rotated based on size, not time. Logs are rotated when they reach 20G in size, and a maximum of 100G total. This is to allow enough space for other logs and system services in /var. copytruncate option prevents the log file from being recreated after being deleted, which would create a condition where the log watcher/shipper thinks they are new. copytruncate truncates the log file, leaving it's modification timestamp the same.
d809427
to
e67f647
Compare
Which issue this PR addresses:
Fixes
Improved fix for https://portal.microsofticm.com/imp/v3/incidents/details/399550776/home
What this PR does / why we need it:
The gateway container log is mounted in
/var/log/aro-gateway
to allowlogrotate
access to the file. Logs are rotated based on size, not time. Logs are rotated when they reach 20G in size, and a maximum of 100G total. This is to allow enough space for other logs and system services in /var.copytruncate
option prevents the log file from being recreated after being deleted, which would create a condition where the log watcher/shipper thinks they are new.copytruncate
truncates the log file, leaving it's modification timestamp the same.Test plan for issue:
E2E tests, and I believe a full service RP will be required to actually test.
sshing into the gateway VMSS and testing the logrotate configuration manually.
Is there any documentation that needs to be updated for this PR?
No