Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
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
Classification: Red Hat
Component: Virt-who Configure Plugin
Version: 6.4
Hardware: x86_64
OS: Linux
high
high with 2 votes
Target Milestone: 6.5.0
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: 2023-10-06 17:58 UTC (History)
23 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
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 25863 0 High Closed Unable to delete virt-who configuration from satellite. 2020-10-14 13:23:11 UTC
Red Hat Knowledge Base (Solution) 3758721 0 None None None 2018-12-17 10:34:38 UTC
Red Hat Product Errata RHSA-2019:1222 0 None None None 2019-05-14 12:38:43 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.