Bug 2055168

Summary: Enabling repo synced in upstream SAT under non-default org fails
Product: Red Hat Satellite Reporter: Vladimír Sedmík <vsedmik>
Component: Inter Satellite SyncAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED DUPLICATE QA Contact: Radek Mynar <rmynar>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.11.0CC: sajha
Target Milestone: 6.11.0Keywords: Triaged
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: 2022-03-01 17:25:06 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 Vladimír Sedmík 2022-02-16 12:10:09 UTC
Description of problem:
In the downstream SAT, enabling a repository which is synced in the upstream SAT under non-default organization fails.


Version-Release number of selected component (if applicable):
7.0 snap 9


How reproducible:
always


Steps to Reproduce:
1. In upstream SAT, create new organization, upload manifest, enable and sync some repositories (I used rhel-7-server-ansible-2.9-rpms and rhel-7-server-satellite-tools-6.10-rpms).
2. In downstream SAT, create new organization, upload manifest and create SSL CA CC for the upstream SAT.
3. In downstream SAT, go to Manage manifest > CDN Configuration > Upstream Foreman server, fill all fields and click Update:
   URL: <UPSTREAM_SAT_URL>
   Username: admin
   Organization label: OWCA (the org from step 1.)
   LCE label: Library
   CV label: Default_Organization_View
4. Go to Content > Red Hat Repositories and try to enable some repo from step 1.


Actual results:
Error
Upstream organization OWCA does not have a content view with the label


Expected results:
Repository enabled


Additional info:
In the upstream SAT the repository does exist:
# hammer repository-set list --enabled true --organization OWCA
------|------|----------------------------------------------------------------------
ID    | TYPE | NAME                                                                 
------|------|----------------------------------------------------------------------
9318  | yum  | Red Hat Ansible Engine 2.9 RPMs for Red Hat Enterprise Linux 7 Server
12054 | yum  | Red Hat Satellite Tools 6.10 (for RHEL 7 Server) (RPMs)              
------|------|----------------------------------------------------------------------

Comment 2 Samir Jha 2022-03-01 17:25:06 UTC
Hi Vladimír,

Thanks for raising this. We noticed this while investigating another BZ: https://bugzilla.redhat.com/show_bug.cgi?id=2055570 and the root cause for both was discovered and fixed in that. The call you noticed the call to endpoint /katello/api/v2/organizations/3/content_views?name= is incorrect and we have updated that to search for label since that is the user entered value. That should resolve this issue as well. I'm going to mark this duplicate and will link it to other issue so these can be tested together when the fix lands in a snap.

Thanks,
Samir

*** This bug has been marked as a duplicate of bug 2055570 ***