Bug 1183114
Summary: | Satellite 6.0 manifest cannot be refreshed after updating entitlements | ||
---|---|---|---|
Product: | Red Hat Satellite | Reporter: | Andrew Sanders <asanders> |
Component: | Subscription Management | Assignee: | David Davis <daviddavis> |
Status: | CLOSED ERRATA | QA Contact: | Katello QA List <katello-qa-list> |
Severity: | high | Docs Contact: | |
Priority: | high | ||
Version: | 6.0.4 | CC: | bbuckingham, bkearney, chrobert, cwelton, daviddavis, jaudet, jmontleo, jturel, mmccune, xdmoon |
Target Milestone: | Unspecified | Keywords: | Triaged |
Target Release: | Unused | ||
Hardware: | All | ||
OS: | Linux | ||
URL: | http://projects.theforeman.org/issues/9011 | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2015-02-20 18:32:20 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: | 1115190 |
Description
Andrew Sanders
2015-01-16 17:52:17 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. I reproduced this on master. Steps: 1. Create a manifest. Add an entitlement. 2. Upload your manifest to Sat 6 3. Import some repos 4. Go back to your manifest in the portal and remove your entitlement. 5. Refresh your manifest. Error: Error during manifest refresh: {"displayMessage"=>"Cannot delete record because of dependent repositories", "conflicts"=>["UNKNOWN"]} Cannot delete record because of dependent repositories (ActiveRecord::DeleteRestrictionError) /home/dadavis/.rvm/gems/ruby-2.0.0-p594@foreman/gems/activerecord-3.2.21/lib/active_record/associations/builder/has_many.rb:63:in `block in define_restrict_depe ndency_method' /home/dadavis/.rvm/gems/ruby-2.0.0-p594@foreman/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:419:in `block in _run__2267080065653584473__destroy__4 328099252031340246__callbacks' /home/dadavis/.rvm/gems/ruby-2.0.0-p594@foreman/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:215:in `block in _conditional_callback_around_12651' /home/dadavis/Projects/katello/app/models/katello/glue.rb:47:in `on_destroy' /home/dadavis/.rvm/gems/ruby-2.0.0-p594@foreman/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:214:in `_conditional_callback_around_12651' /home/dadavis/.rvm/gems/ruby-2.0.0-p594@foreman/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:403:in `_run__2267080065653584473__destroy__4328099252 031340246__callbacks' /home/dadavis/.rvm/gems/ruby-2.0.0-p594@foreman/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:405:in `__run_callback' /home/dadavis/.rvm/gems/ruby-2.0.0-p594@foreman/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:385:in `_run_destroy_callbacks' /home/dadavis/.rvm/gems/ruby-2.0.0-p594@foreman/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:81:in `run_callbacks' /home/dadavis/.rvm/gems/ruby-2.0.0-p594@foreman/gems/activerecord-3.2.21/lib/active_record/callbacks.rb:254:in `destroy' /home/dadavis/.rvm/gems/ruby-2.0.0-p594@foreman/gems/activerecord-3.2.21/lib/active_record/transactions.rb:254:in `block in destroy' /home/dadavis/.rvm/gems/ruby-2.0.0-p594@foreman/gems/activerecord-3.2.21/lib/active_record/transactions.rb:313:in `block in with_transaction_returning_status' /home/dadavis/.rvm/gems/ruby-2.0.0-p594@foreman/gems/activerecord-3.2.21/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in `transacti on' /home/dadavis/.rvm/gems/ruby-2.0.0-p594@foreman/gems/activerecord-3.2.21/lib/active_record/transactions.rb:208:in `transaction' /home/dadavis/.rvm/gems/ruby-2.0.0-p594@foreman/gems/activerecord-3.2.21/lib/active_record/transactions.rb:311:in `with_transaction_returning_status' /home/dadavis/.rvm/gems/ruby-2.0.0-p594@foreman/gems/activerecord-3.2.21/lib/active_record/transactions.rb:254:in `destroy' /home/dadavis/Projects/katello/app/models/katello/glue.rb:93:in `destroy' /home/dadavis/Projects/katello/app/models/katello/glue/provider.rb:322:in `block in import_products_from_cp' /home/dadavis/Projects/katello/app/models/katello/glue/provider.rb:322:in `each' /home/dadavis/Projects/katello/app/models/katello/glue/provider.rb:322:in `import_products_from_cp' /home/dadavis/Projects/katello/app/models/katello/glue.rb:176:in `execute' /home/dadavis/Projects/katello/app/models/katello/glue.rb:126:in `block in process' /home/dadavis/Projects/katello/app/models/katello/glue.rb:113:in `each' /home/dadavis/Projects/katello/app/models/katello/glue.rb:113:in `process' /home/dadavis/Projects/katello/app/models/katello/glue.rb:35:in `on_save' /home/dadavis/.rvm/gems/ruby-2.0.0-p594@foreman/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:214:in `_conditional_callback_around_10413' [166/1942] /home/dadavis/.rvm/gems/ruby-2.0.0-p594@foreman/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:403:in `_run__1305189568191205195__save__4328099252031 340246__callbacks' /home/dadavis/.rvm/gems/ruby-2.0.0-p594@foreman/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:405:in `__run_callback' /home/dadavis/.rvm/gems/ruby-2.0.0-p594@foreman/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:385:in `_run_save_callbacks' /home/dadavis/.rvm/gems/ruby-2.0.0-p594@foreman/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:81:in `run_callbacks' /home/dadavis/.rvm/gems/ruby-2.0.0-p594@foreman/gems/activerecord-3.2.21/lib/active_record/callbacks.rb:264:in `create_or_update' /home/dadavis/.rvm/gems/ruby-2.0.0-p594@foreman/gems/activerecord-3.2.21/lib/active_record/persistence.rb:104:in `save!' /home/dadavis/.rvm/gems/ruby-2.0.0-p594@foreman/gems/activerecord-3.2.21/lib/active_record/validations.rb:56:in `save!' /home/dadavis/.rvm/gems/ruby-2.0.0-p594@foreman/gems/activerecord-3.2.21/lib/active_record/attribute_methods/dirty.rb:33:in `save!' /home/dadavis/.rvm/gems/ruby-2.0.0-p594@foreman/gems/activerecord-3.2.21/lib/active_record/transactions.rb:264:in `block in save!' /home/dadavis/.rvm/gems/ruby-2.0.0-p594@foreman/gems/activerecord-3.2.21/lib/active_record/transactions.rb:313:in `block in with_transaction_returning_status' /home/dadavis/.rvm/gems/ruby-2.0.0-p594@foreman/gems/activerecord-3.2.21/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in `transacti on' /home/dadavis/.rvm/gems/ruby-2.0.0-p594@foreman/gems/activerecord-3.2.21/lib/active_record/transactions.rb:208:in `transaction' /home/dadavis/.rvm/gems/ruby-2.0.0-p594@foreman/gems/activerecord-3.2.21/lib/active_record/transactions.rb:311:in `with_transaction_returning_status' /home/dadavis/.rvm/gems/ruby-2.0.0-p594@foreman/gems/activerecord-3.2.21/lib/active_record/transactions.rb:264:in `save!' /home/dadavis/Projects/katello/app/models/katello/glue/provider.rb:260:in `queue_import_manifest' /home/dadavis/Projects/katello/app/models/katello/glue/provider.rb:40:in `refresh_manifest' /home/dadavis/Projects/katello/app/lib/actions/katello/provider/manifest_refresh.rb:37:in `run' /home/dadavis/.rvm/gems/ruby-2.0.0-p594@foreman/gems/dynflow-0.7.5/lib/dynflow/action.rb:456:in `block (3 levels) in execute_run' /home/dadavis/.rvm/gems/ruby-2.0.0-p594@foreman/gems/dynflow-0.7.5/lib/dynflow/middleware/stack.rb:26:in `call' /home/dadavis/.rvm/gems/ruby-2.0.0-p594@foreman/gems/dynflow-0.7.5/lib/dynflow/middleware/stack.rb:26:in `pass' /home/dadavis/.rvm/gems/ruby-2.0.0-p594@foreman/gems/dynflow-0.7.5/lib/dynflow/middleware.rb:16:in `pass' /home/dadavis/Projects/katello/app/lib/actions/middleware/propagate_candlepin_errors.rb:21:in `block in run' /home/dadavis/Projects/katello/app/lib/actions/middleware/propagate_candlepin_errors.rb:31:in `propagate_candlepin_errors' /home/dadavis/Projects/katello/app/lib/actions/middleware/propagate_candlepin_errors.rb:21:in `run' /home/dadavis/.rvm/gems/ruby-2.0.0-p594@foreman/gems/dynflow-0.7.5/lib/dynflow/middleware/stack.rb:22:in `call' /home/dadavis/.rvm/gems/ruby-2.0.0-p594@foreman/gems/dynflow-0.7.5/lib/dynflow/middleware/stack.rb:26:in `pass' /home/dadavis/.rvm/gems/ruby-2.0.0-p594@foreman/gems/dynflow-0.7.5/lib/dynflow/middleware.rb:16:in `pass' /home/dadavis/Projects/katello/app/lib/actions/middleware/remote_action.rb:27:in `block in run' /home/dadavis/Projects/katello/app/lib/actions/middleware/remote_action.rb:57:in `block (2 levels) in as_remote_user' /home/dadavis/Projects/katello/app/lib/katello/util/thread_session.rb:84:in `pulp_config' /home/dadavis/Projects/katello/app/lib/actions/middleware/remote_action.rb:43:in `as_pulp_user' /home/dadavis/Projects/katello/app/lib/actions/middleware/remote_action.rb:56:in `block in as_remote_user' /home/dadavis/Projects/katello/app/lib/katello/util/thread_session.rb:91:in `cp_config' /home/dadavis/Projects/katello/app/lib/actions/middleware/remote_action.rb:38:in `as_cp_user' /home/dadavis/Projects/katello/app/lib/actions/middleware/remote_action.rb:55:in `as_remote_user' /home/dadavis/Projects/katello/app/lib/actions/middleware/remote_action.rb:27:in `run' /home/dadavis/.rvm/gems/ruby-2.0.0-p594@foreman/gems/dynflow-0.7.5/lib/dynflow/middleware/stack.rb:22:in `call' /home/dadavis/.rvm/gems/ruby-2.0.0-p594@foreman/gems/dynflow-0.7.5/lib/dynflow/middleware/stack.rb:26:in `pass' /home/dadavis/.rvm/gems/ruby-2.0.0-p594@foreman/gems/dynflow-0.7.5/lib/dynflow/middleware.rb:16:in `pass' /home/dadavis/.rvm/gems/ruby-2.0.0-p594@foreman/gems/dynflow-0.7.5/lib/dynflow/action/progress.rb:30:in `with_progress_calculation' /home/dadavis/.rvm/gems/ruby-2.0.0-p594@foreman/gems/dynflow-0.7.5/lib/dynflow/action/progress.rb:16:in `run' /home/dadavis/.rvm/gems/ruby-2.0.0-p594@foreman/gems/dynflow-0.7.5/lib/dynflow/middleware/stack.rb:22:in `call' /home/dadavis/.rvm/gems/ruby-2.0.0-p594@foreman/gems/dynflow-0.7.5/lib/dynflow/middleware/stack.rb:26:in `pass' /home/dadavis/.rvm/gems/ruby-2.0.0-p594@foreman/gems/dynflow-0.7.5/lib/dynflow/middleware.rb:16:in `pass' /home/dadavis/Projects/katello/app/lib/actions/middleware/keep_locale.rb:23:in `block in run' /home/dadavis/Projects/katello/app/lib/actions/middleware/keep_locale.rb:34:in `with_locale' Created redmine issue http://projects.theforeman.org/issues/9011 from this bug Created a patch for this bug: https://github.com/Katello/katello/pull/4944 Waiting on Mike McCune to test/review it. Created attachment 982538 [details]
debugs
Moving to POST since upstream bug http://projects.theforeman.org/issues/9011 has been closed ------------- David Davis Applied in changeset commit:katello|90f0f8e1f06401826f12e775765aef32eb3f3e16. Verified against two Satellite 6.0.8 systems, one running RHEL 6.6 and the other 7.0. Verification procedure: 1. In the portal, create a manifest and add a subscription to it. Download the manifest. 2. Upload the manifest to a satellite. 3. Sync some repositories provided by the manifest's subscriptions to the satellite. 4. In the portal, remove subscriptions from the manifest. 5. On the satellite, refresh the manifest. The outcome of the procedure is that all already-synced products are listed as orphaned. Snippet from /var/log/foreman/production.log: Orphaned Product id 9 found while refreshing/importing manifest. Orphaned Product id 10 found while refreshing/importing manifest. Orphaned Product id 11 found while refreshing/importing manifest. Orphaned Product id 12 found while refreshing/importing manifest. Orphaned Product id 13 found while refreshing/importing manifest. Orphaned Product id 14 found while refreshing/importing manifest. Orphaned Product id 15 found while refreshing/importing manifest. Orphaned Product id 16 found while refreshing/importing manifest. Orphaned Product id 17 found while refreshing/importing manifest. Orphaned Product id 18 found while refreshing/importing manifest. Orphaned Product id 19 found while refreshing/importing manifest. Orphaned Product id 20 found while refreshing/importing manifest. Orphaned Product id 21 found while refreshing/importing manifest. Orphaned Product id 22 found while refreshing/importing manifest. Orphaned Product id 23 found while refreshing/importing manifest. Orphaned Product id 24 found while refreshing/importing manifest. Orphaned Product id 25 found while refreshing/importing manifest. 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/RHBA-2015:0247 |