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 1690538 - rear cron first time run triggers a cron mail with error in mail body
Summary: rear cron first time run triggers a cron mail with error in mail body
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: rear
Version: 7.6
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Vitezslav Crhonek
QA Contact: BaseOS QE - Apps
URL:
Whiteboard:
Depends On:
Blocks: 1122832 1729499
TreeView+ depends on / blocked
 
Reported: 2019-03-19 16:16 UTC by Oliver Falk
Modified: 2024-06-13 22:04 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1729499 (view as bug list)
Environment:
Last Closed: 2020-11-11 21:55:03 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Oliver Falk 2019-03-19 16:16:21 UTC
Description of problem:
When installing rear without configuring, it triggers an e-mail via cron in the night with an error message.

Version-Release number of selected component (if applicable): -


How reproducible:
Always.


Steps to Reproduce:
1. Install rear
   # sudo yum install -y rear
2. Run the content that is listed in cron (/etc/cron.d/rear)
   # /usr/sbin/rear checklayout || /usr/sbin/rear mkrescue

If you want to reproduce it after that:
   # sudo rm -rf /var/lib/rear/layout

Actual results (on command line and in the cron mail):
    # /usr/sbin/rear checklayout || /usr/sbin/rear mkrescue
    ERROR: No (non-empty) /var/lib/rear/layout/disklayout.conf file (needs to be created before e.g. via 'rear mkrescue/mkbackup')
    Aborting due to an error, check /var/log/rear/rear-xxx.log.lockless for details
    Terminated


Expected results:
No error should be triggered.


Additional info:
Customer case will be attached.

Comment 2 Pavel Cahyna 2019-03-19 16:23:55 UTC
I looked at exactly that cron job very recently and thought that it is quite strange to enable this unconditionally. I will think about what can be done.

Comment 3 Oliver Falk 2019-03-20 08:23:58 UTC
Pavel, great you already assigned this to you.
I guess a simple if-statement around that cron job would be sufficient to eliminate the error mail.

Comment 4 Pavel Cahyna 2019-03-20 10:02:45 UTC
Oliver, I was thinking more about the issue and it is not clear to me that there is a real problem. Why is it a bad thing that a backup tool reminds the administrator that it needs to be configured and properly run first in order to be of any use?

Comment 5 Oliver Falk 2019-03-20 10:21:53 UTC
Pavel, you're right. It's not a _real_ problem, however, imagine you deploy rear on hundreds of machines and want to continue the configuration on the next day, you'll receive hundreds of mails in the night. Maybe not what you want. And even funnier, after the first "error"-mail, you no longer receive an e-mail.
I guess you know what I mean? :-)

Comment 10 Vaclav Dolezal 2020-03-05 15:43:07 UTC
I guess changing the command to
  test -f /var/lib/rear/layout/disklayout.conf && /usr/sbin/rear checklayout || /usr/sbin/rear mkrescue
should do the trick.

Or maybe we can comment out that line so it isn't enabled by default?

Note:
that cron file comes from the upstream .spec file and it has already been removed upstream:
https://github.com/rear/rear/commit/89a8f18ec402b439caf4800421644f5bf5d174e5
(see referenced issue for more info)

Comment 11 Oliver Falk 2020-03-06 09:17:31 UTC
IMHO.

If we remove that cron we'll run into the following issues:
*) Users who are used to have that cron in place, suddenly don't get it any longer.
*) ^^^ leads to: Requires work on the user end.

If we comment out the line we'll run into two other issues:
*) Requires more work on the user end: Enable it for (potentially) hundreds of systems.
*) ^^^ leads to: In case we decide to update something in that file at some point in time, the struggle with .rpmnew ...

In both scenarios:
*) I don't think these are changes we want to introduce in the current life cycle phase of RHEL7.
*) It requires more work on the user end + docs (/release notes).
*) As Pavel pointed out, fixing this in RHEL8, but not in RHEL7, would lead to deviation between RHEL7 and RHEL8 (and actually not fix the issue in RHEL7, which we'll have to support for a few more years; Think ELS).

If we adapt the line, as Vaclav suggested, I guess that is the better user experience.

My 2 cents,
 Oliver

Comment 12 Peter Vreman 2020-04-21 13:43:58 UTC
The upstream proposal of the systemd code has the same error, that the command will fail with exit code 1. 
So the systemd also requires to replace the logical of '||'  a 'if ... then ...; fi' to not fail with exit code 1.

Comment 22 Chris Williams 2020-11-11 21:55:03 UTC
Red Hat Enterprise Linux 7 shipped it's final minor release on September 29th, 2020. 7.9 was the last minor releases scheduled for RHEL 7.
From intial triage it does not appear the remaining Bugzillas meet the inclusion criteria for Maintenance Phase 2 and will now be closed. 

From the RHEL life cycle page:
https://access.redhat.com/support/policy/updates/errata#Maintenance_Support_2_Phase
"During Maintenance Support 2 Phase for Red Hat Enterprise Linux version 7,Red Hat defined Critical and Important impact Security Advisories (RHSAs) and selected (at Red Hat discretion) Urgent Priority Bug Fix Advisories (RHBAs) may be released as they become available."

If this BZ was closed in error and meets the above criteria please re-open it flag for 7.9.z, provide suitable business and technical justifications, and follow the process for Accelerated Fixes:
https://source.redhat.com/groups/public/pnt-cxno/pnt_customer_experience_and_operations_wiki/support_delivery_accelerated_fix_release_handbook  

Feature Requests can re-opened and moved to RHEL 8 if the desired functionality is not already present in the product. 

Please reach out to the applicable Product Experience Engineer[0] if you have any questions or concerns.  

[0] https://bugzilla.redhat.com/page.cgi?id=agile_component_mapping.html&product=Red+Hat+Enterprise+Linux+7


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