Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1622635

Summary: Qdrouterd.log is not listed in logrotate.d
Product: Red Hat Satellite Reporter: patalber
Component: QpidAssignee: Mike Cressman <mcressma>
Status: CLOSED CURRENTRELEASE QA Contact: Jan Hutaƙ <jhutar>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.3.2CC: akarimi, phess, pmoravec, vhernand
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-04-26 10:26:34 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
sample /etc/logrotate.d/qdrouterd.conf none

Description patalber 2018-08-27 16:00:27 UTC
Description of problem:
qdrouterd.log is not listed in logrotate.d

Version-Release number of selected component (if applicable):
qpid-dispatch-router-0.8.0-19.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Check logrotate.d
2. See that qdrouterd.log is not listed
3.

Actual results:
qdrouterd.log is not listed

Expected results:
qdrouterd.log has a listing in logrotate.d

Additional info:

Comment 1 Pablo Hess 2018-08-27 19:15:13 UTC
Looks like qdrouterd does not re-create the log file upon receiving SIGHUP or any other signal:

As per:
https://github.com/apache/qpid-dispatch/blob/master/router/src/main.c

/**
 * This is the OS signal handler, invoked on an undetermined thread at a completely
 * arbitrary point of time.
 */
static void signal_handler(int signum)
{
    /* Ignore future signals, dispatch may already be freed */
    signal(SIGHUP,  SIG_IGN);
    signal(SIGQUIT, SIG_IGN);
    signal(SIGTERM, SIG_IGN);
    signal(SIGINT,  SIG_IGN);
    switch (signum) {
    case SIGINT:
        exit_with_sigint = 1;
        // fallthrough
    case SIGQUIT:
    case SIGTERM:
        qd_server_stop(dispatch); /* qpid_server_stop is signal-safe */
        break;
    default:
        break;
    }
}



So the only possible way to implement log rotation is through logrotate's copytruncate (see logrotate.conf(8)).

I'm attaching a sample /etc/logrotate.d/qdrouterd.conf that should work fine.

Comment 2 Pablo Hess 2018-08-27 19:16:54 UTC
Created attachment 1479041 [details]
sample /etc/logrotate.d/qdrouterd.conf

Place this file under /etc/logrotate.d/ and wait a few days to see /var/log/qdrouterd.log get rotated.

Comment 4 Pavel Moravec 2018-12-14 12:57:20 UTC
Won't we return back to qpidd and qdrouterd logging via syslog, what would make this BZ redundant?

Comment 5 Pavel Moravec 2019-04-26 10:26:34 UTC
(In reply to Pavel Moravec from comment #4)
> Won't we return back to qpidd and qdrouterd logging via syslog, what would
> make this BZ redundant?

Yes we are, in 6.4 and also in Sat6.5 HTB:

log {
    module: DEFAULT
    enable: info+
    timestamp: true
    output: syslog
}


So I will close this BZ as resolved - qdrouterd logs are logrotated (again) since 6.4.