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.
Bug 1544396 - k-backup fails when passed a relative path for the destination
Summary: k-backup fails when passed a relative path for the destination
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Backup & Restore
Version: 6.2.13
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: Unspecified
Assignee: Evgeni Golov
QA Contact: jcallaha
URL:
Whiteboard:
Depends On:
Blocks: 1544401 1557333
TreeView+ depends on / blocked
 
Reported: 2018-02-12 11:24 UTC by Evgeni Golov
Modified: 2021-06-10 14:34 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1544401 1553882 1553883 (view as bug list)
Environment:
Last Closed: 2018-05-21 20:16:43 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 22548 0 High Closed k-backup fails when passed a relative path for the destination 2020-12-08 11:14:18 UTC
Red Hat Product Errata RHBA-2018:1672 0 None None None 2018-05-21 20:17:45 UTC

Description Evgeni Golov 2018-02-12 11:24:27 UTC
<pre>
# katello-backup .
Starting backup: 2018-02-12 11:11:37 +0000
Creating backup folder ./katello-backup-20180212111138
Generating metadata ... 
/usr/share/foreman/lib/foreman.rb:8: warning: already initialized constant Foreman::UUID_REGEXP
/usr/share/foreman/lib/foreman.rb:8: warning: previous definition of UUID_REGEXP was here
Done.
Backing up config files... 

Failed 'tar --selinux --create --gzip --file=./katello-backup-20180212111138/config_files.tar.gz --listed-incremental=./katello-backup-20180212111138/.config.snar /etc/foreman-proxy /etc/httpd /etc/foreman-installer /etc/pki/katello /etc/pki/katello-certs-tools /etc/pki/pulp /etc/pulp /etc/puppet /etc/qpid /etc/qpid-dispatch /root/ssl-build /var/www/html/pub /etc/squid /etc/puppetlabs /opt/puppetlabs/puppet/cache/foreman_cache_data /opt/puppetlabs/puppet/ssl/ /var/lib/puppet/foreman_cache_data /var/lib/puppet/ssl /etc/candlepin /etc/foreman /etc/hammer /etc/sysconfig/tomcat* /etc/tomcat* /var/lib/candlepin     2>/dev/null' with exit code 141
Cleaning up backup folder and starting any stopped services... 
/usr/share/ruby/fileutils.rb:125: warning: conflicting chdir during another chdir block
Done.
</pre>

Calling <code>katello-backup $(pwd)</code> works as expected.

Comment 1 Evgeni Golov 2018-02-12 11:24:30 UTC
Created from redmine issue http://projects.theforeman.org/issues/22548

Comment 2 Evgeni Golov 2018-02-12 11:24:34 UTC
Upstream bug assigned to egolov

Comment 6 jcallaha 2018-04-23 18:32:09 UTC
Failed QA in Satellite 6.2.15.

The code fix is not present in the currently packaged version of katello-backup and the error is still present.

-bash-4.2# sed -n 70p /usr/bin/katello-backup
  @dir = ARGV[0].dup

Comment 8 jcallaha 2018-04-27 19:13:10 UTC
Verified in Satellite 6.2.15 Snap 2.

-bash-4.2# mcd /tmp/backup

-bash-4.2# pwd
/tmp/backup

-bash-4.2# katello-backup .
Starting backup: 2018-04-27 15:05:41 -0400
Creating backup folder /tmp/backup/katello-backup-20180427150541
Generating metadata ... 
Done.
Backing up config files... 
Done.
WARNING: This script will stop your services. Do you want to proceed(y/n)? y
Redirecting to /bin/systemctl stop foreman-tasks.service
Redirecting to /bin/systemctl stop httpd.service
Redirecting to /bin/systemctl stop pulp_workers.service
Redirecting to /bin/systemctl stop pulp_streamer.service
Redirecting to /bin/systemctl stop pulp_resource_manager.service
Redirecting to /bin/systemctl stop pulp_celerybeat.service
Redirecting to /bin/systemctl stop tomcat.service
Redirecting to /bin/systemctl stop postgresql.service
Redirecting to /bin/systemctl stop mongod.service
Backing up Pulp data... 
Done.
Backing up postgres db...
Done.
Backing up mongo db... 
Done.
Redirecting to /bin/systemctl start mongod.service
Redirecting to /bin/systemctl start postgresql.service
Redirecting to /bin/systemctl start tomcat.service
Redirecting to /bin/systemctl start pulp_celerybeat.service
Redirecting to /bin/systemctl start pulp_resource_manager.service
Redirecting to /bin/systemctl start pulp_streamer.service
Redirecting to /bin/systemctl start pulp_workers.service
Redirecting to /bin/systemctl start httpd.service
Redirecting to /bin/systemctl start foreman-tasks.service
Done with backup: 2018-04-27 15:10:38 -0400
**** BACKUP Complete, contents can be found in: /tmp/backup/katello-backup-20180427150541 ****

-bash-4.2# catline 70 /usr/bin/katello-backup
  @dir = File.expand_path(ARGV[0].dup)

Comment 11 errata-xmlrpc 2018-05-21 20:16:43 UTC
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/RHBA-2018:1672


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