Bug 1200571 - Unable to perform incremental update of errata in CLI
Summary: Unable to perform incremental update of errata in CLI
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Content Management
Version: 6.1.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: Unspecified
Assignee: Eric Helms
QA Contact: sthirugn@redhat.com
URL: http://projects.theforeman.org/issues...
Whiteboard:
Depends On:
Blocks: 1130651
TreeView+ depends on / blocked
 
Reported: 2015-03-10 21:11 UTC by sthirugn@redhat.com
Modified: 2017-02-23 20:20 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Rebase: Bug Fixes and Enhancements
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-08-12 05:29:38 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
production.log (13.73 KB, text/plain)
2015-03-10 21:11 UTC, sthirugn@redhat.com
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 9732 0 None None None 2016-04-22 16:57:08 UTC
Red Hat Product Errata RHSA-2015:1592 0 normal SHIPPED_LIVE Important: Red Hat Satellite 6.1.1 on RHEL 6 2015-08-12 09:04:35 UTC

Description sthirugn@redhat.com 2015-03-10 21:11:48 UTC
Created attachment 1000166 [details]
production.log

Description of problem:
Unable to perform incremental update in CLI

Version-Release number of selected component (if applicable):
Satellite-6.1.0-RHEL-6-20150303.0

How reproducible:
Always

Steps to Reproduce:
hammer> content-view version incremental-update --errata-ids='b34c7e36-f904-4098-b097-1c33011b78e8' --environment-ids='2' --ids='be822e60-c59c-4a19-aabe-ad5c8785ab56' --id='3'

An error occurred incrementally updating the content view:
  No systems have been specified.

Actual results:


Expected results:


Additional info:

Comment 2 Justin Sherrill 2015-03-11 13:59:47 UTC
Looking at the params:

2015-03-10 17:08:07 [I]   Parameters: {"add_content"=>{"errata_ids"=>["b34c7e36-f904-4098-b097-1c33011b78e8"], "puppet_module_ids"=>["be822e60-c59c-4a19-aabe-ad5c8785ab56"], "package_ids"=>["be822e60-c59c-4a19-aabe-ad5c8785ab56"]}, "update_systems"=>{"exclude"=>{"ids"=>["be822e60-c59c-4a19-aabe-ad5c8785ab56"]}, "include"=>{"ids"=>["be822e60-c59c-4a19-aabe-ad5c8785ab56"]}}, "content_view_version_environments"=>[{"content_view_version_id"=>"3", "environment_ids"=>["2"]}], "api_version"=>"v2", "content_view_version"=>{}}


It seems --ids= is getting put in the exclude list and the include list

Comment 3 Eric Helms 2015-03-12 17:14:31 UTC
Created redmine issue http://projects.theforeman.org/issues/9732 from this bug

Comment 4 Bryan Kearney 2015-03-13 12:05:16 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/9732 has been closed
-------------
Eric Helms
Applied in changeset commit:hammer-cli-katello|286a2c893e4854282e15aeb27de81205c089b93e.

Comment 5 Eric Helms 2015-03-13 22:16:22 UTC
This fix also requires this change in the CLI:

https://github.com/Katello/hammer-cli-katello/pull/286

Comment 6 Eric Helms 2015-03-13 22:25:43 UTC
This requires two changes:

 * hammer-cli-katello https://github.com/Katello/hammer-cli-katello/pull/286
 * katello https://github.com/Katello/katello/pull/5103

Comment 10 sthirugn@redhat.com 2015-03-23 20:34:28 UTC
Failed.

hammer> content-view version incremental-update --errata-ids='a73d9e54-df59-40f7-ba8b-e70c389d6989' --environment-ids='2' --ids='5a6c99bc-5c1f-4203-a9e0-0802c261319b' --id='3'
An error occurred incrementally updating the content view:
  Error: undefined method `key?' for nil:NilClass

Comment 12 Eric Helms 2015-03-24 12:24:00 UTC
If you are seeing that error, then the most likely cause is that this commit https://github.com/Katello/katello/pull/5103 to the server code is missing.

Comment 15 sthirugn@redhat.com 2015-03-27 14:48:11 UTC
Failed again

hammer> content-view version incremental-update --errata-ids='6e60302a-846b-4dd2-92ce-7e91524c0ab2' --environment-ids='2' --ids='0d3b39d2-99de-4683-b1d6-e6e76af90e5d' --id='2'
An error occurred incrementally updating the content view:
  undefined method `id' for nil:NilClass

Comment 18 Mike McCune 2015-03-27 23:09:10 UTC
The above error from hammer is bad formatting on passing in incorrect IDs. With Snap8 if you do pass in the correct IDs you don't get the above error but you do get hit with a *new* error:

seen:

https://sat-perf-04.idm.lab.bos.redhat.com/foreman_tasks/tasks/acaba55b-2d1e-466d-8ad4-ef03fec9afb3

