Bug 1784165

Summary: Exclusion filter on a package with higher version doesn't work on conservative dep-solving
Product: Red Hat Satellite Reporter: Lai <ltran>
Component: PulpAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED ERRATA QA Contact: Bruno Rocha <rochacbruno>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.7.0CC: bmbouter, dalley, daviddavis, dkliban, egolov, ggainey, ipanova, jomitsch, rchan, ttereshc
Target Milestone: 6.7.0Keywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: pulp-rpm-2.21.0.3-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-04-14 13:28:08 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 Lai 2019-12-16 21:30:38 UTC
Description of problem:
Creating a filter to exclude a package with a higher version that has multiple versions doesn't work properly on conservative dep-solving.

Version-Release number of selected component (if applicable):
6.7 snap 6

How reproducible:
100%

Steps to Reproduce:
1. Turn dependency solving to conservative.
2. Create and sync custom repo.
3. Create cv with depsolving on and add custom repo.
4. Create exclusion filter and exclude a package (walrus) with a higher version
5. Publish CV
6. Check rpm package list for that version

Actual results:
walrus 0.71 and 5.21 are present in rpm packages list.

Expected results:
walrus 0.71 is the only package present in rpm packages list.

Additional info:
Without depsolving, the filtering function works as expected.

Comment 4 John Mitsch 2019-12-17 13:52:01 UTC
I do see some interesting behavior that could either be communicated to the user better or changed.

The metadata from https://inecas.fedorapeople.org/fakerepos/zoo/repodata/be20ece13e6c21b132667ddcaa4d7ad0b32e470b9917aba51979e0707116280d-primary.xml.gz shows that chimpanzee requires walrus (see under <rpm:requires>)

<package type="rpm">
  <name>chimpanzee</name>
  <arch>noarch</arch>
  <version epoch="0" ver="0.21" rel="1"/>
  <checksum type="sha256" pkgid="YES">5aa8b0eb10a974a02639ffea7c10d7dab93f82c4d08c32b00b5677e638fd4da6</checksum>
  <summary>A dummy package of chimpanzee</summary>
  <description>A dummy package of chimpanzee</description>
  <packager></packager>
  <url>http://tstrachota.fedorapeople.org</url>
  <time file="1331832454" build="1331831363"/>
  <size package="2497" installed="42" archive="300"/>
<location href="chimpanzee-0.21-1.noarch.rpm"/>
  <format>
    <rpm:license>GPLv2</rpm:license>
    <rpm:vendor/>
    <rpm:group>Internet/Applications</rpm:group>
    <rpm:buildhost>smqe-ws15</rpm:buildhost>
    <rpm:sourcerpm>chimpanzee-0.21-1.src.rpm</rpm:sourcerpm>
    <rpm:header-range start="872" end="2341"/>
    <rpm:provides>
      <rpm:entry name="chimpanzee" flags="EQ" epoch="0" ver="0.21" rel="1"/>
    </rpm:provides>
    <rpm:requires>
      <rpm:entry name="squirrel"/>
      <rpm:entry name="walrus"/>
    </rpm:requires>
  </format>
</package>


When "walrus-5.21" is filtered, "walrus-5.21" is pulled in, despite "walrus-0.71" existing in the content view. "walrus-0.71" should have been enough to fill the requirement. 

However, when "walrus-0.71" is filtered, it stays filtered. So it appears that the latest version of the required package is pulled into the content view. 

This goes against the "conservative" dependency solving approach, which says "Conservative will only add packages to solve the dependencies if the package needed doesn't exist."

I'll have to do some further investigation and talk with pulp to see why this is happening. It does seem some changes are needed, either in our documenting of the strategies or in the actual dependency solving itself.

Comment 5 John Mitsch 2020-01-15 16:20:28 UTC
I don't see a change in what katello is sending pulp in this area, so I passed my findings along to dalley to take a look if something changed in pulp. After his investigation, we can determine which component the bug is in.

Comment 6 Daniel Alley 2020-01-23 16:32:18 UTC
I was able to reproduce this on Pulp RPM master branch. Will investigate further

Comment 7 Daniel Alley 2020-01-23 16:59:05 UTC
Bisected down to commit 7fb0330b60a2b24a9905f0c243cb35df42dd9711

Comment 9 Grant Gainey 2020-02-12 19:55:41 UTC
Correction to #7, commit 39e310ab3abc15d5d21b70dd910e79731f4c7a89 is where this starts biting us

Comment 10 pulp-infra@redhat.com 2020-02-12 20:02:06 UTC
The Pulp upstream bug status is at ASSIGNED. Updating the external tracker on this bug.

Comment 11 pulp-infra@redhat.com 2020-02-12 20:02:08 UTC
The Pulp upstream bug priority is at Normal. Updating the external tracker on this bug.

Comment 12 pulp-infra@redhat.com 2020-02-14 21:32:12 UTC
The Pulp upstream bug status is at POST. Updating the external tracker on this bug.

Comment 13 pulp-infra@redhat.com 2020-02-18 11:34:00 UTC
The Pulp upstream bug status is at MODIFIED. Updating the external tracker on this bug.

Comment 14 pulp-infra@redhat.com 2020-02-18 12:02:04 UTC
All upstream Pulp bugs are at MODIFIED+. Moving this bug to POST.

Comment 16 pulp-infra@redhat.com 2020-02-27 17:02:29 UTC
The Pulp upstream bug status is at ON_QA. Updating the external tracker on this bug.

Comment 17 pulp-infra@redhat.com 2020-03-05 18:47:51 UTC
The Pulp upstream bug status is at CLOSED - CURRENTRELEASE. Updating the external tracker on this bug.

Comment 19 Bruno Rocha 2020-04-01 18:34:39 UTC
satellite-6.7.0-7.el7sat.noarch
pulp-server-2.21.0-1.el7sat.noarch


Walrus package excluded from VC package list

Comment 21 errata-xmlrpc 2020-04-14 13:28:08 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2020:1454