Bug 1322917

Summary: hammer content-view version incremental-update requires environment of content view version to work
Product: Red Hat Satellite Reporter: Eric Lavarde <elavarde>
Component: HammerAssignee: Justin Sherrill <jsherril>
Status: CLOSED ERRATA QA Contact: jcallaha
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 6.1.7CC: abalakht, jcallaha, jsherril, omaciel, oprazak
Target Milestone: Unspecified   
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
URL: http://projects.theforeman.org/issues/14439
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-27 10:59:40 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:
Attachments:
Description Flags
The incremental update succeeds and creates new minor version. none

Description Eric Lavarde 2016-03-31 16:19:17 UTC
Description of problem:
When trying to create an incremental update to a Content View (CV) version, applying some errata, it requires the environments to be listed where the version is, whereas there are cases where the CV version only lives in the Library or doesn't live in any Life Cycle Environment (LCE).

Version-Release number of selected component (if applicable):
6.1.7

How reproducible:
Always

Steps to Reproduce:
1. $ hammer content-view version incremental-update --content-view-version "xxx" --errata-ids yyy

Actual results:
The command fails.

Expected results:
The command succeeds and just applies the given errata(s) to the given CV version and creates a new CV minor version.

Additional info:

My use case:

LCEs are Library, Test, Prod
CV v1, v2 and v3 are in the Library (because CVa is never used directly, only through CCV)
CV v1 is used by CCV (Composite CV) in v10 promoted to Prod
CV v2 is used by CCV in v11 promoted to Test
CV v3 is used by CCV in v12 only published in Library
I want now to:
- add errata to CV v1, v2 and v3 generating v1.1, v2.1 and v3.1
- update CCV v10 to v1.1, CCV v11 to v2.1 and CCV v12 to v3.1 at a later stage
Note that CV might be used by other CCVs, but I don't think that's relevant here.

Comment 3 Justin Sherrill 2016-04-01 13:18:19 UTC
Created redmine issue http://projects.theforeman.org/issues/14439 from this bug

Comment 5 Bryan Kearney 2016-04-14 18:04:05 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/14439 has been closed
-------------
Justin Sherrill
Applied in changeset commit:hammer-cli-katello|3a56a55a7ddc1f2aad4b9a061aff77204dfed18c.

Comment 6 Ondřej Pražák 2016-05-27 12:42:21 UTC
Created attachment 1162455 [details]
The incremental update succeeds and creates new minor version.

Verified in snap 13.1

Comment 7 jcallaha 2016-05-31 18:40:08 UTC
Verified in Satellite 6.2 Beta Snap 13. 

[root@rhsm-qe-1 ~]# hammer content-view version incremental-update --content-view-version-id 12 --errata-ids fc451f1d-558a-4f48-8618-440099a4fb6b
[....................................................................................................................................................................................] [100%]
Content View: new version 2.1
Added Content:
  Errata:
        RHEA-2012:7947

Comment 8 Bryan Kearney 2016-07-27 10:59:40 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/RHBA-2016:1501