Bug 1259057

Summary: hammer incremental update is broken
Product: Red Hat Satellite Reporter: sthirugn <sthirugn>
Component: Errata ManagementAssignee: Katello Bug Bin <katello-bugs>
Status: CLOSED ERRATA QA Contact: sthirugn <sthirugn>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.1.1CC: bbuckingham, bhamrick, bkearney, mmccune, rjerrido, sauchter
Target Milestone: UnspecifiedKeywords: PrioBumpQA, Regression, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
URL: http://projects.theforeman.org/issues/12930
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-02-15 15:51:49 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 sthirugn@redhat.com 2015-09-01 20:59:14 UTC
Description of problem:
hammer incremental update is broken

Version-Release number of selected component (if applicable):
Sat 6.1.2 z-stream build

How reproducible:
Always

Steps to Reproduce:
hammer> content-view version incremental-update --content-view-version-id=43 --errata-ids='61531abe-90e3-40d2-9b7e-4f5df1bd66b7' --environment-ids='46'
An error occurred incrementally updating the content view:
  Couldn't find Katello::ContentViewVersion without an ID

hammer> content-view version incremental-update --help
Usage:
     content-view version incremental-update [OPTIONS]

Options:
 --async                                             Do not wait for the task
 --content-host-ids CONTENT_HOST_IDS                 IDs of content hosts to update
                                                     Comma separated list of values.
 --content-view-version CONTENT_VIEW_VERSION_VERSION Content view version number
 --content-view-version-id CONTENT_VIEW_VERSION_ID   Content view version identifier
 --description DESCRIPTION                           The description for the new generated Content View Versions
 --environment-ids ENVIRONMENTS                      list of environment IDs to update the content view version in
                                                     Comma separated list of values.
 --environments ENVIRONMENT_NAMES                    Comma separated list of values.
 --errata-ids ERRATA_IDS                             Errata uuids to copy into the new versions.
                                                     Comma separated list of values.
 --package-ids PACKAGE_IDS                           a package identifier
                                                     Comma separated list of values.
 --packages PACKAGE_NAMES                            Comma separated list of values.
 --propagate-all-composites PROPAGATE_ALL_COMPOSITES If true, will publish a new composite version using any specified
                                                     content_view_version_id that has been promoted to a lifecycle environment.
                                                     One of true/false, yes/no, 1/0.
 --puppet-module-ids PUPPET_MODULE_IDS               a puppet module identifier
                                                     Comma separated list of values.
 --puppet-modules PUPPET_MODULE_NAMES                Comma separated list of values.
 --resolve-dependencies RESOLVE_DEPENDENCIES         If true, when adding the specified errata or packages, any needed
                                                     dependencies will be copied as well.
                                                     One of true/false, yes/no, 1/0.
 --search SEARCH                                     Search string for systems to perform an action on
 --update-all-systems UPDATE_ALL_SYSTEMS             Update all editable and applicable systems, not just ones using the
                                                     selected Content View Versions and Environments
                                                     One of true/false, yes/no, 1/0.
 -h, --help                                          print help



Actual results:
Incremental update errored

Expected results:
No error and incremental update should work

Additional info:

Comment 2 sthirugn@redhat.com 2015-09-02 17:27:57 UTC
This is happening in sat-6.1.1 as well.  Marking this a blocker.

Comment 5 Stephen Benjamin 2015-12-23 15:18:32 UTC
Created redmine issue http://projects.theforeman.org/issues/12930 from this bug

Comment 6 Bryan Kearney 2015-12-23 19:05:02 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/12930 has been closed
-------------
Anonymous
Applied in changeset commit:hammer-cli-katello|ed2175f9d30ae3614aebf751e1a6430cb789381d.

Comment 10 sthirugn@redhat.com 2016-02-05 22:00:24 UTC
Verified in hammer cli in Sat 6.1.7 build:

Scenario 1:
content-view version incremental-update --content-view-version-id=3 --errata-ids=a4496ecc-ba9f-4c84-b049-cc7fa85c18ab --environment-ids=2

hammer> content-view version incremental-update --content-view-version-id=3 --errata-ids=
496ecc-ba9f-4c84-b049-cc7fa85c18ab --environment-ids=2                                     
[.................................................................................] [100%]
Content View: rhel7partialcv version 1.2
Completed 200 OK in 68ms (Views: 1.2ms | ActiveRecord
Added Content:
  Errata:
        RHSA-2016:0063
  Packages:
        ntp-4.2.6p5-22.el7_2.1.x86_64
        ntpdate-4.2.6p5-22.el7_2.1.x86_64 


Scenario 2: Tested the same for puppet modules and passed
hammer> content-view version incremental-update --content-view-version-id=21 --puppet-module-ids=28f358db-7742-446b-a31c-e4348269db60 --environment-ids=2

Scenario 3: Tested the same for package ids and passed
hammer> content-view version incremental-update --content-view-version-id=21 --package-ids=d2c24c0e-a0aa-449e-a3f3-433be86c67d3 --environment-ids=2

Comment 11 sthirugn@redhat.com 2016-02-05 22:02:27 UTC
Please be aware that the following inc update bugs are still open in sta 6.1.7:
ccv propagation:				
https://bugzilla.redhat.com/show_bug.cgi?id=1288148 - Satellite fails to propagate incremental updates to Composite Content views
https://bugzilla.redhat.com/show_bug.cgi?id=1304891 - Incremental update from UI on a child content view is not propagating automatically to composite content view

Update all systems:				
https://bugzilla.redhat.com/show_bug.cgi?id=1304886 - Incremental update using cli does not update systems when --update-all-systems=true is passed
https://bugzilla.redhat.com/show_bug.cgi?id=1305164 - update_all_systems using incremental update api fails

Comment 13 errata-xmlrpc 2016-02-15 15:51:49 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-2016:0174