-
Notifications
You must be signed in to change notification settings - Fork 7
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
Fix uwsgi log file permissions (PP-1667) #2077
Conversation
@@ -2,7 +2,7 @@ | |||
missingok | |||
daily | |||
create 0660 simplified adm | |||
rotate 30 | |||
rotate 13 |
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.
Align this with the retention we have for our other logs
@@ -1,7 +1,6 @@ | |||
/var/log/simplified/*.log { | |||
missingok | |||
daily | |||
create 0700 root root |
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.
Because we use copytruncate
this line is actually ignored, so we might as well drop it.
@@ -13,8 +12,7 @@ | |||
/var/log/uwsgi/*.log { | |||
missingok | |||
daily | |||
create 0660 simplified adm | |||
rotate 30 | |||
rotate 13 |
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.
Align this with the configuration we push out in our playbook.
@@ -1,5 +1,4 @@ | |||
[uwsgi] | |||
log-format = [uwsgi] %(var.HTTP_X_FORWARDED_FOR) (%(addr)) - - [%(ltime)] "%(method) %(uri) %(proto)" %(status) %(size) "%(referer)" "%(uagent)" host_hdr=%(host) req_time_elapsed=%(msecs) process=%(pid) worker=%(wid) | |||
logfile-chmod = 644 |
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.
This configuration option isn't used when using logger
, its only used when using the log-to
configuration. So we might as well drop it, since its deceiving that it is here.
When we switched to using logger
in this config is probably when it broke.
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.
Looks good! 🎸
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2077 +/- ##
=======================================
Coverage 90.79% 90.79%
=======================================
Files 344 344
Lines 40601 40601
Branches 8796 8796
=======================================
+ Hits 36862 36863 +1
+ Misses 2485 2484 -1
Partials 1254 1254 ☔ View full report in Codecov by Sentry. |
Description
Updates our docker build to make sure that:
/var/log/uwsgi
/var/log/uwsgi/uwsgi.log
Motivation and Context
I'm not sure when this got broken, but I realized when trying to work on PP-1667 this morning that we were not geting logs uploaded from staging, and then I went looking and all recently deployed CMs are in the same state.
Since
/var/log
is mounted as a volume, this will fix things for any new CM, but existing ones will to have their permissions updated. I'm planning to make a follow up PR to do this.How Has This Been Tested?
docker compose up
locally, and checked things have the correct permissionsChecklist