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.
Reproducer:
1. In this version satellite is katello-backup deprecated, it was replaced by 'foreman-maintain backup'.
> katello-backup --help
IMPORTANT: katello-backup has been removed in favor of 'foreman-maintain backup'.
This change happened in order to support remote databases and a newer mongo version.
Please update your scripts and/or cron jobs.
2. We can try manually backup
> foreman-maintain backup online -y --skip-pulp-content /tmp/sat-backup
...
Done with backup: 2018-07-19 03:34:12 -0400
**** BACKUP Complete, contents can be found in: /tmp/sat-backup/satellite-backup-2018-07-19-03-33-47 ****
> echo $?
0
3. The same step via cron
> echo "30 3 * * * root foreman-maintain backup online -y --skip-pulp-content /tmp/sat-backup >> /tmp/backups.log 2>&1" >> /etc/crontab
Wait when the time is passed and check the log /tmp/backups.log
> grep FAIL /tmp/backups.log
To this point all works fine. But if we try to use "crontab -e" respectively /var/spool/crontab/root
4.
> crontab -e
add line
"0 3 * * * foreman-maintain backup online -y --skip-pulp-content /tmp/sat-backup >> /tmp/backups.log 2>&1"
> grep -B 1 FAIL /tmp/backups.log
Check if the directory exists and is writable: sh: runuser: command not found
[FAIL]
The problem is with $PATH and non-absolute using of runuser.
I'm not sure if it is reason to FAILQA. Maybe a mention in documentation could help.
Mike, what do you think about that?
Does it work when you wrap it with `bash -l -c 'foreman-maintain backup online -y --skip-pulp-content /tmp/sat-backup >> /tmp/backups.log 2>&1'`? If that's the case, I'd vote for just raising a doc bug and make this verified.
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, 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-2018:2927