Bug 2213804

Summary: Editing a host results in an error "content_view_id and lifecycle_environment_id must be provided together"
Product: Red Hat Satellite Reporter: Jeremy Lenz <jlenz>
Component: Hosts - ContentAssignee: Jeremy Lenz <jlenz>
Status: CLOSED ERRATA QA Contact: Sam Bible <sbible>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.14.0CC: pcreech, rlavi, sbible
Target Milestone: 6.14.0Keywords: Regression, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: rubygem-katello-4.9.0.1-1,rubygem-katello-4.9.0.1-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-11-08 14:19:36 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:

Description Jeremy Lenz 2023-06-09 12:53:24 UTC
https://community.theforeman.org/t/editing-host-results-in-content-view-id-and-lifecycle-environment-id-must-be-provided-together/33831

If a hostgroup exists which has a CV or LCE assigned, but not both, you are unable to edit hosts assigned to this hostgroup. Attempting to update the host results in an error "content_view_id and lifecycle_environment_id must be provided together"

Comment 1 Jeremy Lenz 2023-06-09 12:53:27 UTC
Created from redmine issue https://projects.theforeman.org/issues/36498

Comment 2 Jeremy Lenz 2023-06-09 12:53:29 UTC
Upstream bug assigned to None

Comment 3 Jeremy Lenz 2023-06-09 12:56:19 UTC
The issue doesn't seem to happen if the host's hostgroup has both CV and LCE assigned, or if the host is not assigned to a hostgroup.

Comment 4 Bryan Kearney 2023-06-09 20:03:34 UTC
Upstream bug assigned to jlenz

Comment 5 Bryan Kearney 2023-06-09 20:03:36 UTC
Upstream bug assigned to jlenz

Comment 8 Brad Buckingham 2023-06-16 17:04:37 UTC
Moving to POST as PR merged upstream.

Comment 11 Sam Bible 2023-07-13 14:07:15 UTC
Tested on: 6.14 - Snap 5

Steps to test:
1. Register a host.
2. Create a Hostgroup, Content View and Lifecycle Environment
3. Edit the Hostgroup by choosing a CV and LCE, and then clicking the x on the LCE box. 
4. Save, and assign the host to this Hostgroup.

Expected Results:
There are no errors, and the Host is successfully assigned to the Hostgroup

Actual Results:
There are no errors, and the Host is successfully assigned to the Hostgroup

Comment 14 errata-xmlrpc 2023-11-08 14:19:36 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.14 security and 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/RHSA-2023:6818