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 1889927 - [RFE] Support cloning a Satellite with external/remote databases
Summary: [RFE] Support cloning a Satellite with external/remote databases
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Satellite Clone
Version: 6.7.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: 6.9.0
Assignee: satellite6-bugs
QA Contact: Vladimír Sedmík
URL:
Whiteboard:
Depends On: 1921295
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-10-21 00:07 UTC by John Mitsch
Modified: 2023-01-20 16:56 UTC (History)
4 users (show)

Fixed In Version: satellite-clone-2.0.2
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-04-21 14:48:24 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2021:1312 0 None None None 2021-04-21 14:48:34 UTC

Description John Mitsch 2020-10-21 00:07:14 UTC
Description of problem:
Satellite clone doesn't support cloning a Satellite with remote databases

Version-Release number of selected component (if applicable):
Satellite 6.7.0
satellite-clone 1.6.1


How reproducible: Always


Steps to Reproduce:
1. Try to clone a Satellite with remote databases
2.
3.

Actual results:
Clone fails


Expected results:
Clone succeed when using a backup from a Satellite with remote databases

Additional info:

Comment 2 John Mitsch 2020-10-21 00:11:24 UTC
Tagged upstream in https://github.com/RedHatSatellite/satellite-clone/archive/1.6.2.tar.gz

Comment 3 Vladimír Sedmík 2021-01-27 21:07:29 UTC
The clone failed due to missing packages on the target server (see https://bugzilla.redhat.com/show_bug.cgi?id=1921295)

Comment 6 Mike McCune 2021-03-10 17:05:33 UTC
Vladimír, the changes in  BZ#1889927 will only show the error that the tooling is not installed:

'The psql command not found. Make sure system has psql utility installed'

We will not be automatically installing these packages currently.

You need to manually install the following:

 #  yum -y install rh-mongodb34-syspaths rh-postgresql12-syspaths rh-postgresql12-postgresql-evr

to complete the pre-installation.

I filed a docs bug to add this to the instructions:

https://bugzilla.redhat.com/show_bug.cgi?id=1937457

Can we re-test this by applying the step that will be added to the documentation?

Comment 7 Jonathon Turel 2021-03-10 21:55:35 UTC
Hey Vladimír,

I've got an upstream PR open to address the issue you found: https://github.com/RedHatSatellite/satellite-clone/pull/385

Can you apply the changes to the satellite-clone you have installed (only the changes in roles/satellite-clone/tasks/main.yml and roles/satellite-clone/vars/satellite_6.8.yml are relevant in your case) and see if the clone completes successfully? That way I can include any additional fixes necessary on the open PR.

Comment 8 Jonathon Turel 2021-03-10 21:56:49 UTC
If you experience any more issues please include log snippets, ansible output, etc. so we can pinpoint the cause more easily

Comment 9 Mike McCune 2021-03-10 22:04:24 UTC
ignore my comment about the docs bug, gonna include this in satellite-clone as Jonathon says :)

Comment 10 Vladimír Sedmík 2021-03-11 11:48:44 UTC
Hey Jonathon,

the 385.patch (applied to satellite-clone-2.0.1-1.el7sat.noarch) fixed the issue:

[root@target ~]# satellite-clone -y
ansible-playbook -i /usr/share/satellite-clone/inventory /usr/share/satellite-clone/satellite-clone-playbook.yml
...
TASK [satellite-clone : Install packages necessary to check DB status] ***********************************************************************************************************************************************************************
Thursday 11 March 2021  05:39:44 -0500 (0:08:24.192)       0:09:12.290 ******** 
changed: [localhost]
...
Installed:
  rh-mongodb34-syspaths.x86_64 0:3.0-14.el7                                     
  rh-postgresql12-postgresql-evr.x86_64 0:0.0.2-1.el7sat                        
  rh-postgresql12-syspaths.x86_64 0:3.4-1.el7 
...
PLAY RECAP ***********************************************************************************************************************************************************************************************************************************
localhost                  : ok=73   changed=29   unreachable=0    failed=0   

Thursday 11 March 2021  06:18:58 -0500 (0:00:00.026)       0:48:25.690 ******** 
=============================================================================== 
satellite-clone : restore using foreman-maintain ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 793.91s
satellite-clone : Run Satellite installer ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 681.93s
satellite-clone : Install Satellite packages ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 504.19s
satellite-clone : Wait for foreman-tasks service to start --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 300.33s
satellite-clone : Run installer upgrade to match latest z-version ------------------------------------------------------------------------------------------------------------------------------------------------------------------- 233.75s
satellite-clone : Install Satellite SELinux packages for 6.8 and above --------------------------------------------------------------------------------------------------------------------------------------------------------------- 87.71s
satellite-clone : Run katello reimport for Satellite - Note that this might take hours ----------------------------------------------------------------------------------------------------------------------------------------------- 65.92s
satellite-clone : Wait 60 seconds for services to be fully up ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 60.46s
satellite-clone : Install packages necessary to check DB status ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- 49.68s
satellite-clone : Reset admin password ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 31.10s
satellite-clone : Cleanup paused tasks ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 29.87s
satellite-clone : Enable required repos for Satellite installation ------------------------------------------------------------------------------------------------------------------------------------------------------------------- 16.57s
satellite-clone : Disable all repos -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 15.95s
satellite-clone : Restart services ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 8.64s
satellite-clone : Test Satellite ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 2.71s
satellite-clone : Clean yum info ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 2.46s
satellite-clone : Disassociate capsules with lifecycle environments (to avoid the cloned Satellite server talking with live capsules) ------------------------------------------------------------------------------------------------- 2.14s
satellite-clone : Check if DNS is enabled --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 2.08s
satellite-clone : Check if DHCP is enabled -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 1.96s
satellite-clone : Identify the hostname from the backup config tar file --------------------------------------------------------------------------------------------------------------------------------------------------------------- 1.75s

Thank you!

Comment 11 John Mitsch 2021-03-11 18:40:34 UTC
Fixed in https://github.com/RedHatSatellite/satellite-clone/pull/385 and released upstream in satellite-clone-2.0.2 https://github.com/RedHatSatellite/satellite-clone/archive/2.0.2.tar.gz

Comment 12 Vladimír Sedmík 2021-03-23 17:20:21 UTC
Verified on Sat 6.9.0 snap 18 with satellite-clone-2.0.2-1.el7sat.noarch

I think we need to cover the workflow in Docs, here it is described in upstream: https://github.com/RedHatSatellite/satellite-clone/blob/master/docs/satellite-clone.md#cloning-a-satellite-with-remote-databases

Comment 16 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


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