RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 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 "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". 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 "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-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 1415850 - Shouldn't /etc/cron.hourly/docker-cleanup be run under systemd to capture stdout/stderr in the logs?
Summary: Shouldn't /etc/cron.hourly/docker-cleanup be run under systemd to capture std...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: docker
Version: 7.3
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: rc
: 7.3
Assignee: Lokesh Mandvekar
QA Contact: atomic-bugs@redhat.com
URL:
Whiteboard:
Depends On:
Blocks: 1441450
TreeView+ depends on / blocked
 
Reported: 2017-01-23 23:36 UTC by Peter Portante
Modified: 2023-09-15 00:01 UTC (History)
11 users (show)

Fixed In Version: docker-1.12.6-16.el7_3
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-01-15 07:31:05 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Peter Portante 2017-01-23 23:36:21 UTC
We found that with BZ https://bugzilla.redhat.com/show_bug.cgi?id=1347821, the hourly docker-cleanup script emits messages to stderr when run, and they are emailed to the root account only.  There are logs that show up in the normal log stream, but not from the cron job.

Shouldn't we be running this cron job as a systemd repeating service so that its output will be properly logged through journald?

Comment 3 Vivek Goyal 2017-02-10 18:13:05 UTC
Peter, running it as a service might be little heavy weight. And I am not sure if service infrastructure allows periodic invocation.

If you are concerned about logging to journal, I think that might be fixable. I found an article talking about using systemd-cat to connect stdout of the program to journal.

Comment 4 Peter Portante 2017-02-10 18:38:41 UTC
(In reply to Vivek Goyal from comment #3)
> Peter, running it as a service might be little heavy weight. And I am not
> sure if service infrastructure allows periodic invocation.

Now sure how that is any heavier weight that the current cron job.

Seems straightforward to do, https://wiki.archlinux.org/index.php/Systemd/Timers#As_a_cron_replacement

> 
> If you are concerned about logging to journal, I think that might be
> fixable. I found an article talking about using systemd-cat to connect
> stdout of the program to journal.

If we just make this a systemd service, we get it for free.

Comment 6 Ryan Howe 2017-04-26 21:58:39 UTC
Looks like this was removed. 

# rpm -ql docker-common-1.12.5-14.el7.x86_64
/etc/cron.hourly/docker-cleanup
/etc/docker/daemon.json
/etc/sysconfig/docker
/usr/bin/docker
/usr/bin/docker-containerd
/usr/bin/docker-containerd-shim
/usr/libexec/docker
/usr/share/doc/docker-common-1.12.5
/usr/share/doc/docker-common-1.12.5/README-docker-common


# rpm -ql docker-common-1.12.6-16.el7.x86_64
/etc/sysconfig/docker
/usr/bin/docker
/usr/bin/docker-containerd
/usr/bin/docker-containerd-shim
/usr/bin/dockerd
/usr/libexec/docker
/usr/share/doc/docker-common-1.12.6
/usr/share/doc/docker-common-1.12.6/README-docker-common

Comment 7 Javier Ramirez 2017-07-04 09:47:16 UTC
Just to mention that I can see there is already a docker-cleanup systemd timer in docker-1.12.6-16.el7.x86_64

# rpm -ql docker-1.12.6-16.el7.x86_64 | grep -i docker-cleanup
/usr/lib/systemd/system/docker-cleanup.service
/usr/lib/systemd/system/docker-cleanup.timer

Comment 11 RHEL Program Management 2021-01-15 07:31:05 UTC
After evaluating this issue, there are no plans to address it further or fix it in an upcoming release.  Therefore, it is being closed.  If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened.

Comment 12 Red Hat Bugzilla 2023-09-15 00:01:06 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 500 days


Note You need to log in before you can comment on or make changes to this bug.