Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1544396 - k-backup fails when passed a relative path for the destination
k-backup fails when passed a relative path for the destination
Status: CLOSED ERRATA
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Backup & Restore (Show other bugs)
6.2.13
Unspecified Unspecified
unspecified Severity high (vote)
: 6.2.15
: Unused
Assigned To: Evgeni Golov
jcallaha
: Regression, Triaged
Depends On:
Blocks: 1544401 1557333
  Show dependency treegraph
 
Reported: 2018-02-12 06:24 EST by Evgeni Golov
Modified: 2018-05-21 16:17 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1544401 1553882 1553883 (view as bug list)
Environment:
Last Closed: 2018-05-21 16:16:43 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Foreman Issue Tracker 22548 None None None 2018-02-12 06:24 EST
Red Hat Product Errata RHBA-2018:1672 None None None 2018-05-21 16:17 EDT

  None (edit)
Description Evgeni Golov 2018-02-12 06:24:27 EST
<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 06:24:30 EST
Created from redmine issue http://projects.theforeman.org/issues/22548
Comment 2 Evgeni Golov 2018-02-12 06:24:34 EST
Upstream bug assigned to egolov@redhat.com
Comment 6 jcallaha 2018-04-23 14:32:09 EDT
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 15:13:10 EDT
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 16:16:43 EDT
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.