Bug 1200571
| Summary: | Unable to perform incremental update of errata in CLI | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Satellite | Reporter: | sthirugn <sthirugn> | ||||
| Component: | Content Management | Assignee: | Eric Helms <ehelms> | ||||
| Status: | CLOSED ERRATA | QA Contact: | sthirugn <sthirugn> | ||||
| Severity: | high | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | 6.1.0 | CC: | bbuckingham, bkearney, jmontleo, jsherril, mmccune | ||||
| Target Milestone: | Unspecified | Keywords: | Rebase, Triaged | ||||
| Target Release: | Unused | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| URL: | http://projects.theforeman.org/issues/9732 | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | Rebase: Bug Fixes and Enhancements | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2015-08-12 05:29:38 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: | |||||||
| Bug Blocks: | 1130651 | ||||||
| Attachments: |
|
||||||
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
Created redmine issue http://projects.theforeman.org/issues/9732 from this bug 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. This fix also requires this change in the CLI: https://github.com/Katello/hammer-cli-katello/pull/286 This requires two changes: * hammer-cli-katello https://github.com/Katello/hammer-cli-katello/pull/286 * katello https://github.com/Katello/katello/pull/5103 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 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. 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 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' 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? (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. 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"=>{}}
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 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
This bug is slated to be released with Satellite 6.1. 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 |
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: