Description of problem: When creating a Host or Hostgroup, Even if I select the right Content Source\CV\LCE in the first page of the Form and then select the expected Arch and OS in the Operating System page , The media option remains grayed out. This is happening when my LCE+CV combination has the kickstart repos included as expected. This is a regression behavior from 6.13\6.12. Version-Release number of selected component (if applicable): satellite-6.14.0-3.el8sat.noarch foreman-3.7.0.2-1.el8sat.noarch katello-4.9.0-1.el8sat.noarch How reproducible: 100% Steps to Reproduce: 1. Create a Satellite 6.14 2. Sync RHEL 8.8 BaseOS and Kickstart repos as well as RPMs repos and Create+Publish a CV called "RHEL8" with them. 3. Sync RHEL 9.2 BaseOS and kickstart repos as well as RPMs repos and Create+Publish a CV called "RHEL9" with them. 4. Try creating a Hostgroup and as a part of that, Select Content Source, Lifecycle, CV, then switch to Operating Systems tab and then select Architecture and the OS name ( according to the CV selected ). 5. Try creating a Host and as a part of that, Select Content Source, Lifecycle, CV, then switch to Operating Systems tab and then select Architecture and the OS name ( according to the CV selected ). Actual results: For both Step 4 and 5, In the Operating Systems tab, The Synced Media or All Media options are grayed out. Expected results: It should automatically show the right Synced Media. Additional info: NOTE: * The issue is not related to CV but for Default Org View as well. * Assume, We selected The following at first i.e. CV = RHEL8 LCE=Library Content Source=satellite614.lab.example.com Arch=x86_64 OS=RedHat 8.8 Now, After Step 4 or 5 , on the same form, If we switch back the CV to Default Organization View and then back to RHEL8 and then if we go to Operating Systems tab again, Now Synced Media appears there. If we switch to another CV RHEL9 and select the OS as RedHat 9.2, The old Synced Media selection remains the same and does not changes to the 9.2 kickstart.
I did not know what component I can select as the issue is with both Host and HOstgroup forms. Hence selected the Hosts Form component. Please move the BZ to right component if it's not the right one.
I also noticed this message popping up very frequently when I was exercising the steps mentioned and it makes no sense at all. 2023-07-21T12:56:26 [I|app|d4c5066c] Hostgroup has content view and lifecycle environment assigned; using those
I managed to find the source of the issue. I started debugging the problem in Developer console of chrome and that's where I found this error when I was trying to reproduce this BZ or the other BZ https://bugzilla.redhat.com/show_bug.cgi?id=2224494 Uncaught TypeError: Cannot read properties of undefined (reading 'match') at t.reloadPuppetclassParams (foreman_puppet:global-0dcaccdafc99814ce1ea.js:1:23871) at HTMLSelectElement.<anonymous> (foreman_puppet:global-0dcaccdafc99814ce1ea.js:1:2679) at HTMLDocument.dispatch (jquery.js:4737:27) at g.handle (jquery.js:4549:28) at Object.trigger (jquery.js:7807:12) at HTMLSelectElement.<anonymous> (jquery.js:7875:17) at Function.each (jquery.js:365:19) at _.fn.init.each (jquery.js:137:17) at _.fn.init.trigger (jquery.js:7874:15) at r.triggerChange (select2.js:1168:31) t.reloadPuppetclassParams @ foreman_puppet:global-0dcaccdafc99814ce1ea.js:1 (anonymous) @ foreman_puppet:global-0dcaccdafc99814ce1ea.js:1 dispatch @ jquery.js:4737 g.handle @ jquery.js:4549 trigger @ jquery.js:7807 (anonymous) @ jquery.js:7875 each @ jquery.js:365 each @ jquery.js:137 trigger @ jquery.js:7874 triggerChange @ select2.js:1168 onSelect @ select2.js:2465 selectHighlighted @ select2.js:1870 (anonymous) @ select2.js:807 (anonymous) @ select2.js:681 dispatch @ jquery.js:4737 g.handle @ jquery.js:4549 And that first line pointed to https://satellite614.lab.example.com/webpack/foreman_puppet/foreman_puppet:global-0dcaccdafc99814ce1ea.js A quick look tells me it was related to foreman_puppet and Yes, my affected satellite had the puppet-related features enabled. This also makes sense as on every new install where i later tested these two bugs, They were not having puppet enabled at all. As soon as I disabled puppet using "satellite-maintain plugin purge-puppet" , the issue got resolved in my affected satellite 6.14. This means the foreman_puppet plugin is causing some issues here for both this BZ and BZ https://bugzilla.redhat.com/show_bug.cgi?id=2224494 Should this also be moved to Puppet component ? -- Sayan