Bug #23878
closedCan not delete organization, if virt-who is configured
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1589736
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:
Updated by Amit Upadhye about 6 years ago
- Subject changed from Can not delete organization, if virt-who is configured to Can not delete organization, if virt-who is configured
- Assignee changed from Marek Hulán to Amit Upadhye
Updated by The Foreman Bot about 6 years ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/foreman_virt_who_configure/pull/90 added
Updated by Marek Hulán almost 6 years ago
- Fixed in Releases foreman_virt_who_configure-0.3 added
Updated by Amit Upadhye almost 6 years ago
- Status changed from Ready For Testing to Closed
Applied in changeset foreman_virt_who_configure|23c5a30d3bc2d8326383290442d6608468e54677.
Updated by The Foreman Bot almost 6 years ago
- Pull request https://github.com/theforeman/foreman_virt_who_configure/pull/96 added