Bug 1589736
| Summary: | Can not delete organization, if virt-who is configured | ||
|---|---|---|---|
| Product: | Red Hat Satellite | Reporter: | Anand Agrawal <aagrawal> |
| Component: | Virt-who Configure Plugin | Assignee: | Amit Upadhye <aupadhye> |
| Status: | CLOSED ERRATA | QA Contact: | Perry Gagne <pgagne> |
| Severity: | high | Docs Contact: | satellite-doc-list |
| Priority: | unspecified | ||
| Version: | 6.3.1 | CC: | aupadhye, mhulan, pcreech |
| Target Milestone: | 6.5.0 | Keywords: | Triaged |
| Target Release: | Unused | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
| Fixed In Version: | rubygem-foreman_virt_who_configure 0.3.0 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2019-05-14 12:37:23 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: | 1645144 | ||
| Bug Blocks: | |||
A valid bug, but the workaround should be trivial, delete all configurations for that organization first. Note that this would also destroy the service user that virt-who uses for authentication, so it basically make virt-who instance configuration invalid. But if you're deleting the organization, I guess that's not a problem and is kind of expected. Created redmine issue http://projects.theforeman.org/issues/23878 from this bug Interesting, could you grab a production.log from a moment when user clicks the delete button? The traceback from there might be useful. Verified fix in 6.5 snap 12 Created org "VDCOrg" Created/Deployed virt-who config waited for hypervisor reports, etc to come in. Deleted VDCOrg VDCOrg was deleted successfully. 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/RHSA-2019:1222 |
Description of problem: If `Virt-who Configurations` is created on Satellite. It is not possible to delete the organization. It throws, foreign key dependencies error as below: PG::Error: ERROR: update or delete on table "taxonomies" violates foreign key constraint "fk_rails_972e5a3807" on table "foreman_virt_who_configure_configs" DETAIL: Key (id)=(13) is still referenced from table "foreman_virt_who_configure_configs". : DELETE FROM "taxonomies" WHERE "taxonomies"."type" IN ('Organization') AND "taxonomies"."id" = $1 Version-Release number of selected component (if applicable): 6.3.1 How reproducible: Always Steps to Reproduce: 1. Create any Organization. example: 'Test Org' 2. Switch to the 'Test Org' 3. GoTo Infrastructure -> Virt-who Configurations -> Create config 4. Insert mandatory field and submit. 5. Now switch to other organization to delte 'Test Org' 6. Delete the organization. Check the task, task will be in error state with the PG:ERROR Actual results: PG::Error: ERROR: update or delete on table "taxonomies" violates foreign key constraint "fk_rails_972e5a3807" on table "foreman_virt_who_configure_configs" DETAIL: Key (id)=(13) is still referenced from table "foreman_virt_who_configure_configs". : DELETE FROM "taxonomies" WHERE "taxonomies"."type" IN ('Organization') AND "taxonomies"."id" = $1 Expected results: Organization should be deleted without error. Additional info: