Red Hat Satellite 6 WebUI or hammer shows too few errata applicable for some host.
Environment
- Red Hat Satellite 6.x
Issue
yum updateoryum updateinfoon a Content Host shows many errata applicable.- Red Hat Satellite 6 WebUI and also
hammershows less errata for content host. - How to make Red Hat Satellite aware about all applicable errata?
Resolution
-
There are several options on how to recalculate errata applicability, either of them can be used:
1) Run below command on the affected Content Host:
# dnf uploadprofile --force-uploadOR
2) On the Content Host do any one of the below
- (Un)install any package
- Enable or disable a repository
- Unregister and re-register the Content Host to Red Hat Satellite/Capsule.
OR
3) Run the underlying task on Red Hat Satellite directly - for any affected Content Host(s) that can be specified via variable
hosts:# foreman-rake console irb(main):001:0> User.current = User.anonymous_admin irb(main):002:0> hosts = Host.all irb(main):002:0> hosts = [Host.find(Katello::System.find_by_uuid("ac97b210-c4b8-48ec-96cd-75251cf594a0").host_id)] irb(main):002:0> hosts = [Host.find_by_name("contenthost.example.com")] irb(main):003:0> ForemanTasks.sync_task(::Actions::Katello::Host::GenerateApplicability, hosts)NOTE The first option triggers the task for each and every Content Host. The second for the host of given UUID (
subscription-manager identityrun on the Content Host shows the UUID), and the third for given hostname.
Root Cause
-
Applicability is calculated via
GenerateApplicabilitytask, which must be run after any change in packages on a Content Host or after any change in a repository associated to a Content Host. -
When this task was skipped or failed due to some error, there is a workaround in manually invoking it - either via some triggering activity on the Content Host (see points 1) and 2)) or directly invoking the task (point 3)).
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Comments