Bug 1896468
| Summary: | satellite clone fails while disassociate capsules from lifecycle environments | |||
|---|---|---|---|---|
| Product: | Red Hat Satellite | Reporter: | Anand Agrawal <aagrawal> | |
| Component: | Satellite Clone | Assignee: | Anand Agrawal <aagrawal> | |
| Status: | CLOSED ERRATA | QA Contact: | Vladimír Sedmík <vsedmik> | |
| Severity: | medium | Docs Contact: | ||
| Priority: | unspecified | |||
| Version: | 6.8.0 | CC: | ahumbe, pcreech | |
| Target Milestone: | 6.9.0 | Keywords: | PrioBumpGSS, Triaged | |
| Target Release: | Unused | |||
| Hardware: | Unspecified | |||
| OS: | Unspecified | |||
| Whiteboard: | ||||
| Fixed In Version: | satellite-clone-2.0.0 | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | ||
| Clone Of: | ||||
| : | 1933169 (view as bug list) | 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: | ||||
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 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 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 |
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