Bug 2173535

Summary: External capsule is auto-synced on CV promotion regardless foreman_proxy_content_auto_sync settings
Product: Red Hat Satellite Reporter: Vladimír Sedmík <vsedmik>
Component: Capsule - ContentAssignee: Samir Jha <sajha>
Status: VERIFIED --- QA Contact: Vladimír Sedmík <vsedmik>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.13.0CC: ahumbe, iballou, jbhatia, paji, pcreech, sajha, saydas, vcojot
Target Milestone: 6.14.0Keywords: Triaged, UserExperience
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 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 Vladimír Sedmík 2023-02-27 08:46:25 UTC
Description of problem:
An external capsule gets automatically synced on CV promotion regardless foreman_proxy_content_auto_sync settings when this is set to false.


Version-Release number of selected component (if applicable):
6.13.0 snap 11


How reproducible:
always


Steps to Reproduce:
1. Have a Satellite with an external Capsule registered.
2. In Satellite settings, set foreman_proxy_content_auto_sync to false.
3. Create some new LCE above Library and assign it to the Capsule.
4. Sync some content to the Satellite.
5. Create a CV, add the synced content and publish it to Library.
6. Promote the CV to the second LCE.


Actual results:
The external capsule gets automatically synchronized after promotion.


Expected results:
It shouldn't be automatically synced when foreman_proxy_content_auto_sync is set to false.


Additional info:
[root@sat ~]# hammer settings show --name foreman_proxy_content_auto_sync
Id:            foreman_proxy_content_auto_sync
Name:          foreman_proxy_content_auto_sync
Description:   Whether or not to auto sync the Smart Proxies after a content view promotion.
Category:      Content
Settings type: boolean
Value:         false

[root@sat ~]# hammer task list
5885f8a2-97d5-4ddb-884c-8bf355e478b8 | Synchronize capsule 'capsule.redhat.com'                         | stopped   | success | 2023/02/27 08:17:12 | 2023/02/27 08:17:40 | 28.583772   | admin             |            
92622e93-00a8-4f38-94e5-edac79282618 | Sync Content View on Capsule(s)                                                  | stopped   | success | 2023/02/27 08:17:12 | 2023/02/27 08:17:40 | 28.942085   | admin             |            
5b4a9205-77f8-4126-a839-da7612864e77 | Promote content_view {"text"=>"content view 'CV-1'", "link"=>"/content_views/... | stopped   | success | 2023/02/27 08:17:07 | 2023/02/27 08:17:11 | 4.097142    | admin             |            
16eb1cfe-7f3a-4500-b6d7-09d3ce3cb6ab | Publish content_view {"text"=>"content view 'CV-1'", "link"=>"/content_views/... | stopped   | success | 2023/02/27 08:14:23 | 2023/02/27 08:14:30 | 7.417899    | admin             |            
4699eb5f-fcc1-4ca9-b891-1ca93617f9fc | Update content_view {"text"=>"content view 'CV-1'", "link"=>"/content_views/2... | stopped   | success | 2023/02/27 08:14:17 | 2023/02/27 08:14:18 | 0.196024    | admin             |            
ea5d87ea-7704-4299-bd9c-bf336ade425a | Sync Repository on Capsule(s)                                                    | stopped   | success | 2023/02/27 08:11:11 | 2023/02/27 08:11:11 | 0.092794    | admin             |            
27e0a554-fef0-4ec7-a93d-bfdd901b9a9e | Synchronize repository {"text"=>"repository 'Red Hat Ansible Engine 2 for RHE... | stopped   | success | 2023/02/27 08:10:54 | 2023/02/27 08:11:11 | 17.061929   | admin             |            
070e384c-353c-4890-b566-87170f698960 | Metadata generate                                                                | stopped   | success | 2023/02/27 08:10:35 | 2023/02/27 08:10:39 | 3.672246    | foreman_api_admin |            
51e92f78-429d-434d-b7ca-0889ac7b8f78 | Enable repository {"text"=>"repository 'Red Hat Ansible Engine 2 for RHEL 8 x... | stopped   | success | 2023/02/27 08:10:33 | 2023/02/27 08:10:35 | 2.649019    | admin             |

Comment 1 Brad Buckingham 2023-02-27 14:03:11 UTC
Is this a regression from Satellite 6.12?

Comment 2 Vladimír Sedmík 2023-02-27 18:22:54 UTC
No, I was able to reproduce in 6.12.2 snap 1 too:

d0993d56-2a98-4e43-bfb0-bf3cb9a540cf | Synchronize capsule 'capsule.redhat.com'                                         | stopped   | success | 2023/02/27 18:17:09 | 2023/02/27 18:17:21 | 00:00:11.477323
dbc5a022-449f-4238-9c7a-9abdc5e44aa1 | Sync Content View on Capsule(s)                                                  | stopped   | success | 2023/02/27 18:17:09 | 2023/02/27 18:17:21 | 00:00:11.765643
b9a1850c-b1d5-4010-85fb-dcadde363d66 | Promote content_view {"text"=>"content view 'CV-1'", "link"=>"/content_views/... | stopped   | success | 2023/02/27 18:17:05 | 2023/02/27 18:17:09 | 00:00:04.038762
14c947b8-4c3a-4da3-b687-b34a224857c5 | Publish content_view {"text"=>"content view 'CV-1'", "link"=>"/content_views/... | stopped   | success | 2023/02/27 18:15:57 | 2023/02/27 18:16:02 | 00:00:05.110166
b88b2ffd-42ab-4c27-b6d7-24606df0a478 | Update content_view {"text"=>"content view 'CV-1'", "link"=>"/content_views/2... | stopped   | success | 2023/02/27 18:15:51 | 2023/02/27 18:15:51 | 00:00:00.161613
856623dd-2458-4335-988f-1e4127f68483 | Synchronize repository {"text"=>"repository 'Red Hat Ansible Engine 2 for RHE... | stopped   | success | 2023/02/27 18:15:07 | 2023/02/27 18:15:27 | 00:00:19.119743
1ebabd89-93f3-4fab-a79c-32ba515fb7d9 | Metadata generate                                                                | stopped   | success | 2023/02/27 18:14:38 | 2023/02/27 18:14:42 | 00:00:03.505979
cb1be03c-7e5d-4516-a51d-e101a0900cce | Enable repository {"text"=>"repository 'Red Hat Ansible Engine 2 for RHEL 8 x... | stopped   | success | 2023/02/27 18:14:36 | 2023/02/27 18:14:39 | 00:00:02.800958

Comment 5 Samir Jha 2023-05-25 17:12:21 UTC
Created redmine issue https://projects.theforeman.org/issues/36442 from this bug

Comment 8 Bryan Kearney 2023-06-08 16:03:35 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/36442 has been resolved.

Comment 9 Brad Buckingham 2023-06-27 16:06:57 UTC
*** Bug 2202990 has been marked as a duplicate of this bug. ***

Comment 10 Vladimír Sedmík 2023-07-25 13:54:34 UTC
Verified in 6.14.0 snap 8

After use of fix for an underlying issue (BZ#2225409) the Capsule was synced correctly in regard of autosync settings.