Bug 1019484

Summary: Katello would not complete deletion of changeset and received error.
Product: Red Hat Satellite Reporter: Mike McCune <mmccune>
Component: InfrastructureAssignee: Ivan Necas <inecas>
Status: CLOSED CURRENTRELEASE QA Contact: Kedar Bidarkar <kbidarka>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.0.2CC: cwelton, fang64, gkhachik, jmontleo, kbidarka
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1019482 Environment:
Redhat Enterprise Linux 6.4 running Katello 1.4 testing repositories.
Last Closed: 2014-04-24 17:07:15 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: 1019482    
Bug Blocks:    

Description Mike McCune 2013-10-15 20:30:47 UTC
+++ This bug was initially created as a clone of Bug #1019482 +++

Description of problem:
I created a deletion changeset, which resulted in an error after being applied.

Version-Release number of selected component (if applicable):
1.5.1-1.git.6.65c0073.el6

How reproducible:


Steps to Reproduce:
1. Created deletion changeset
2. Reviewed it.
3. Applied it.

Actual results:
The changeset wasn't applied successful

Expected results:
The changeset deletion should have deleted the entry from this environment.

Additional info:
I ran the same changeset again and it worked the second time.

Stack trace output is provided below:
[ERROR 2013-10-15 15:18:38 glue  #48148] Katello::Actions::ChangesetPromote:success:nil -> nil
 | Fort::Actions::ChangesetPublishAction:success:nil -> nil
 | KatelloForemanEngine::Actions::ChangesetPromote:error:nil -> nilNoMethodError: undefined method `affected_repos' for #<DeletionChangeset:0x000000087b0388>
 | /opt/rh/ruby193/root/usr/share/gems/gems/activemodel-3.2.8/lib/active_model/attribute_methods.rb:407:in `method_missing'
 | /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/attribute_methods.rb:149:in `method_missing'
 | /opt/rh/ruby193/root/usr/share/gems/gems/katello-foreman-engine-0.0.10/lib/katello_foreman_engine/actions/changeset_promote.rb:23:in `plan'
 | /opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.1.0/lib/dynflow/action.rb:79:in `block in plan'
 | /opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.1.0/lib/dynflow/step.rb:91:in `catch_errors'
 | /opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.1.0/lib/dynflow/action.rb:78:in `plan'
 | /opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.1.0/lib/dynflow/dispatcher.rb:26:in `block in execution_plan_for'
 | /opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.1.0/lib/dynflow/dispatcher.rb:25:in `each'
 | /opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.1.0/lib/dynflow/dispatcher.rb:25:in `execution_plan_for'
 | /opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.1.0/lib/dynflow/action.rb:118:in `add_subscriptions'
 | /opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.1.0/lib/dynflow/action.rb:85:in `plan'
 | /opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.1.0/lib/dynflow/bus.rb:33:in `prepare_execution_plan'
 | /opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.1.0/lib/dynflow/bus.rb:22:in `block in trigger'
 | /opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.1.0/lib/dynflow/bus.rb:108:in `in_transaction_if_possible'
 | /opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.1.0/lib/dynflow/bus.rb:21:in `trigger'
 | /opt/rh/ruby193/root/usr/share/ruby/forwardable.rb:201:in `trigger'
 | /opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.1.0/lib/dynflow/action.rb:69:in `trigger'
 | /usr/share/katello/app/lib/glue/event.rb:44:in `trigger'
 | /usr/share/katello/app/models/deletion_changeset.rb:53:in `delete_content'
 | /usr/share/katello/app/models/async_operation.rb:57:in `perform'
 | /opt/rh/ruby193/root/usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/backend/base.rb:94:in `block in invoke_job'
 | /opt/rh/ruby193/root/usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/lifecycle.rb:60:in `call'
 | /opt/rh/ruby193/root/usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/lifecycle.rb:60:in `block in initialize'
 | /opt/rh/ruby193/root/usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/lifecycle.rb:65:in `call'
 | /opt/rh/ruby193/root/usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/lifecycle.rb:65:in `execute'
 | /opt/rh/ruby193/root/usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/lifecycle.rb:38:in `run_callbacks'
 | /opt/rh/ruby193/root/usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/backend/base.rb:91:in `invoke_job'
 | /opt/rh/ruby193/root/usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/worker.rb:178:in `block (2 levels) in run'
 | /opt/rh/ruby193/root/usr/share/ruby/timeout.rb:68:in `timeout'
 | /opt/rh/ruby193/root/usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/worker.rb:178:in `block in run'
 | /opt/rh/ruby193/root/usr/share/ruby/benchmark.rb:295:in `realtime'
 | /opt/rh/ruby193/root/usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/worker.rb:177:in `run'
 | /opt/rh/ruby193/root/usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/worker.rb:234:in `block in reserve_and_run_one_job'
 | /opt/rh/ruby193/root/usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/lifecycle.rb:60:in `call'
 | /opt/rh/ruby193/root/usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/lifecycle.rb:60:in `block in initialize'
 | /opt/rh/ruby193/root/usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/lifecycle.rb:65:in `call'
 | /opt/rh/ruby193/root/usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/lifecycle.rb:65:in `execute'
 | /opt/rh/ruby193/root/usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/lifecycle.rb:38:in `run_callbacks'
 | /opt/rh/ruby193/root/usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/worker.rb:234:in `reserve_and_run_one_job'
 | /opt/rh/ruby193/root/usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/worker.rb:162:in `block in work_off'
 | /opt/rh/ruby193/root/usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/worker.rb:161:in `times'
 | /opt/rh/ruby193/root/usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/worker.rb:161:in `work_off'
 | /opt/rh/ruby193/root/usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/worker.rb:133:in `block (4 levels) in start'
 | /opt/rh/ruby193/root/usr/share/ruby/benchmark.rb:295:in `realtime'
 | /opt/rh/ruby193/root/usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/worker.rb:132:in `block (3 levels) in start'
 | /opt/rh/ruby193/root/usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/lifecycle.rb:60:in `call'
 | /opt/rh/ruby193/root/usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/lifecycle.rb:60:in `block in initialize'
 | /opt/rh/ruby193/root/usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/lifecycle.rb:65:in `call'
 | /opt/rh/ruby193/root/usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/lifecycle.rb:65:in `execute'
 | /opt/rh/ruby193/root/usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/lifecycle.rb:38:in `run_callbacks'
 | /opt/rh/ruby193/root/usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/worker.rb:129:in `block (2 levels) in start'
 | /opt/rh/ruby193/root/usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/worker.rb:128:in `loop'
 | /opt/rh/ruby193/root/usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/worker.rb:128:in `block in start'
 | /opt/rh/ruby193/root/usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/plugins/clear_locks.rb:7:in `call'
 | /opt/rh/ruby193/root/usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/plugins/clear_locks.rb:7:in `block (2 levels) in <class:ClearLocks>'
 | /opt/rh/ruby193/root/usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/lifecycle.rb:78:in `call'
 | /opt/rh/ruby193/root/usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/lifecycle.rb:78:in `block (2 levels) in add'
 | /opt/rh/ruby193/root/usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/lifecycle.rb:60:in `call'
 | /opt/rh/ruby193/root/usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/lifecycle.rb:60:in `block in initialize'
 | /opt/rh/ruby193/root/usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/lifecycle.rb:78:in `call'
 | /opt/rh/ruby193/root/usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/lifecycle.rb:78:in `block in add'
 | /opt/rh/ruby193/root/usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/lifecycle.rb:65:in `call'
 | /opt/rh/ruby193/root/usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/lifecycle.rb:65:in `execute'
 | /opt/rh/ruby193/root/usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/lifecycle.rb:38:in `run_callbacks'
 | /opt/rh/ruby193/root/usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/worker.rb:127:in `start'
 | /opt/rh/ruby193/root/usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/command.rb:101:in `run'
 | /opt/rh/ruby193/root/usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/command.rb:89:in `block in run_process'
 | /opt/rh/ruby193/root/usr/share/gems/gems/daemons-1.1.4/lib/daemons/application.rb:249:in `call'
 | /opt/rh/ruby193/root/usr/share/gems/gems/daemons-1.1.4/lib/daemons/application.rb:249:in `block in start_proc'
 | /opt/rh/ruby193/root/usr/share/gems/gems/daemons-1.1.4/lib/daemons/daemonize.rb:197:in `call'
 | /opt/rh/ruby193/root/usr/share/gems/gems/daemons-1.1.4/lib/daemons/daemonize.rb:197:in `call_as_daemon'
 | /opt/rh/ruby193/root/usr/share/gems/gems/daemons-1.1.4/lib/daemons/application.rb:253:in `start_proc'
 | /opt/rh/ruby193/root/usr/share/gems/gems/daemons-1.1.4/lib/daemons/application.rb:293:in `start'
 | /opt/rh/ruby193/root/usr/share/gems/gems/daemons-1.1.4/lib/daemons/controller.rb:70:in `run'
 | /opt/rh/ruby193/root/usr/share/gems/gems/daemons-1.1.4/lib/daemons.rb:195:in `block in run_proc'
 | /opt/rh/ruby193/root/usr/share/gems/gems/daemons-1.1.4/lib/daemons/cmdline.rb:109:in `call'
 | /opt/rh/ruby193/root/usr/share/gems/gems/daemons-1.1.4/lib/daemons/cmdline.rb:109:in `catch_exceptions'
 | /opt/rh/ruby193/root/usr/share/gems/gems/daemons-1.1.4/lib/daemons.rb:194:in `run_proc'
 | /opt/rh/ruby193/root/usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/command.rb:87:in `run_process'
 | /opt/rh/ruby193/root/usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/command.rb:80:in `block in daemonize'
 | /opt/rh/ruby193/root/usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/command.rb:78:in `times'
 | /opt/rh/ruby193/root/usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/command.rb:78:in `daemonize'
 | script/delayed_job:5:in `<main>'
 | Fort::Actions::ChangesetPublishAction:pending:{"id"=>3} -> {}

Comment 1 Roy Williams 2013-10-15 20:34:20 UTC
This was done by using katello-foreman-all during the installation, as this will not occur if you use katello-all.

Comment 2 RHEL Program Management 2013-10-15 20:44:38 UTC
Since this issue was entered in Red Hat Bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.

Comment 4 Ivan Necas 2013-10-16 13:21:24 UTC
Proposed patch in https://github.com/Katello/katello-foreman-engine/pull/7

Comment 5 Ivan Necas 2013-10-17 13:52:56 UTC
Fixed in rubygem-katello-foreman-engine-0.0.12-1

Comment 6 Garik Khachikyan 2013-10-17 15:05:19 UTC
need to have it in current drop asap, please.

Comment 9 Kedar Bidarkar 2013-10-21 13:37:57 UTC
We no longer face this issue, comment1 was also taken into account while testing this bug. 

Deletion changeset was successful, also no errors at backend.

Comment 10 Bryan Kearney 2014-04-24 17:07:15 UTC
This was verified and delivered with MDP2. Closing it out.