Bug #34127

Publishing a CV with depsolve=true and filter "exclude errata issued after date" randomly forgets to apply the filter

Added by Adam Ruzicka 5 months ago. Updated 4 months ago.

Content Views
Bugzilla link:
Fixed in Releases:
Found in Releases:
Red Hat JIRA:


Cloned from

Description of problem:
Under unknown circumstances, and randomly occurring, CV filter "exclude errata issued after date .." is ignored during CV publish, when dependency solving is enabled.

Particular reproducer (sporadic occurrence, though):
Having a CV with:
- RHEL8 BaseOS
- RHEL8 AppStream
- RHEL8 Supplementary
(probably the more repos, the bigger chance to reproduce is)

Having dependency solving enabled (this is crucial)

Then having two exclude filters:
- Exclude errata issued after 2021-10-01 (applied on all repos)
- Exclude puppet and puppet-agent packages (of all versions, from all repos)
- this might be irrelevant filter

and publishing the CV, it sporadically leaves RHEL8.5 errata with some content in it. E.g.:
RHBA-2021:4431 (issued on 2021-11-05)
are in, but e.g. device-mapper-event-1.02.177-10.el8.x86_64 (that is dependant on the above ones) is removed (which sounds correct).

Thus, CV content - despite dependency solving set - has inconsistent content with broken dependencies among packages.

The cause is that pulp repo for CV version is published (DistributorPublish step) before the unwanted content is unassociated (PurgeEmptyContent). And the "versioned" repo is then used for the "CV in Library" repo during that repo publish.

Anyway, the above sequence of steps happens every time, but we can reproduce it sporadically only - there must be some other factor contributing to it (or just unlucky race condition?)

Version-Release number of selected component (if applicable):
Sat 6.8.6
(newer Satellites probably affected the same)

How reproducible:

Steps to Reproduce:
See above steps

Actual results:
CV content with broken dependencies and unwanted packages

Expected results:
CV content with "dependency closure" and without unwanted packages

Additional info:
- for the "versioned BaseOS repo", the errata RHBA-2021:4431 is in published metadata, BUT NOT in mongo (repo_content_units)
- the device-mapper -177 version is in published metadata, not sure if in mongo (repo_content_units) - PROBABLY it is there

- workaround in force_full publish of "versioned" repo and then force_full publish of "Library" repo removes the errata from the repos metadata, BUT keeps package in (hence mongo probably keeps the association)

- I think ordering of dynflow steps:

34: Actions::Pulp::Repository::DistributorPublish (success) [ 390.51s / 7.15s ]
39: Actions::Katello::Repository::PurgeEmptyContent (success) [ 1.53s / 0.49s ]

is wrong. We must call the Publish (of CV-versioned repo) after PurgeEmptyContent

- BUT just the above change will probably not purge away the packages..? (as the workaround idea above failed)


#1 Updated by The Foreman Bot 5 months ago

  • Assignee set to Adam Ruzicka
  • Status changed from New to Ready For Testing
  • Pull request added

#2 Updated by Ryan Verdile 5 months ago

  • Triaged changed from No to Yes
  • Target version changed from Katello 4.4.0 to 3.18-no-release-planned

#3 Updated by Ian Ballou 4 months ago

  • Target version changed from 3.18-no-release-planned to Katello Recycle Bin
  • Status changed from Ready For Testing to Closed

Closing this out because the unwanted packages are resulting from the dependency solver doing its job.

The issue can be partially mitigated by having BaseOS get copied before AppStream, but that hardcoding is bad design because there can still be repoclosure issues from factors not controlled by Katello.

The documentation will be updated to make dep solving's role more clear.

#4 Updated by Ian Ballou 4 months ago

This was closed prematurely, the issue of BaseOS and AppStream being copied into empty destination repositories during CV publish means the wrong dependencies can be pulled in. We're investigating a fix. Reopening.

#5 Updated by Ian Ballou 4 months ago

  • Target version changed from Katello Recycle Bin to 3.18-no-release-planned
  • Assignee changed from Adam Ruzicka to Ian Ballou
  • Status changed from Closed to Assigned

This only applies to Katello 3.18 and below.

#6 Updated by The Foreman Bot 4 months ago

  • Status changed from Assigned to Ready For Testing
  • Pull request added

#7 Updated by Ian Ballou 4 months ago

  • Pull request deleted (

#8 Updated by Ian Ballou 4 months ago

  • Difficulty set to hard
  • Status changed from Ready For Testing to Closed

PR merged.

Also available in: Atom PDF