Exception:

RuntimeError: plan_self has to be invoked before being able to reference the output


Backtrace:

/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/action.rb:137:in `output'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-2.2.0.30/app/lib/actions/katello/content_view/incremental_updates.rb:35:in `block (3 levels) in plan'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-2.2.0.30/app/lib/actions/katello/content_view/incremental_updates.rb:25:in `each'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-2.2.0.30/app/lib/actions/katello/content_view/incremental_updates.rb:25:in `block (2 levels) in plan'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/execution_plan.rb:223:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/execution_plan.rb:223:in `switch_flow'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/action.rb:315:in `concurrence'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-2.2.0.30/app/lib/actions/katello/content_view/incremental_updates.rb:24:in `block in plan'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/execution_plan.rb:223:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/execution_plan.rb:223:in `switch_flow'

Comment 19 Justin Sherrill 2015-03-28 23:24:32 UTC
Mike,

I think the actual error was:

undefined local variable or method `resolve_dependencies' for #<Actions::Katello::ContentViewVersion::IncrementalUpdate:0x0000000f2abd68> (NameError)
/opt/rh/ruby193/root/usr/share/gems/gems/katello-2.2.0.30/app/lib/actions/katello/content_view_version/incremental_update.rb:176:in `copy_yum_content'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-2.2.0.30/app/lib/actions/katello/content_view_version/incremental_update.rb:71:in `block in copy_repo'

And it looks like that only happens if you pass package ids to perform the inc update with.  This is def. a bug, but Im curious if it works with errata?

