Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
I have the error to delete a Content View. The error message is too generic to help the end user to solve the problem.
Please extend the error message with details of the list dependent hosts that are preventing the deletion.
Action:
Actions::Katello::ContentView::Destroy
Input:
{"content_view"=>
{"id"=>96,
"name"=>"hg-crash::Infra::IPSWeb",
"label"=>"hg-crash__Infra__IPSWeb"},
"organization"=>{"id"=>3, "name"=>"Hilti", "label"=>"Hilti"},
"remote_user"=>"hoici-53fba4ca",
"remote_cp_user"=>"hoici",
"locale"=>"en"}
Output:
{}
Exception:
ActiveRecord::DeleteRestrictionError: Cannot delete record because of dependent hosts
Backtrace:
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/associations/builder/has_many.rb:63:in `block in define_restrict_dependency_method'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:517:in `_run__341289337038255713__destroy__217011182686457229__callbacks'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:405:in `__run_callback'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:385:in `_run_destroy_callbacks'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:81:in `run_callbacks'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/callbacks.rb:254:in `destroy'
This does not
Version-Release number of selected component (if applicable):
How reproducible:
Steps to Reproduce:
1. Delete content view that has dependent hosts
2.
3.
Actual results:
Unspecified error
Expected results:
Details on the error which hosts are preventing the deletion
Additional info:
(In reply to Pavel Moravec from comment #1)
> Setting #c0 private since it has customer name.
Ah, I havent checked who reported the bug, reverting the change, sorry :)
Anyway this has been fixed in ruby193-rubygem-katello-2.2.0.81-1.el7sat.noarch / Satellite 6.1.6 I have (maybe sooner, not sure what 6.1.z upstaed this package).
Now production.log and also any error string has something like:
2016-02-03 14:24:28 [E] RuntimeError: Cannot delete 'cv_2' due to associated environments: Library. Cannot delete 'cv_2' due to associated systems: pmoravec-rhel6.gsslab.brq.redhat.com.
Please check if it works as expected.
Closing. I cannot reproduce it anymore. I now always get the error message mentioned in Comment 2.
I expect my situation at that time was the result of other failures.
Description of problem: I have the error to delete a Content View. The error message is too generic to help the end user to solve the problem. Please extend the error message with details of the list dependent hosts that are preventing the deletion. Action: Actions::Katello::ContentView::Destroy Input: {"content_view"=> {"id"=>96, "name"=>"hg-crash::Infra::IPSWeb", "label"=>"hg-crash__Infra__IPSWeb"}, "organization"=>{"id"=>3, "name"=>"Hilti", "label"=>"Hilti"}, "remote_user"=>"hoici-53fba4ca", "remote_cp_user"=>"hoici", "locale"=>"en"} Output: {} Exception: ActiveRecord::DeleteRestrictionError: Cannot delete record because of dependent hosts Backtrace: /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/associations/builder/has_many.rb:63:in `block in define_restrict_dependency_method' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:517:in `_run__341289337038255713__destroy__217011182686457229__callbacks' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:405:in `__run_callback' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:385:in `_run_destroy_callbacks' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:81:in `run_callbacks' /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/callbacks.rb:254:in `destroy' This does not Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. Delete content view that has dependent hosts 2. 3. Actual results: Unspecified error Expected results: Details on the error which hosts are preventing the deletion Additional info: