Project

General

Profile

Bug #3236

logrotate.d script from debian repo does not work

Added by Tobias Florek almost 8 years ago. Updated almost 8 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
% Done:

0%

Source:
Development
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature:

Description

it uses initctl, which does only work with recentish versions of upstart, which are not in wheezy or sysvinit.

logrotate.d.ceph.diff View - patch to check for existence of init.d control scripts before executing (1.36 KB) Tobias Florek, 10/01/2012 01:31 AM

History

#1 Updated by Sage Weil almost 8 years ago

  • Status changed from New to Need More Info

the logrotate script is an 'all of the above':


        invoke-rc.d ceph reload >/dev/null || service ceph reload >/dev/null

        # upstart reload isn't very helpful here:
        #   https://bugs.launchpad.net/upstart/+bug/1012938
        for type in mon osd mds; do
            initctl list \
            | perl -ne 'print "$+{service} cluster=$+{cluster} id=$+{id}\n" if m{^(?<service>ceph-(mon|osd|mds)+)\s+\((?<cluster>[^/)]+)/(?<id>[^)]+)\) start/}' \
            | while read l; do
                initctl reload -- $l 2>/dev/null || :
            done
        done

it reloads via sysvinit and upstart. can you be more specific about what didn't work?

#2 Updated by Tobias Florek almost 8 years ago

i did not read closely. you are, of course, right. the problem is, that on all debian systems, initctl won't exist, so you will get a message from cron about it.

#3 Updated by Sage Weil almost 8 years ago

  • Status changed from Need More Info to Fix Under Review

Tobias Florek wrote:

i did not read closely. you are, of course, right. the problem is, that on all debian systems, initctl won't exist, so you will get a message from cron about it.

Looks good. I can add your Signed-off-by I assume?

Thanks!

#4 Updated by Tobias Florek almost 8 years ago

yes.

#5 Updated by Sage Weil almost 8 years ago

  • Status changed from Fix Under Review to Resolved

Also available in: Atom PDF