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.
It could be caused by existing audit records for a virt-who configuration. Potentially fixed by BZ 1589736
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.
Created redmine issue https://projects.theforeman.org/issues/25863 from this bug
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/25863 has been resolved.
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.
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