Bug 2168710

Summary: [RFE] Changing a host's content view/LCE should trigger an immediate update of a host's package profile
Product: Red Hat Satellite Reporter: Jayant Bhatia <jbhatia>
Component: CandlepinAssignee: Barnaby Court <bcourt>
Status: CLOSED DUPLICATE QA Contact: Vladimír Sedmík <vsedmik>
Severity: high Docs Contact:
Priority: high    
Version: 6.13.0CC: ahumbe, jlenz, myarboro
Target Milestone: UnspecifiedKeywords: FutureFeature, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-03-23 13:31:55 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 Jayant Bhatia 2023-02-09 20:07:48 UTC
Description of problem:

The value of Installable Errata within Content Hosts page does not change or is not recalculated for the registered host based upon the content view associated to it. 


Version-Release number of selected component (if applicable): satellite-6.13.0-4.el8sat.noarch


How reproducible: Always


Steps to Reproduce:

1. Register a host with Satellite and associate it with 'Library' lifecycle environment and 'Default Organization View' content view.

2. Navigate to Satellite WebUI -> Hosts -> Content Hosts -> Click on the registered host.

3. In the 'Overview' tab, there are values populated for 'Installable' and 'Applicable' within 'Errata' and values for both 'Installable' and 'Applicable' are same as host is associated with 'Library' lifecycle environment and 'Default Organization View' content view.

4. Create a content view with no repositories added to it. Associate registered host to the newly created blank content view.

5. Navigate to Satellite WebUI -> Hosts -> Content Hosts -> Click on the registered host. In the 'Overview' tab, look for the values of 'Installable' and 'Applicable' within Errata.


Actual results: The values of 'Applicable' and 'Installable' within Errata are same and does not change. The values are not recalculated.


Expected results: The value of 'Installable' errata should get re-calculated based upon the new content view associated with it.


Additional info: Clicking on 'Installable' and 'Applicable' within 'Errata' on above mentioned page always show the same value.

Comment 1 Brad Buckingham 2023-02-13 14:28:14 UTC
Is this a regression from 6.12?  Thanks!

Comment 2 Jayant Bhatia 2023-02-13 14:53:45 UTC
Hello Brad,

This is specific to Satellite 6.13 as when I go to Satellite 6.12 with new UI, I don't see separate sections for Installable and Applicable errata within Content Hosts tab on 6.12.

Comment 3 Jeremy Lenz 2023-02-15 15:00:26 UTC
Hello Jayant,

The host's applicable and installable errata won't get updated until the host performs some package action (update, install, remove, etc.).  (Running 'subscription-manager repos' on the host will also update them.) I've noticed it too; this seems to be a less recent change in dnf/yum or subscription manager.

In both 6.12 and 6.13, the behavior should match what I outlined here-- the difference is that in 6.13 it's more visible because of the chart on the Errata overview card. However, you can still see errata counts on

- the legacy Content Host details page
- the Hosts > All Hosts list page, if you've added that column
- new host details page Content > Errata tab (you can filter to Applicable or Installable, and look at the total on the pagination- ex. "1-20 of 492")

Can you please check and see if these make sense, given what I've said above?

Comment 4 Jayant Bhatia 2023-02-15 15:13:37 UTC
Hello Jeremy,

Thank you for the details. I tried running 'subscription-manager repos' command and it do help to update the "Installable Errata" on the Content Hosts page.

Lets say if a user has a thousand machines registered to Satellite server. And a new version of content view is published/promoted, in that scenario customer has to run "subscription-manager repos" command on all registered thousand hosts to get Installable Errata count correctly reflected on Content Hosts page? Can we have some automation where if Installable Errata count  is not reflected immediately, it gets reflected after some time? say an hour or two?

Comment 5 Jeremy Lenz 2023-02-15 15:17:24 UTC
I forgot to mention that it should also get updated during the host's regular checkin (every 4 hours or so.)

If you'd like to make it update immediately, I think this would be a useful RFE.

Comment 6 Jayant Bhatia 2023-02-15 15:51:00 UTC
That sounds great! We can keep this Bug as a RFE then to update the Installable Errata count immediately on Content Hosts page in Satellite UI after changes in associated content view/lifecycle environment.

Comment 8 Jeremy Lenz 2023-02-15 17:23:30 UTC
Changed to RFE and updated title.

Comment 15 Jeremy Lenz 2023-03-23 13:31:55 UTC
From Nikos: "the fix isn't something that can be done in either candlepin or subman/yum/dnf, because the client isn't aware that the host changed environments until it checks in (at which point the errata will be updated anyway because the profile will be uploaded), and Candlepin, even though it knows the host changed environments, it can't actually 'notify' the client at all, since it's just a REST API; it doesn't have any mechanism to initiate a conversation with any client itself."

Based on this, the fix should be in Katello, so I'm closing this BZ as duplicate.

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