Univention Bugzilla – Bug 37316
logrotate does not trigger UMC components to reopen their logfiles
Last modified: 2015-05-19 13:40:36 CEST
For 3.2-4 errata. +++ This bug was initially created as a clone of Bug #37159 +++ In case there is a crash with UMC, this problem leads to empty UMC log files: * logrotate renames the log files → UMC server process still holds the file handle to the moved files * after a day, logrotate compresses the log file → output into the old file handles is not written anymore to hard disk In addition to Bug 36473, UMC server would need to handle the corresponding signal emitted by logrotate. +++ This bug was initially created as a clone of Bug #36473 +++ logrotate does not trigger the running applications to reopen their logfiles. Thus they are still logging into already deleted files and the log entries are lost. root@master:~# lsof | grep .log.1 apache2 1445 www-data 3u REG 253,0 1069 400448 /var/log/univention/management-console-module-lib.log.1 (deleted) apache2 1629 www-data 3u REG 253,0 1069 400448 /var/log/univention/management-console-module-lib.log.1 (deleted) apache2 5946 www-data 3u REG 253,0 1069 400448 /var/log/univention/management-console-module-lib.log.1 (deleted) apache2 5947 www-data 3u REG 253,0 1069 400448 /var/log/univention/management-console-module-lib.log.1 (deleted) apache2 6637 www-data 3u REG 253,0 1069 400448 /var/log/univention/management-console-module-lib.log.1 (deleted) squid3 8153 root 3u REG 253,0 18665 399352 /var/log/squid3/cache.log.1 (deleted) squid3 8156 proxy 3u REG 253,0 18665 399352 /var/log/squid3/cache.log.1 (deleted) univentio 11056 root 4u REG 253,0 37070 400458 /var/log/univention/management-console-web-server.log.1 (deleted) apache2 11104 root 3u REG 253,0 1069 400448 /var/log/univention/management-console-module-lib.log.1 (deleted) apache2 18150 www-data 3u REG 253,0 1069 400448 /var/log/univention/management-console-module-lib.log.1 (deleted) apache2 18157 www-data 3u REG 253,0 1069 400448 /var/log/univention/management-console-module-lib.log.1 (deleted) apache2 20148 www-data 3u REG 253,0 1069 400448 /var/log/univention/management-console-module-lib.log.1 (deleted) apache2 23107 www-data 3u REG 253,0 1069 400448 /var/log/univention/management-console-module-lib.log.1 (deleted) apache2 31323 www-data 3u REG 253,0 1069 400448 /var/log/univention/management-console-module-lib.log.1 (deleted)
Logrotate now sends a SIGHUP (1) to the UMC-web-server and UMC-server process. UMC-server and web-server triggers univention.debug.reload(). A segfault there has been fixed. Fix: svn r56743 r56744 r56745 r56759 r56760 r56762 2014-12-12-univention-debug.yaml (3.2-3 & 3.2-4) 2014-12-12-univention-management-console-frontend.yaml (only 3.2-4) 2014-12-12-univention-management-console.yaml (3.2-3 & 3.2-4)
OK - (web)-server and computerrom process still ran after logrotate OK - new logs got data after logrotate OK - yaml for debug, console, frontend OK - changelog console, frontend, debug
http://errata.univention.de/ucs/3.2/251.html
http://errata.univention.de/ucs/3.2/250.html
http://errata.univention.de/ucs/3.2/249.html
http://errata.univention.de/ucs/3.2/256.html