TITLE:
logrotate proxy_error_log with dateext issue
PRODUCT, VERSION, OPERATING SYSTEM, ARCHITECTURE:Plesk Obsidian Version 18.0.16, CentOS Linux 7.6.1810 (Core), x64
PROBLEM DESCRIPTION:When adding the line dateext on top of /usr/local/psa/etc/logrotate.conf the dateext format is applied to both directories:
/var/www/vhosts/system/domain.com/logs/
/var/www/vhosts/domain.com/logs/
But in the one without system in the path the old proxy_error_log files won't be deleted. This causes that every file since the day i switched to dateext is kept in /var/www/vhosts/domain.com/logs/ for most of the domains. In the other directory it works like expected.
In the actual case the error happens for the most domains but not all. I didn't found any clues why.
This is the same behavior as described in the following bug with the exception that it only affects the proxy_error_log.
[PPP-28469] logrotate with dateext issue
STEPS TO REPRODUCE:/var/www/vhosts/system/domain.com/logs/
/var/www/vhosts/domain.com/logs/
But in the one without system in the path the old proxy_error_log files won't be deleted. This causes that every file since the day i switched to dateext is kept in /var/www/vhosts/domain.com/logs/ for most of the domains. In the other directory it works like expected.
In the actual case the error happens for the most domains but not all. I didn't found any clues why.
This is the same behavior as described in the following bug with the exception that it only affects the proxy_error_log.
[PPP-28469] logrotate with dateext issue
Add dateext to the top of /usr/local/psa/etc/logrotate.conf
It looks like this for me (i want dateext for all logs):
cat /usr/local/psa/etc/logrotate.conf
dateext
include /usr/local/psa/etc/logrotate.d
...
Than wait till there are proxy_error_log files which should be removed.
ACTUAL RESULT:It looks like this for me (i want dateext for all logs):
cat /usr/local/psa/etc/logrotate.conf
dateext
include /usr/local/psa/etc/logrotate.d
...
Than wait till there are proxy_error_log files which should be removed.
Only the proxy_error_log files in /var/www/vhosts/system/domain.com/logs/ are deleted after the specific amount for example 14 logs (depends on the logs to keep setting per domain).
The files in /var/www/vhosts/domain.com/logs/ are kept forever.
EXPECTED RESULT:The files in /var/www/vhosts/domain.com/logs/ are kept forever.
Both directories should deleted the old files. Like it's already done in the directory /var/www/vhosts/system/domain.com/logs/
It shouldn't behave different with dateext enabled. Without dateext in both directories are the same amount of logfiles in both directories.
ANY ADDITIONAL INFORMATION:It shouldn't behave different with dateext enabled. Without dateext in both directories are the same amount of logfiles in both directories.
YOUR EXPECTATIONS FROM PLESK SERVICE TEAM:Confirm bug