[Bug 460234] Re: Image store proxy's logrotate config triggers an email every day

Mathias Gug mathiaz at ubuntu.com
Fri Nov 13 22:11:59 GMT 2009


** Description changed:

  Hi
  
  Got an email from cron this morning:
  /etc/cron.daily/logrotate:                                                      
   * Restarting Image Store Proxy image-store-proxy                               
     ...done.                                                                     
  
  This is due to /etc/logrotate.d/image-store-proxy doing:
    postrotate
    /etc/init.d/image-store-proxy force-reload
    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/envvars ; echo ${APACHE_PID_FILE:-/var/run/apache2.pid}`" ]; then
                          /etc/init.d/apache2 reload > /dev/null
                  fi
          endscript
  
  Thanks
  
  ProblemType: Bug
  Architecture: amd64
  Date: Sun Oct 25 08:19:51 2009
  DistroRelease: Ubuntu 9.10
  Package: python-image-store-proxy 1.0.4-0ubuntu1
  PackageArchitecture: all
  ProcEnviron:
   SHELL=/bin/zsh
   PATH=(custom, user)
   LANG=fr_FR.UTF-8
  ProcVersionSignature: Ubuntu 2.6.31-11.38-generic
  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.
+ 
+ ==========

** Changed in: image-store-proxy (Ubuntu)
    Milestone: karmic-updates => None

** Changed in: image-store-proxy (Ubuntu)
       Status: New => In Progress

** Changed in: image-store-proxy (Ubuntu Karmic)
       Status: Triaged => In Progress

-- 
Image store proxy's logrotate config triggers an email every day
https://bugs.launchpad.net/bugs/460234
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to image-store-proxy in ubuntu.



More information about the Ubuntu-server-bugs mailing list