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.
+++ This bug was initially created as a clone of Bug #1896468 +++
Description of problem:
Following errors occurs while running satellite clone
~~
2020-11-10 11:02:49,593 p=48208 u=root | fatal: [localhost]: FAILED! => {"changed": true, "cmd": ["psql", "foreman", "-c", "delete from katello_capsule_lifecycle_environments where capsule_id in (select smart_proxy_id from features_smart_proxies where feature_id = (select id from features where features.name = 'Pulp Node'));"], "delta": "0:00:00.012455", "end": "2020-11-10 11:02:49.575174", "msg": "non-zero return code", "rc": 1, "start": "2020-11-10 11:02:49.562719", "stderr": "ERROR: relation \"features_smart_proxies\" does not exist\nLINE 1: ...s where capsule_id in (select smart_proxy_id from features_s...\n ^", "stderr_lines": ["ERROR: relation \"features_smart_proxies\" does not exist", "LINE 1: ...s where capsule_id in (select smart_proxy_id from features_s...", " ^"], "stdout": "", "stdout_lines": []}
~~~
Version-Release number of selected component (if applicable):
6.8
How reproducible:
Steps to Reproduce:
1. run satellite-clone
2.
3.
Actual results:
Fails with above error
Expected results:
It should succeed
Additional info:
Table name in the source code refrers as features_smart_proxies. I think it should be smart_proxy_features
--- Additional comment from on 2020-11-16T16:07:07Z
Upstream PR: https://github.com/RedHatSatellite/satellite-clone/pull/377
--- Additional comment from on 2021-01-13T13:58:36Z
Fixed in https://github.com/RedHatSatellite/satellite-clone/pull/379 and released upstream in https://github.com/RedHatSatellite/satellite-clone/archive/2.0.0.tar.gz
--- Additional comment from on 2021-01-21T12:25:32Z
Verified with satellite-clone-2.0.1-1.el7sat.noarch from snap 9, having source 6.8 Sat + Capsule with assigned LCE
# satellite-clone -y
...
TASK [satellite-clone : Disassociate capsules with lifecycle environments (to avoid the cloned Satellite server talking with live capsules)] *************************************************************************************************
Thursday 21 January 2021 05:17:27 -0500 (0:00:00.026) 0:50:06.511 ******
changed: [localhost]
stdout: All Capsules are unassociated with any lifecycle environments. This is to avoid any syncing errors with your original Satellite and any interference with existing infrastructure. To reverse these changes, run the following commands, making sure to replace the credentials with your own.
hammer -u admin -p changeme --csv capsule content add-lifecycle-environment --id 2 --lifecycle-environment-id 3
...
PLAY RECAP **************************************************************************************
localhost : ok=71 changed=27 unreachable=0 failed=0
Also tried the fallback command manually and it seems to work properly (no errors):
[root@target ~]# su - postgres
-bash-4.2$ psql foreman -c "delete from katello_capsule_lifecycle_environments where capsule_id in (select smart_proxy_id from smart_proxy_features where feature_id = (select id from features where features.name = 'Pulp Node'));"
DELETE 0
-bash-4.2$ echo $?
0
Verified with satellite-clone-2.0.1-1.el7sat.noarch from snap 1 of 6.8.5, having source 6.8 Sat + Capsule with assigned LCE
# satellite-clone -y
...
TASK [satellite-clone : Disassociate capsules with lifecycle environments (to avoid the cloned Satellite server talking with live capsules)] *************************************
Monday 15 March 2021 05:52:03 -0400 (0:00:00.023) 0:46:36.684 **********
changed: [localhost]
stdout: All Capsules are unassociated with any lifecycle environments. This is to avoid any syncing errors with your original Satellite and any interference with existing infrastructure. To reverse these changes, run the following commands, making sure to replace the credentials with your own.
hammer -u admin -p changeme --csv capsule content add-lifecycle-environment --id 2 --lifecycle-environment-id 1
...
PLAY RECAP ***********************************************************************************************************************************************************************
localhost : ok=71 changed=27 unreachable=0 failed=0
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 Maintenance 6.8.5 Async Bug Fix Update), 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:1056