| Summary: | katello-backup returns with wrong exit code when failing | ||
|---|---|---|---|
| Product: | Red Hat Satellite | Reporter: | Luc de Louw <ldelouw> |
| Component: | Backup & Restore | Assignee: | satellite6-bugs <satellite6-bugs> |
| Status: | CLOSED ERRATA | QA Contact: | Peter Ondrejka <pondrejk> |
| Severity: | high | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 6.1.8 | CC: | anerurka, bbuckingham, bkearney, brubisch, cfouant, chrobert, dhawke, jcallaha, jfenal, katello-qa-list, ktordeur, mtenheuv |
| Target Milestone: | Unspecified | Keywords: | Triaged |
| Target Release: | Unused | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2018-02-21 16:54:37 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Bug Depends On: | |||
| Bug Blocks: | 1122832 | ||
Moving 6.2 bugs out to sat-backlog. Created redmine issue http://projects.theforeman.org/issues/18333 from this bug Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/18333 has been resolved. Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/18333 has been resolved. Verified on 6.3 snap 11 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:0336
|
Description of problem: The katello-backup script calls tar to create backups. If tar is failing, i.e. No space left on device or i.e by just killing the tar process, the backup script returns zero. As a consequence, the failure of the backups is not reported, in contrary all is looking fine. A restore attempt will fail. Version-Release number of selected component (if applicable): katello-common-2.2.0.18-1.el7sat.noarch How reproducible: Always Steps to Reproduce: 1./usr/bin/katello-backup /to/small/filesystem 2. tar: Removing leading `/' from member names gzip: stdout: No space left on device Done. Backing up mongo db... tar: Removing leading `/' from member names gzip: stdout: No space left on device Done. [..] **** BACKUP Complete, contents can be found in: /backup **** [root@sat ~]# 3. echo $? Actual results: 0 Expected results: 1 (or anything else non-zero Additional info: The script should look something like: tar --selinux -czf config_files.tar.gz ${CONFIGS[*]} || exit $? to catch the exit code of tar