Bug #15149
closedMissing warning when trying to delete organization with assigned hosts
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1336004
Description of problem:
I've created a bunch of organizations using CI box (api/test_host) 54 random orgs each one with random hosts assigned.
Then I tried to manually (in webUI using Any Organization context) delete some of those organizations, the task was scheduled but quickly failed with the error.
"<org_name> is being used by a hidden Host::Managed resource"
after that I was not able to move to another page, neither login again using the same admin user. because it raised the error:
"Oops, we're sorry but something went wrong Katello::Resources::Candlepin::OwnerInfo: 404 Resource Not Found {"displayMessage":"Organization with id 957338dd-7cf9-4356-9029-5e71ddad1f32 could not be found.","requestUuid":"eb1133f1-20bc-40c6-8545-cfcc8e01c7bc"} (GET /candlepin/owners/957338dd-7cf9-4356-9029-5e71ddad1f32/info)"
So I needed to login again using a different admin user in order to see the monitor->tasks page
I've tried with a lot of organizations having hosts assigned and the same error.
Version-Release number of selected component (if applicable):
How reproducible:
CI and standalone robottelo automation
Steps to Reproduce:
1. Create a bunch of organizations with assigned hosts (robottelo api/test_host suite)
2. Create a new admin user and log in with this
3. Go manually in webUI (any organization context) to manage organizations and try to delete any organization with at least one host assigned.
Actual results:
Task fails "<org_name> is being used by a hidden Host::Managed resource"
User cannot login anymore
Expected results:
Organization entity is deleted and deletion is cascaded to its assigned hosts
Additional info:
RHEL 7 - Sat 6.2 - snap 11