Bug 1392063

Summary: Hammer --resolve-dependencies flag not working
Product: Red Hat Satellite Reporter: David Kaylor <dkaylor>
Component: Content ViewsAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED ERRATA QA Contact: Lai <ltran>
Severity: high Docs Contact:
Priority: high    
Version: 6.2.3CC: andrew.schofield, bbuckingham, bkearney, dhlavacd, jcallaha, mhulan
Target Milestone: 6.10.0Keywords: PrioBumpField, PrioBumpGSS, PrioBumpPM, PrioBumpQA, 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: 2021-11-16 14:08:26 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:
Bug Depends On: 1401630, 1402984    
Bug Blocks:    

Description David Kaylor 2016-11-04 17:13:26 UTC
Description of problem:
Adding "--resolve-dependencies=no" to an incremental update has no effect. Dependencies are still published to the content view

Version-Release number of selected component (if applicable):
Satellite 6.2.3
tfm-rubygem-hammer_cli_katello-0.0.22.26-1.el7sat.noarch

How reproducible:
Deploy an incremental update using "--resolve-dependencies=no"

Steps to Reproduce:
1. Promote an errata that will pull in dependencies. Examples:

hammer content-view version incremental-update --organization=MyOrg --content-view-version-id=10 --errata-ids=RHBA-2016:2454 --resolve-dependencies=no #RHEL7

hammer content-view version incremental-update --organization=MyOrg --content-view-version-id=10 --errata-ids=RHSA-2016:1912 --resolve-dependencies=no #RHEL6

2. Compare command output to package list in the errata

3. Confirm by logging into a host using a view with the incremental update:

yum list glibc #RHBA-2016:2454
yum list libX11 #RHSA-2016:1912

Actual results:

Packages included via dependency and not the specified errata are displayed

New versions of packages visible to yum

Expected results:

Only packages in the errata are displayed

Yum shows previous versions of dependent packages

Comment 4 Andrew Kofink 2016-12-07 18:34:36 UTC
Created redmine issue http://projects.theforeman.org/issues/17608 from this bug

Comment 5 Andrew Kofink 2016-12-08 19:08:39 UTC
Related pulp thread: https://www.redhat.com/archives/pulp-list/2015-February/msg00013.html

Comment 9 Bryan Kearney 2020-08-25 16:01:43 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/17608 has been resolved.

Comment 11 Lai 2021-06-16 20:23:56 UTC
steps to test:

1. Create a custom repo with some erratas (I use https://jlsherrill.fedorapeople.org/fake-repos/needed-errata/)
2. Create a cv and add the repo from 1 to it and not the errata that you'll use to incrementally update (I used RHEA-2012:0055)
3. Create a filter that excludes packages of "*"
4. Publish the cv
5. Run the incremental update without resolve-dependencies: hammer content-view version incremental-update --content-view-version-id <cvv-id> --errata-ids=RHEA-2012:0055 --resolve-dependencies=no
6. Run the incremental update with resolve-dependencies: hammer content-view version incremental-update --content-view-version-id <cvv-id> --errata-ids=RHEA-2012:0055 --resolve-dependencies=yes

Expected:
5. Should only have 3 packages due to no dep-solving
6. Should have 8 packages due to dep-solving

Actual:
5. Content View: own version 1.1
Added Content:
  Errata:
        RHEA-2012:0055
  Packages:
        penguin-0.9.1-1.noarch
        shark-0.1-1.noarch
        walrus-5.21-1.noarch

6. Content View: own version 1.2
Added Content:
  Errata:
        RHEA-2012:0055
  Packages:
        bear-4.1-1.noarch
        dolphin-3.10.232-1.noarch
        lion-0.4-1.noarch
        penguin-0.9.1-1.noarch
        shark-0.1-1.noarch
        tiger-1.0-4.noarch
        walrus-5.21-1.noarch
        wolf-9.4-2.noarch

Marking verified on 6.10_04

Note: you can find the cvv by running "hammer content-view version list"

Comment 15 errata-xmlrpc 2021-11-16 14:08:26 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 (Moderate: Satellite 6.10 Release), 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-2021:4702