Project

General

Profile

Actions

Bug #23878

closed

Can not delete organization, if virt-who is configured

Added by Marek Hulán over 6 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
-

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:

Actions

Also available in: Atom PDF