Bug 1901919

Summary: Satellite restore fails with Unrecognised option '--reset'
Product: Red Hat Satellite Reporter: Amit Upadhye <aupadhye>
Component: Satellite MaintainAssignee: Amit Upadhye <aupadhye>
Status: CLOSED ERRATA QA Contact: Jameer Pathan <jpathan>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.9.0CC: apatel, egolov, gtalreja, kgaikwad
Target Milestone: 6.9.0Keywords: Triaged
Target Release: Unused   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: rubygem-foreman_maintain-0.7.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-04-21 14:48:24 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:

Description Amit Upadhye 2020-11-26 12:31:45 UTC
Restore is failing on Foreman 2.2 and 2.3 RC2 with below error,

~~~
[root@puppet ~]# yes | foreman-maintain restore $RESTORE_DIR
Running Restore backup ================================================================================
Check if command is run as root user: [OK]
--------------------------------------------------------------------------------
Validate backup has appropriate files: [OK]
--------------------------------------------------------------------------------
Confirm dropping databases and running restore:

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.
[OK]
--------------------------------------------------------------------------------
Validate hostname is the same as backup: [OK]
--------------------------------------------------------------------------------
Setting file security:
- Restoring SELinux context [OK]
--------------------------------------------------------------------------------
Restore configs from backup:
\ Restoring configs [OK]
--------------------------------------------------------------------------------
Ensure restored MongoDB storage engine matches the current DB: [OK]
--------------------------------------------------------------------------------
Run installer reset:
- Installer reset [FAIL]
Failed executing yes | foreman-installer -v --reset , exit status 1:
ERROR: Unrecognised option '--reset'

See: 'foreman-installer --help'
--------------------------------------------------------------------------------
Scenario [Restore backup] failed.
~~~

Comment 1 Brad Buckingham 2020-11-30 15:08:07 UTC
Moving from POST -> ASSIGNED, since the PR is still open upstream.

Comment 2 Bryan Kearney 2020-12-02 12:01:13 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/31394 has been resolved.

Comment 3 Jameer Pathan 2020-12-15 07:49:37 UTC
Verified

Verified with:
- Satellite 6.9.0 snap 5
- rubygem-foreman_maintain-0.7.0-1.el7sat.noarch

Test steps:
- Perform satellite backup and restore using foreman-maintain.

Observation:
- satellite backup/restore finished successfully.

Comment 6 errata-xmlrpc 2021-04-21 14:48:24 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 (Satellite 6.9 Satellite Maintenance Release), 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-2021:1312