Image store proxy's logrotate config triggers an email every day
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
image-store-proxy (Ubuntu) |
Fix Released
|
Low
|
Mathias Gug | ||
Karmic |
Fix Released
|
Low
|
Mathias Gug |
Bug Description
Hi
Got an email from cron this morning:
/etc/cron.
* Restarting Image Store Proxy image-store-proxy
...done.
This is due to /etc/logrotate.
postrotate
/etc/
endscript
I suggest only reloading if the proxy is running and redirecting non-error output to /dev/null like apache2 does:
postrotate
if [ -f "`. /etc/apache2/
fi
endscript
Thanks
ProblemType: Bug
Architecture: amd64
Date: Sun Oct 25 08:19:51 2009
DistroRelease: Ubuntu 9.10
Package: python-
PackageArchitec
ProcEnviron:
SHELL=/bin/zsh
PATH=(custom, user)
LANG=fr_FR.UTF-8
ProcVersionSign
SourcePackage: image-store-proxy
Uname: Linux 2.6.31-11-generic x86_64
==========
Karmic SRU
Impact:
When image-store-proxy are rotated the daemon is restarted which prints a message on stdout. As consequence an email is automatically generated everytime log are rotated.
How the problem has been addressed:
The postrotate script checks whether the daemon is running. If so it restarts it with std out redirected to /dev/null.
TESTCASE:
1. Install image-store-proxy.
2. Force a log rotation:
sudo /usr/sbin/logrotate /etc/logrotate.conf -f
Before the upgrade:
A message should be printed on standard output:
* Restarting Image Store Proxy image-store-proxy
...done.
After the upgrade there shouldn't be any message printed. The image-store-proxy daemon should have been restarted (new pid).
Regression potential:
The logic used for the fix is similar to the one used in the apache2 package. If the logic fails image-store-proxy daemon will keep writing to existing log file which will be eventually deleted.
==========
summary: |
- Image story's logrotate config triggers an email every day + Image store proxy's logrotate config triggers an email every day |
Changed in image-store-proxy (Ubuntu): | |
milestone: | ubuntu-9.10 → karmic-updates |
Changed in image-store-proxy (Ubuntu Karmic): | |
status: | New → Won't Fix |
status: | Won't Fix → Triaged |
assignee: | Canonical Server Team (canonical-server) → Mathias Gug (mathiaz) |
tags: | added: uec |
description: | updated |
Changed in image-store-proxy (Ubuntu): | |
milestone: | karmic-updates → none |
status: | New → In Progress |
Changed in image-store-proxy (Ubuntu Karmic): | |
status: | Triaged → In Progress |
Would be nice to fix for final, but there are probably higher priority things to fix, please move to -updates or remove the karmic task if you can't address it as a SRU either.