logrotate reload error on Ubuntu 14.04
The logrotate script tries to restart ceph using invoke-rc.d, which results it the following error:
invoke-rc.d: policy-rc.d denied execution of reload.
On Ubuntu 14.04, both `invoke-rc.d' and `service' exist but the latter should be used instead. Switching the order of detection in /etc/logrotate.d/ceph should fix this.
#5 Updated by Kefu Chai over 7 years ago
just for the fun of reading,
There is a provision for a "local initscript policy layer" (read: a call to /usr/sbin/policy-rc.d if this executable is present in the local system), which allows the local system administrator to control the behaviour of invoke-rc.d for every initscript id and action. It is assumed that this script is OPTIONAL and will by written and provided by packages other than the initscript system (sysvinit and file-rc packages).
the policy-rc.d in this case returns 101, which means the action is denied by local admin. so we try
service first as a workaround. i think it's okay to respect /usr/sbin/policy-rc.d though.
but when it comes to the maintainer script, like
ceph.prerm, we should respect Debian policy 9.3.3 and stick to