Bug #24310
closedNo notification and 500 ISE while disabling repository included in published content view
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1595826
Description of problem: While trying to disable repository which has already been included in a published Content View, no notification for user in UI and production.log shows 500 internal server error.
Version-Release number of selected component (if applicable): Satellite 6.4 snap 9- rpm -q satellite
satellite-6.4.0-9.beta.el7sat.noarch
How reproducible: always
Steps to Reproduce:
1. Go to content -> red hat repositories page
2. Try to disable any repo which is included in content view.
Actual results: No warning/notification in UI and log shows
GET: https://<satellite_hostname>/pulp/api/v2/users/: {"content_type"=>"application/json", "accept"=>"application/json"}
Response: 200: [{"_id": {"$oid": "5b2f5d6b2c4873df9935f858"}, "name": "admin", "roles": ["super-users"], "_ns": "users", "login": "admin", "_href": "/pulp/api/v2/users/admin/"}]
2018-06-27T10:45:53 [I|app|4c4df] Current user: admin (administrator)
2018-06-27T10:45:53 [I|aud|4c4df] destroy event for Katello::Repository with id 2
2018-06-27T10:45:53 [E|bac|4c4df] Repository cannot be deleted since it has already been included in a published Content View. Please delete all Content View versions containing this repository before attempting to delete it. (RuntimeError)
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.7.0.rc1/app/models/katello/model.rb:8:in `destroy!'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.7.0.rc1/app/lib/actions/katello/repository/destroy.rb:27:in `block in plan'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.0.5/lib/dynflow/execution_plan.rb:376:in `switch_flow'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.0.5/lib/dynflow/action.rb:401:in `sequence'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.7.0.rc1/app/lib/actions/katello/repository/destroy.rb:26:in `plan'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.0.5/lib/dynflow/action.rb:493:in `block (3 levels) in execute_plan'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.0.5/lib/dynflow/middleware/stack.rb:26:in `pass'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.0.5/lib/dynflow/middleware.rb:18:in `pass'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-0.13.2/app/lib/actions/middleware/keep_current_user.rb:10:in `block in plan'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-0.13.2/app/lib/actions/middleware/keep_current_user.rb:31
Expected results: Notification/warning with message
"Repository cannot be disabled since it has already been included in a published Content View."
Additional info:
Updated by The Foreman Bot over 6 years ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/Katello/katello/pull/7562 added
Updated by John Mitsch over 6 years ago
- Status changed from Ready For Testing to Closed
Applied in changeset katello|6c19cff5b5c4952c60fefaf5ab662a98bbe89423.
Updated by Andrew Kofink over 6 years ago
- Target version set to Katello 3.7.1
- Triaged changed from No to Yes