Comment 20 sthirugn@redhat.com 2015-03-29 05:27:33 UTC
(In reply to Justin Sherrill from comment #19)
> Mike,
> 
> I think the actual error was:
> 
> undefined local variable or method `resolve_dependencies' for
> #<Actions::Katello::ContentViewVersion::IncrementalUpdate:0x0000000f2abd68>
> (NameError)
> /opt/rh/ruby193/root/usr/share/gems/gems/katello-2.2.0.30/app/lib/actions/
> katello/content_view_version/incremental_update.rb:176:in `copy_yum_content'
> /opt/rh/ruby193/root/usr/share/gems/gems/katello-2.2.0.30/app/lib/actions/
> katello/content_view_version/incremental_update.rb:71:in `block in copy_repo'
> 
> And it looks like that only happens if you pass package ids to perform the
> inc update with.  This is def. a bug, but Im curious if it works with errata?

@Justin Nope, the error which Mike pasted happens for errata id also

hammer> content-view version incremental-update --errata-ids='6e60302a-846b-4dd2-92ce-7e91524c0ab2' --environment-ids='2' --ids='0d3b39d2-99de-4683-b1d6-e6e76af90e5d' --id='15'
An error occurred incrementally updating the content view:
  plan_self has to be invoked before being able to reference the output

I see the following exceptions in production.log

2015-03-29 01:14:39 [E] undefined local variable or method `resolve_dependencies' for #<Actions::Katello::ContentViewVersion::IncrementalUpdate:0x00000009db0f70> (NameError)

2015-03-29 01:14:39 [E] plan_self has to be invoked before being able to reference the output (RuntimeError)

2015-03-29 01:14:40 [E] RuntimeError: plan_self has to be invoked before being able to reference the output

complete production.log output is attached.

Comment 23 Justin Sherrill 2015-03-30 14:55:35 UTC
Ah, well it looks like its sending up some sort of id for package_ids and puppet_module_ids

 Parameters: {"add_content"=>{"errata_ids"=>["6e60302a-846b-4dd2-92ce-7e91524c0ab2"], "package_ids"=>["0d3b39d2-99de-4683-b1d6-e6e76af90e5d"], "puppet_module_ids"=>["0d3b39d2-99de-4683-b1d6-e6e76af90e5d"]}, "update_systems"=>{"included"=>{"ids"=>["0d3b39d2-99de-4683-b1d6-e6e76af90e5d"]}}, "content_view_version_environments"=>[{"environment_ids"=>["2"], "content_view_version_id"=>"15"}], "api_version"=>"v2", "content_view_version"=>{}}

Comment 26 Eric Helms 2015-04-02 16:50:13 UTC
Apologies for the delay in getting this fix out there, but I have opened an upstream PR to address it https://github.com/Katello/hammer-cli-katello/pull/290

Comment 28 sthirugn@redhat.com 2015-05-04 20:10:10 UTC
Verified.

Version Tested: 
Satellite-6.1.0-RHEL-7-20150429.2

Apply 1 errata in 2 environments:
# hammer -u admin -p changeme content-view version incremental-update --errata-ids 9b141ed5-6b2c-48f4-b102-b47b09921a9b --environment-ids=2,3   --id=5
[..........................................................] [100%]
Content View: rhel7partialcv version 1.3
Added Content:
  Errata:
        RHBA-2015:0741
  Packages:
        bash-4.2.46-12.el7.x86_64
        binutils-2.23.52.0.1-30.el7_1.1.x86_64
        binutils-devel-2.23.52.0.1-30.el7_1.1.i686
        binutils-devel-2.23.52.0.1-30.el7_1.1.x86_64
        glibc-2.17-78.el7.i686
        glibc-2.17-78.el7.x86_64
        glibc-common-2.17-78.el7.x86_64
        libgcc-4.8.3-9.el7.i686
        libgcc-4.8.3-9.el7.x86_64
        nss-softokn-freebl-3.16.2.3-9.el7.i686
        nss-softokn-freebl-3.16.2.3-9.el7.x86_64
        tzdata-2015d-1.el7.noarch


Apply 2 errata in 2 environments:
# hammer -u admin -p changeme content-view version incremental-update --errata-ids=f51f03db-dae7-40d9-9bbc-368fcb95db39,004d860a-625e-4daf-ab7e-a71827169a39 --environment-ids=2,3   --id=6
[..........................................................] [100%]
Content View: rhel7partialcv version 1.4
Added Content:
  Errata:
        RHEA-2015:0732
        RHSA-2015:0726
  Packages:
        audit-libs-2.4.1-5.el7.i686
        audit-libs-2.4.1-5.el7.x86_64
        cryptsetup-libs-1.6.6-3.el7.x86_64
        dbus-1.6.12-11.el7.x86_64
        dbus-libs-1.6.12-11.el7.i686
        dbus-libs-1.6.12-11.el7.x86_64
        device-mapper-1.02.93-3.el7.x86_64
        device-mapper-libs-1.02.93-3.el7.x86_64
        dnsmasq-2.66-13.el7_1.x86_64
        dracut-033-241.el7_1.1.x86_64
        elfutils-libelf-0.160-1.el7.x86_64
        elfutils-libs-0.160-1.el7.x86_64
        glib2-2.40.0-4.el7.x86_64
        grep-2.20-1.el7.x86_64
        grubby-8.28-11.el7.x86_64
        initscripts-9.49.24-1.el7.x86_64
        iproute-3.10.0-21.el7.x86_64
        kernel-3.10.0-229.1.2.el7.x86_64
        kernel-abi-whitelists-3.10.0-229.1.2.el7.noarch
        kernel-debug-3.10.0-229.1.2.el7.x86_64
        kernel-debug-devel-3.10.0-229.1.2.el7.x86_64
        kernel-devel-3.10.0-229.1.2.el7.x86_64
        kernel-doc-3.10.0-229.1.2.el7.noarch
        kernel-headers-3.10.0-229.1.2.el7.x86_64
        kernel-tools-3.10.0-229.1.2.el7.x86_64
        kernel-tools-libs-3.10.0-229.1.2.el7.x86_64
        kmod-14-10.el7.x86_64
        kmod-libs-14-10.el7.x86_64
        kpartx-0.4.9-77.el7.x86_64
        libblkid-2.23.2-21.el7.x86_64
        libdb-5.3.21-17.el7_0.1.i686
        libdb-5.3.21-17.el7_0.1.x86_64
        libgcrypt-1.5.3-12.el7.i686
        libgcrypt-1.5.3-12.el7.x86_64
        libmount-2.23.2-21.el7.x86_64
        libstdc++-4.8.3-9.el7.x86_64
        libuuid-2.23.2-21.el7.x86_64
        linux-firmware-20140911-0.1.git365e80c.el7.noarch
        numactl-libs-2.0.9-4.el7.x86_64
        pam-1.1.8-12.el7.i686
        pam-1.1.8-12.el7.x86_64
        pcre-8.32-14.el7.x86_64
        perf-3.10.0-229.1.2.el7.x86_64
        perl-5.16.3-285.el7.x86_64
        perl-libs-5.16.3-285.el7.i686
        perl-libs-5.16.3-285.el7.x86_64
        perl-macros-5.16.3-285.el7.x86_64
        procps-ng-3.3.10-3.el7.i686
        procps-ng-3.3.10-3.el7.x86_64
        systemd-208-20.el7_1.2.x86_64
        systemd-libs-208-20.el7_1.2.i686
        systemd-libs-208-20.el7_1.2.x86_64
        systemd-sysv-208-20.el7_1.2.x86_64
        util-linux-2.23.2-21.el7.x86_64
        xz-5.1.2-9alpha.el7.x86_64
        xz-libs-5.1.2-9alpha.el7.i686
        xz-libs-5.1.2-9alpha.el7.x86_64

Comment 29 Bryan Kearney 2015-08-11 13:33:05 UTC
This bug is slated to be released with Satellite 6.1.

Comment 30 errata-xmlrpc 2015-08-12 05:29:38 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-2015:1592


Note You need to log in before you can comment on or make changes to this bug.