Bug 1129832

Summary: Can't delete org if it has Red Hat products and repositories
Product: Red Hat Satellite Reporter: David Davis <daviddavis>
Component: Content ManagementAssignee: Katello Bug Bin <katello-bugs>
Status: CLOSED WORKSFORME QA Contact: Corey Welton <cwelton>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.0.4CC: cwelton, mmccune, xdmoon
Target Milestone: Unspecified   
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-08-14 16:42:31 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 David Davis 2014-08-13 18:18:12 UTC
Description of problem:

I seem to get this error when deleting an org if it has Red Hat products and repositories:

Cannot delete record because of dependent repositories


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

6.0.4


How reproducible:

Always


Steps to Reproduce:
1. Create an org
2. Import a manifest, enable some products, sync those products
3. Delete this org


Actual results:

Error.


Expected results:

Successs.


Additional info:

Comment 1 RHEL Program Management 2014-08-13 18:23:00 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 3 David Davis 2014-08-14 16:36:45 UTC
I got passed the other error (turns out it was due to a locked task and a bad version of the gem 'oj') but now I get:

NoMethodError: undefined method `set_cp_config' for #<Class:0x0000000c861c88>

Weirdly, this looks like it's not defined on User. Here's a backtrace:

/home/dadavis/.rvm/gems/ruby-1.9.3-p545@foreman/gems/activerecord-3.2.18/lib/active_record/dynamic_matchers.rb:55:in `method_missing'
/home/dadavis/Projects/katello/app/lib/actions/middleware/remote_action.rb:36:in `as_cp_user'
/home/dadavis/Projects/katello/app/lib/actions/middleware/remote_action.rb:49:in `as_remote_user'
/home/dadavis/Projects/katello/app/lib/actions/middleware/remote_action.rb:29:in `finalize'
/home/dadavis/.rvm/gems/ruby-1.9.3-p545@foreman/gems/dynflow-0.7.3/lib/dynflow/middleware/stack.rb:22:in `call'
/home/dadavis/.rvm/gems/ruby-1.9.3-p545@foreman/gems/dynflow-0.7.3/lib/dynflow/middleware/stack.rb:26:in `pass'
/home/dadavis/.rvm/gems/ruby-1.9.3-p545@foreman/gems/dynflow-0.7.3/lib/dynflow/middleware.rb:16:in `pass'
/home/dadavis/.rvm/gems/ruby-1.9.3-p545@foreman/gems/dynflow-0.7.3/lib/dynflow/action/progress.rb:30:in `with_progress_calculation'
/home/dadavis/.rvm/gems/ruby-1.9.3-p545@foreman/gems/dynflow-0.7.3/lib/dynflow/action/progress.rb:22:in `finalize'
/home/dadavis/.rvm/gems/ruby-1.9.3-p545@foreman/gems/dynflow-0.7.3/lib/dynflow/middleware/stack.rb:22:in `call'
/home/dadavis/.rvm/gems/ruby-1.9.3-p545@foreman/gems/dynflow-0.7.3/lib/dynflow/middleware/stack.rb:26:in `pass'
/home/dadavis/.rvm/gems/ruby-1.9.3-p545@foreman/gems/dynflow-0.7.3/lib/dynflow/middleware.rb:16:in `pass'
/home/dadavis/Projects/katello/app/lib/actions/middleware/keep_locale.rb:28:in `block in finalize'
/home/dadavis/Projects/katello/app/lib/actions/middleware/keep_locale.rb:35:in `with_locale'
/home/dadavis/Projects/katello/app/lib/actions/middleware/keep_locale.rb:28:in `finalize'
/home/dadavis/.rvm/gems/ruby-1.9.3-p545@foreman/gems/dynflow-0.7.3/lib/dynflow/middleware/stack.rb:22:in `call'
/home/dadavis/.rvm/gems/ruby-1.9.3-p545@foreman/gems/dynflow-0.7.3/lib/dynflow/middleware/world.rb:30:in `execute'
/home/dadavis/.rvm/gems/ruby-1.9.3-p545@foreman/gems/dynflow-0.7.3/lib/dynflow/action.rb:464:in `block in execute_finalize'
/home/dadavis/.rvm/gems/ruby-1.9.3-p545@foreman/gems/dynflow-0.7.3/lib/dynflow/action.rb:365:in `call'
/home/dadavis/.rvm/gems/ruby-1.9.3-p545@foreman/gems/dynflow-0.7.3/lib/dynflow/action.rb:365:in `block in with_error_handling'
/home/dadavis/.rvm/gems/ruby-1.9.3-p545@foreman/gems/dynflow-0.7.3/lib/dynflow/action.rb:365:in `catch'
/home/dadavis/.rvm/gems/ruby-1.9.3-p545@foreman/gems/dynflow-0.7.3/lib/dynflow/action.rb:365:in `with_error_handling'
/home/dadavis/.rvm/gems/ruby-1.9.3-p545@foreman/gems/dynflow-0.7.3/lib/dynflow/action.rb:463:in `execute_finalize'
/home/dadavis/.rvm/gems/ruby-1.9.3-p545@foreman/gems/dynflow-0.7.3/lib/dynflow/action.rb:230:in `execute'
/home/dadavis/.rvm/gems/ruby-1.9.3-p545@foreman/gems/dynflow-0.7.3/lib/dynflow/execution_plan/steps/abstract_flow_step.rb:9:in `block (2 levels) in execute'
/home/dadavis/.rvm/gems/ruby-1.9.3-p545@foreman/gems/dynflow-0.7.3/lib/dynflow/execution_plan/steps/abstract.rb:152:in `call'
/home/dadavis/.rvm/gems/ruby-1.9.3-p545@foreman/gems/dynflow-0.7.3/lib/dynflow/execution_plan/steps/abstract.rb:152:in `with_meta_calculation'
/home/dadavis/.rvm/gems/ruby-1.9.3-p545@foreman/gems/dynflow-0.7.3/lib/dynflow/execution_plan/steps/abstract_flow_step.rb:8:in `block in execute'
/home/dadavis/.rvm/gems/ruby-1.9.3-p545@foreman/gems/dynflow-0.7.3/lib/dynflow/execution_plan/steps/abstract_flow_step.rb:22:in `open_action'
/home/dadavis/.rvm/gems/ruby-1.9.3-p545@foreman/gems/dynflow-0.7.3/lib/dynflow/execution_plan/steps/abstract_flow_step.rb:7:in `execute'
/home/dadavis/.rvm/gems/ruby-1.9.3-p545@foreman/gems/dynflow-0.7.3/lib/dynflow/executors/parallel/sequential_manager.rb:72:in `run_step'
/home/dadavis/.rvm/gems/ruby-1.9.3-p545@foreman/gems/dynflow-0.7.3/lib/dynflow/executors/parallel/sequential_manager.rb:57:in `dispatch'
/home/dadavis/.rvm/gems/ruby-1.9.3-p545@foreman/gems/dynflow-0.7.3/lib/dynflow/executors/parallel/sequential_manager.rb:64:in `block in run_in_sequence'
/home/dadavis/.rvm/gems/ruby-1.9.3-p545@foreman/gems/dynflow-0.7.3/lib/dynflow/executors/parallel/sequential_manager.rb:64:in `each'
/home/dadavis/.rvm/gems/ruby-1.9.3-p545@foreman/gems/dynflow-0.7.3/lib/dynflow/executors/parallel/sequential_manager.rb:64:in `all?'
/home/dadavis/.rvm/gems/ruby-1.9.3-p545@foreman/gems/dynflow-0.7.3/lib/dynflow/executors/parallel/sequential_manager.rb:64:in `run_in_sequence'
/home/dadavis/.rvm/gems/ruby-1.9.3-p545@foreman/gems/dynflow-0.7.3/lib/dynflow/executors/parallel/sequential_manager.rb:53:in `dispatch'
/home/dadavis/.rvm/gems/ruby-1.9.3-p545@foreman/gems/dynflow-0.7.3/lib/dynflow/executors/parallel/sequential_manager.rb:28:in `block (2 levels) in finalize'
/home/dadavis/.rvm/gems/ruby-1.9.3-p545@foreman/gems/dynflow-0.7.3/lib/dynflow/middleware/stack.rb:26:in `call'
...

Comment 4 David Davis 2014-08-14 16:42:31 UTC
Nevermind, I think somehow my UserExtensions weren't getting loaded. Seems to be working after reseting my env