Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be available on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 1415850 - Shouldn't /etc/cron.hourly/docker-cleanup be run under systemd to capture stdout/stderr in the logs? [NEEDINFO]
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: 2021-01-15 07:31 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:
tsweeney: needinfo? (lsm5)


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.


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