-
Bug
-
Resolution: Done
-
Critical
-
6.16.0, 6.16.0.1
-
1
-
False
-
Important
-
Sprint 147, Phoenix Sprint 148, Phoenix Sprint 149, Phoenix Sprint 150, Phoenix Sprint 151, Proton Sprint 2, Proton Sprint 3, Proton Sprint 4, Proton Sprint 5, Proton Sprint 6
-
sat-proton
-
None
-
None
-
None
-
To Do
-
Yes
Description of problem:
This is a regression from https://issues.redhat.com/browse/SAT-24787 where it was requested to nullify the kickstart_repo association with the host when it is being unregistered.
https://projects.theforeman.org/issues/37518 implemented that but in the next month, https://projects.theforeman.org/issues/37599 was implemented which perhaps changed the behavior a bit.
Currently on Satellite 6.16, After unregistering a host, The host profile is missing important information due to which we cannot use to to successfully rebuild the actual system.
How reproducible:
100%
Is this issue a regression from an earlier version:
Yes ( Regression from 6.16 itself as well as the prior versions )
Steps to Reproduce:
1. Ensure that satellite is setup for PXE based deployments of a VM. Configure the DNS\DHCP accordingly and create subnet, domain etc objects in webui as well.
2. Enable and sync the following repos in satellite
Red Hat Satellite Client 6 for RHEL 8 x86_64 RPMs Red Hat Enterprise Linux 8 for x86_64 - BaseOS RPMs 8 Red Hat Enterprise Linux 8 for x86_64 - AppStream RPMs 8 Red Hat Enterprise Linux 8 for x86_64 - BaseOS Kickstart 8.10 Red Hat Enterprise Linux 8 for x86_64 - AppStream Kickstart 8.10
3. Add them in a CV called RH8 and publish the CV.
4. Create a activation key called RHEL8 where CV = RH8 and Lifecycle = Library and Satellite-Client-6 repo is override enabled.
5. Create a hostgroup called DHCP-RHEL8-BM with the objects mentioned above so that it can deploy a RHEL 8.10 system.
CV: RH8
LCE: Lifecycle Content Source: Satellite itself OS: RHEL 8.10 Synced Media selected Kickstart Default part table root password: password@123 Activation key: RHEL8 and required subnet and domains
6. Use the hostgroup to deploy a system called test-sayan and let the build complete. Meanwhile render\preview the kickstart default template for host and make sure that both appstream and baseos kickstart repos are used in the kickstart
7. Once the build is completed and the system is properly registered, Investigate the system details and the content_facet details associated with it via rake console as well as from WebUI.
8. Execute "subscription-manager unregister" on the test-sayan system
9. Repeat step 7 on satellite.
10. Access the host from Satellite WebUI --> Edit it and try to submit
11. Access the host from Satellite WebUI --> Put the host in Build mode --> From Details tab of the host, Check the Kickstart Default template
12. Try to reboot the main system and see if it builds successfully or not.
Actual behavior:
Please see the attached file and screenshots for more details. But to summarize:
On Step 7 everything is properly associated with the host. We can see hostgroup, LCE, CV, Kickstart repo, Variant Repos ( additional_media ) properly visble for the host.
On Step 9 only hostgroup and kickstart_repository is associated with the host or rather kickstart_repository_id is inherited by the host from HG. No content_view_environments present i.e. no CV or LCE is associated. When checking from WebUI, It will show that LCE and CV are inherited from HG .
On Step 10 It errors out saying
Backtrace for 'Validation failed: Content view can't be blank, Content view environments must have both a content view and an environment, could not be promoted to Library because the content view and the environment are not in the same organization!'
On Step 11 The host is successfully put into build mode but it only uses the baseos kickstart. It's missing the appstream repo.
On Step 12 The system reboots but fails to install some packages during the build due to missing appstream repo.
Expected behavior:
- Either we should get rid of any info that may allow the system to be put into build mode.
- Or, even after the unregistration, The host profile should be able to use the inherited values from hostgroup to retain CV\LCE\AK\content_source\Kickstart\Additional media etc all information which can be out into build mode and the system itself can be successfully rebuilt afterward.
Business Impact / Additional info:
These behavioral changes since satellite 6.14, have impacted customers several years old solid CICD automation code and hampered the build and rebuild processes.
On 6.14, the first step of multi-CV association was done i.e. we introduced CV and LCE as a part of content_view_environment object and since then the issue started i believe.