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.
DescriptionSteffen Froemer
2019-06-03 08:18:23 UTC
Description of problem:
For better readability, the /var/log/foreman/cron.log should contain a valid timestamp
Version-Release number of selected component (if applicable):
foreman-1.20.1.34-1.el7sat.noarch
How reproducible:
always
Steps to Reproduce:
1. su - foreman -s /bin/bash
2. run an example command from /etc/cron.d/foreman
$ /usr/sbin/foreman-rake notifications:clean >>/var/log/foreman/cron.log 2>&1
Actual results:
Starting expired notifications clean up...
Finished, cleaned 0 notifications
Expected results:
[2019-06-03 10:15:52] Starting expired notifications clean up...
[2019-06-03 10:15:52] Finished, cleaned 0 notifications
Additional info:
As foreman-rake does not provide timestamp, it could be workarounded by adding an additional command to crontab
e.g.
# Clean expired notifications
0 6 * * 0 foreman /usr/sbin/foreman-rake notifications:clean | gawk '{ print strftime("[%Y-%m-%d %H:%M:%S]"), $0 }' >>/var/log/foreman/cron.log 2>&1
VERIFIED.
@Satellite 6.10.0 Snap10.0
foreman-2.5.2-1.el7sat.noarch
by the following manual command:
# tail /var/log/foreman/cron.log
[2021-07-27 14:30:17] 'ErbParser' is ignored.
[2021-07-27 14:30:17] 'RubyParser' is ignored.
[2021-07-27 15:00:03] `/usr/share/foreman` is not writable.
[2021-07-27 15:00:03] Bundler will use `/tmp/bundler20210727-65313-g1dxc965313' as your home directory temporarily.
[2021-07-27 15:00:16] 'ErbParser' is ignored.
[2021-07-27 15:00:16] 'RubyParser' is ignored.
[2021-07-27 15:30:04] `/usr/share/foreman` is not writable.
[2021-07-27 15:30:04] Bundler will use `/tmp/bundler20210727-65657-hq8muq65657' as your home directory temporarily.
[2021-07-27 15:30:17] 'ErbParser' is ignored.
[2021-07-27 15:30:17] 'RubyParser' is ignored.
>>> /var/log/foreman/cron.log now contains only entries with timestamp
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory (Moderate: Satellite 6.10 Release), and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHSA-2021:4702
Description of problem: For better readability, the /var/log/foreman/cron.log should contain a valid timestamp Version-Release number of selected component (if applicable): foreman-1.20.1.34-1.el7sat.noarch How reproducible: always Steps to Reproduce: 1. su - foreman -s /bin/bash 2. run an example command from /etc/cron.d/foreman $ /usr/sbin/foreman-rake notifications:clean >>/var/log/foreman/cron.log 2>&1 Actual results: Starting expired notifications clean up... Finished, cleaned 0 notifications Expected results: [2019-06-03 10:15:52] Starting expired notifications clean up... [2019-06-03 10:15:52] Finished, cleaned 0 notifications Additional info: As foreman-rake does not provide timestamp, it could be workarounded by adding an additional command to crontab e.g. # Clean expired notifications 0 6 * * 0 foreman /usr/sbin/foreman-rake notifications:clean | gawk '{ print strftime("[%Y-%m-%d %H:%M:%S]"), $0 }' >>/var/log/foreman/cron.log 2>&1