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.

Bug 1497957

Summary: katello-backup fails with /usr/share/ruby/fileutils.rb:125: warning: conflicting chdir during another chdir block
Product: Red Hat Satellite Reporter: Peter Ondrejka <pondrejk>
Component: Backup & RestoreAssignee: Christine Fouant <cfouant>
Status: CLOSED ERRATA QA Contact: Peter Ondrejka <pondrejk>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.3.0CC: andrew.schofield, bbuckingham, cfouant, jomitsch
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-02-21 16:44:54 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:
Embargoed:
Bug Depends On:    
Bug Blocks: 1456379    

Description Peter Ondrejka 2017-10-03 08:39:05 UTC
Description of problem:

Running katello-backup on Satellite server:

~]# katello-backup -y /var/tmp/ --online-backup
Starting backup: 2017-10-03 04:25:40 -0400
Creating backup folder /var/tmp/katello-backup-20171003042541
Generating metadata ... 
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100    94  100    94    0     0    479      0 --:--:-- --:--:-- --:--:--   482
Done.
Backing up config files... 
foreman proxy certs tar file is not present on the system in path  please move the file back to that location or generate a new one on the main server.
Cleaning up backup folder and starting any stopped services... 
/usr/share/ruby/fileutils.rb:125: warning: conflicting chdir during another chdir block
Done.

Also note the message about the proxy certs, the script incorrectly determines if it is running on capsule or not.

Version-Release number of selected component (if applicable):
satellite-6.3.0-19.0.beta.el7sat.noarch

How reproducible:
always

Expected results:
Backup is successful, script correctly determines if running on proxy.

Comment 2 John Mitsch 2017-10-03 13:02:44 UTC
Hey Peter,

We were relying on the presence of the foreman-proxy-content rpm to determine if a Satellite is a foreman-proxy or a Satellite, but there was a recent change and the fpc package is installed on a Satellite. Talking with Eric, he said he is going to try to remove the package from the Satellite, and if this isn't possible we will figure out a different check.

For now, you can manually set that check to false in any scripts to do testing.

-John

Comment 3 Christine Fouant 2017-10-03 17:10:14 UTC
Created redmine issue http://projects.theforeman.org/issues/21183 from this bug

Comment 4 Satellite Program 2017-10-03 20:41:08 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/21183 has been resolved.

Comment 5 Peter Ondrejka 2017-10-16 09:26:37 UTC
Seems like the actual backup script didn't arrive:

~]# katello-backup /var/tmp/backup

DEPRECATION WARNING: katello-backup is deprecated and will
be removed in the next Satellite release. It is being replaced by
satellite-backup. Redirecting to satellite-backup now.

/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- /usr/sbin/backup.rb (LoadError)
	from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require'
	from /usr/sbin/satellite-backup:10:in `<main>'

~]# satellite-backup -h
/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- /usr/sbin/backup.rb (LoadError)
	from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require'
	from /usr/sbin/satellite-backup:10:in `<main>'

Also, about the DEPRECATION WARNING, are we really going to remove the thing in next release, why? Redirect is in place, I don't see any risk in keeping the legacy option functional. Also, is there a documentation bug about this change?

Comment 8 Peter Ondrejka 2017-10-23 12:24:56 UTC
Verified on satellite-6.3.0-21.0.beta.el7sat.noarch and satellite-capsule-6.3.0-21.0.beta.el7sat.noarch

Comment 9 Bryan Kearney 2018-02-21 16:41:32 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/RHSA-2018:0336

Comment 10 Bryan Kearney 2018-02-21 16:44:54 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/RHSA-2018:0336