Bug 1354028 - error when running katello-restore
Summary: error when running katello-restore
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Backup & Restore
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
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-09-26 16:19 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:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 15631 0 'Normal' 'Closed' 'katello-restore broken due to misquoted string' 2019-11-27 16:49:36 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 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: QUIT -> 24355
	> reserved_resource_worker-3: QUIT -> 24397
	> reserved_resource_worker-2: QUIT -> 24376
	> reserved_resource_worker-5: QUIT -> 24443
	> reserved_resource_worker-0: QUIT -> 24338
	> reserved_resource_worker-4: QUIT -> 24420
	> reserved_resource_worker-6: QUIT -> 24466
	> reserved_resource_worker-7: QUIT -> 24489
> Waiting for 8 nodes -> 24355, 24397, 24376, 24443, 24338, 24420, 24466, 24489....................
	> reserved_resource_worker-1: OK
> Waiting for 7 nodes -> 24397, 24376, 24443, 24338, 24420, 24466, 24489....
	> reserved_resource_worker-3: OK
> Waiting for 6 nodes -> 24376, 24443, 24338, 24420, 24466, 24489....
	> reserved_resource_worker-2: OK
> Waiting for 5 nodes -> 24443, 24338, 24420, 24466, 24489....
	> reserved_resource_worker-5: OK
> Waiting for 4 nodes -> 24338, 24420, 24466, 24489....
	> reserved_resource_worker-0: OK
> Waiting for 3 nodes -> 24420, 24466, 24489....
	> reserved_resource_worker-4: OK
> Waiting for 2 nodes -> 24466, 24489....
	> reserved_resource_worker-6: OK
> Waiting for 1 node -> 24489....
	> reserved_resource_worker-7: OK

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

Done.
Restoring backend data
Done.
Restarting all Katello processes
celery multi v3.1.11 (Cipater)
> Starting nodes...
	> reserved_resource_worker-0: OK
	> reserved_resource_worker-1: OK
	> reserved_resource_worker-2: OK
	> reserved_resource_worker-3: OK
	> reserved_resource_worker-4: OK
	> reserved_resource_worker-5: OK
	> reserved_resource_worker-6: OK
	> reserved_resource_worker-7: OK
celery multi v3.1.11 (Cipater)
> Starting nodes...
	> resource_manager: 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.