Bug 1645144 - Unable to delete virt-who configuration from satellite.
Summary: Unable to delete virt-who configuration from satellite.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Virt-who Configure Plugin
Version: 6.4
Hardware: x86_64
OS: Linux
high
high with 2 votes vote
Target Milestone: Released
Assignee: Marek Hulan
QA Contact: Perry Gagne
satellite-doc-list
URL:
Whiteboard:
Depends On:
Blocks: 1589736
TreeView+ depends on / blocked
 
Reported: 2018-11-01 13:41 UTC by Suraj Patil
Modified: 2019-10-07 17:17 UTC (History)
21 users (show)

Fixed In Version: tfm-rubygem-foreman_virt_who_configure-0.3.2
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-05-14 12:38:32 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2019:1222 None None None 2019-05-14 12:38:43 UTC
Foreman Issue Tracker 25863 None None None 2019-01-15 12:29:43 UTC
Red Hat Knowledge Base (Solution) 3758721 None None None 2018-12-17 10:34:38 UTC

Description Suraj Patil 2018-11-01 13:41:13 UTC
Description of problem:

Getting below error while deleting the virt-who configuration from satellite.

--------------------------------------------------------------------

ActiveRecord::InvalidForeignKey: PG::ForeignKeyViolation: ERROR: update or delete on table "users" violates foreign key constraint "fk_rails_51975e21a8" on table "notification_recipients"
DETAIL: Key (id)=(11) is still referenced from table "notification_recipients".
: DELETE FROM "users" WHERE "users"."id" = $1

--------------------------------------------------------------------

This error occurred because when we delete virt-who configuration it tries to delete the virt_who_reporter user and satellite is unable to delete this user because there is user-id referenced in the notification_recipients table.


Actual results:
Unable to delete virt-who configuration.

Expected results:
Virt-who configuration should get deleted.

Comment 6 Marek Hulan 2018-12-19 14:47:13 UTC
It could be caused by existing audit records for a virt-who configuration. Potentially fixed by BZ 1589736

Comment 7 Marek Hulan 2018-12-19 14:48:49 UTC
Oh I see now you're able to reproduce this even with the linked BZ. So try to see if you can still delete the configuration after you update it. There might be some issue with audit. Also let me know what's you virt_who_configure plugin version you tested with.

Comment 9 Marek Hulan 2019-01-15 12:29:42 UTC
Created redmine issue https://projects.theforeman.org/issues/25863 from this bug

Comment 10 Bryan Kearney 2019-01-15 13:09:20 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/25863 has been resolved.

Comment 11 Bryan Kearney 2019-01-15 13:10:31 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/25863 has been resolved.

Comment 12 Bryan Kearney 2019-01-15 13:11:25 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/25863 has been resolved.

Comment 13 Bryan Kearney 2019-01-15 13:12:10 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/25863 has been resolved.

Comment 14 Bryan Kearney 2019-01-15 13:13:11 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/25863 has been resolved.

Comment 15 Bryan Kearney 2019-01-15 13:14:11 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/25863 has been resolved.

Comment 16 Bryan Kearney 2019-01-15 13:15:05 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/25863 has been resolved.

Comment 17 Bryan Kearney 2019-01-15 13:16:03 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/25863 has been resolved.

Comment 18 Bryan Kearney 2019-01-15 13:18:10 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/25863 has been resolved.

Comment 19 Perry Gagne 2019-01-24 15:41:07 UTC
Verified fix in 6.5 snap 12. 

Created/deployed a virt-who config, and waited for hypervisor reports to come in. 

Was able to delete the config.

Comment 31 errata-xmlrpc 2019-05-14 12:38:32 UTC
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


Note You need to log in before you can comment on or make changes to this bug.