Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1354028 - error when running katello-restore
Summary: error when running katello-restore
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Backup & Restore
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
high vote
Target Milestone: Unspecified
Assignee: Chris Duryee
QA Contact: Roman Plevka
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-07-08 18:24 UTC by Chris Duryee
Modified: 2019-04-01 20:27 UTC (History)
5 users (show)

Fixed In Version: katello-3.0.0-10
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-07-27 11:02:42 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Foreman Issue Tracker 15631 None None None 2016-07-08 18:27:14 UTC

Description Chris Duryee 2016-07-08 18:24:51 UTC
Description of problem:

The following error is encountered when restoring from backup:

"""
/bin/katello-restore:64:in `<main>': undefined local variable or method `pulp_data' for main:Object (NameError)
"""


Version-Release number of selected component (if applicable): snap 19.1, katello-common-3.0.0-9.el7sat.noarch


How reproducible: every time


Steps to Reproduce:
1. create a product, sync a repo, publish a CV
2. katello-backup to /mnt/backup
3. katello-restore

Actual results:

/bin/katello-restore:64:in `<main>': undefined local variable or method `pulp_data' for main:Object (NameError)



Expected results: successful restore

Additional info: this is already fixed in upstream, might just need a CP

Comment 1 RHEL Product and Program Management 2016-07-08 18:36:29 UTC
Quality Engineering Management has reviewed and declined this request.
You may appeal this decision by reopening this request.

Comment 3 Christine Fouant 2016-07-08 18:57:11 UTC
Fixed by https://github.com/Katello/katello-packaging/pull/217

Comment 4 Roman Plevka 2016-07-14 14:42:45 UTC
VERIFIED
on sat6.2 snap20.1

the syntax is correct:

<pre>
     63 if !DIR.nil? && File.directory?(DIR)
>    64   if Dir.entries(DIR).include?('pulp_data.tar')
     65     confirmed ? restore : confirm
</pre>

and the script just works:

<pre>

# katello-restore backup
WARNING: This script will drop and restore your database.
Your existing installation will be replaced with the backup database.
Once this operation is complete there is no going back.
Are you sure(Y/N)? Y
backup
Setting file security
Done.
Resetting Katello
Done.
Stopping Katello services
celery multi v3.1.11 (Cipater)
> Stopping nodes...
	> reserved_resource_worker-1@my-sat6-server.com: QUIT -> 24355
	> reserved_resource_worker-3@my-sat6-server.com: QUIT -> 24397
	> reserved_resource_worker-2@my-sat6-server.com: QUIT -> 24376
	> reserved_resource_worker-5@my-sat6-server.com: QUIT -> 24443
	> reserved_resource_worker-0@my-sat6-server.com: QUIT -> 24338
	> reserved_resource_worker-4@my-sat6-server.com: QUIT -> 24420
	> reserved_resource_worker-6@my-sat6-server.com: QUIT -> 24466
	> reserved_resource_worker-7@my-sat6-server.com: QUIT -> 24489
> Waiting for 8 nodes -> 24355, 24397, 24376, 24443, 24338, 24420, 24466, 24489....................
	> reserved_resource_worker-1@my-sat6-server.com: OK
> Waiting for 7 nodes -> 24397, 24376, 24443, 24338, 24420, 24466, 24489....
	> reserved_resource_worker-3@my-sat6-server.com: OK
> Waiting for 6 nodes -> 24376, 24443, 24338, 24420, 24466, 24489....
	> reserved_resource_worker-2@my-sat6-server.com: OK
> Waiting for 5 nodes -> 24443, 24338, 24420, 24466, 24489....
	> reserved_resource_worker-5@my-sat6-server.com: OK
> Waiting for 4 nodes -> 24338, 24420, 24466, 24489....
	> reserved_resource_worker-0@my-sat6-server.com: OK
> Waiting for 3 nodes -> 24420, 24466, 24489....
	> reserved_resource_worker-4@my-sat6-server.com: OK
> Waiting for 2 nodes -> 24466, 24489....
	> reserved_resource_worker-6@my-sat6-server.com: OK
> Waiting for 1 node -> 24489....
	> reserved_resource_worker-7@my-sat6-server.com: OK

celery multi v3.1.11 (Cipater)
> Stopping nodes...
	> resource_manager@my-sat6-server.com: QUIT -> 24119
> Waiting for 1 node -> 24119.....
	> resource_manager@my-sat6-server.com: OK

Done.
Restoring backend data
Done.
Restarting all Katello processes
celery multi v3.1.11 (Cipater)
> Starting nodes...
	> reserved_resource_worker-0@my-sat6-server.com: OK
	> reserved_resource_worker-1@my-sat6-server.com: OK
	> reserved_resource_worker-2@my-sat6-server.com: OK
	> reserved_resource_worker-3@my-sat6-server.com: OK
	> reserved_resource_worker-4@my-sat6-server.com: OK
	> reserved_resource_worker-5@my-sat6-server.com: OK
	> reserved_resource_worker-6@my-sat6-server.com: OK
	> reserved_resource_worker-7@my-sat6-server.com: OK
celery multi v3.1.11 (Cipater)
> Starting nodes...
	> resource_manager@my-sat6-server.com: OK
[Thu Jul 14 10:40:16 2016] [warn] module passenger_module is already loaded, skipping
Done.

</pre>

Comment 5 Bryan Kearney 2016-07-27 11:02:42 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-2016:1501


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