Bug 2218657

Summary: Should not be able to assign LE on the client profile which is not synced on the capsule server
Product: Red Hat Satellite Reporter: Odilon Sousa <osousa>
Component: Hosts - ContentAssignee: Jeremy Lenz <jlenz>
Status: CLOSED ERRATA QA Contact: Sam Bible <sbible>
Severity: unspecified Docs Contact:
Priority: high    
Version: 6.8.0CC: ahumbe, dsinglet, iballou, jlenz, juwatts, ktordeur, mkalyat, myarboro, osousa, pcreech, rlavi, spusater, vsedmik
Target Milestone: 6.13.3Keywords: PrioBumpGSS, Triaged
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: tfm-rubygem-katello-4.7.0.30-1,tfm-rubygem-katello-4.7.0.31-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1944710 Environment:
Last Closed: 2023-08-03 13:30:19 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Comment 4 Sam Bible 2023-07-21 18:06:23 UTC
Verified in 6.14.0 snap 8

Setup as per comment 0:
1) Satellite with multiple organizations and LCEs and CVs in each organization
2) Capsule with only a subset of LCEs and a host registered through it

Results:
1) On Host details page -> Change content source page (through top right kebab), as well as on
2) On Host details page -> Overview tab -> Content view details card -> Edit content view assignment modal:
   - Message that some LCEs were disabled because they are not associated with the host's content source is displayed
   - Only the LCEs associated with the content source can be selected
   - Only CVs inside the selected LCE can be selected
3) On the 'Create Host' page
   - The 'Lifecycle Environment' dropdown is scoped to the selected organization (contains only the organization's LCEs).
4) Content host page -> bulk action still allows to assign any LCE to the selected host. However, the assignment fails with error. This is fixed by https://bugzilla.redhat.com/show_bug.cgi?id=2215081, but this doesn't appear to be in 6.13.3

Comment 5 Sam Bible 2023-07-25 18:13:00 UTC
This was tested on the wrong version of Satellite. Marking this as ON_QA and retesting.

Comment 7 Sam Bible 2023-07-27 21:02:11 UTC
Verified in 6.13.3 Snap 2

Setup as per comment 0:
1) Satellite with multiple organizations and LCEs and CVs in each organization
2) Capsule with only a subset of LCEs and a host registered through it

Results:
1) On Host details page -> Change content source page (through top right kebab), as well as on
2) On Host details page -> Overview tab -> Content view details card -> Edit content view assignment modal:
   - LCE that aren't part of the organization aren't shown
   - Only CV that are available are shown
3) On the 'Create Host' page
   - The 'Lifecycle Environment' dropdown is scoped to the selected organization (contains only the organization's LCEs).
4) Content host page -> Only LCE that are part of the organization are shown

Comment 8 Sam Bible 2023-07-28 15:10:13 UTC
Adding some additional testing info here, as there was some configuration missed in the initial re-test:

1) When assigning a non-synced LCE through the Change Content Source
    - You see all LCE, but recieve an error when assigning a non-synced one
2) When using the Edit Content View Assignment modal
    - You see all CV, but recieve a blank error box when assigning a CV in an LCE that's not synced
3) When using Content Host Bulk Actions to assign a non-synced LCE:
    - You are able to select a non-synced LCE, but the bulk task will fail.

Comment 17 errata-xmlrpc 2023-08-03 13:30:19 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 (Important: Satellite 6.13.3 Async Security 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/RHSA-2023:4466