Project

General

Profile

Actions

Bug #18333

closed

katello-backup returns with wrong exit code when failing

Added by Christine Fouant almost 8 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1323607

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

Actions #1

Updated by Christine Fouant almost 8 years ago

  • Project changed from Katello to Packaging
  • Category deleted (Backup & Restore)
Actions #2

Updated by The Foreman Bot almost 8 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello-packaging/pull/379 added
Actions #3

Updated by Eric Helms over 7 years ago

  • Project changed from Packaging to Katello
  • Pull request deleted (https://github.com/Katello/katello-packaging/pull/379)
Actions #4

Updated by Eric Helms over 7 years ago

  • Translation missing: en.field_release set to 211
  • Pull request https://github.com/Katello/katello-packaging/pull/379 added
Actions #5

Updated by Christine Fouant over 7 years ago

  • Project changed from Katello to Packaging
Actions #6

Updated by Pat Riehecky over 7 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions #7

Updated by The Foreman Bot over 7 years ago

  • Pull request https://github.com/Katello/katello-packaging/pull/405 added
Actions #8

Updated by Christine Fouant over 7 years ago

  • Status changed from Closed to Ready For Testing
Actions #9

Updated by Pat Riehecky over 7 years ago

  • Status changed from Ready For Testing to Closed
Actions #10

Updated by Eric Helms over 7 years ago

  • Project changed from Packaging to Katello
  • Pull request deleted (https://github.com/Katello/katello-packaging/pull/405, https://github.com/Katello/katello-packaging/pull/379)
Actions

Also available in: Atom PDF