-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
remove user to prevent ForeignKeyViolation #17024
base: master
Are you sure you want to change the base?
remove user to prevent ForeignKeyViolation #17024
Conversation
114ce65
to
1c361a6
Compare
PRT Result
|
This sounds like a bug in the application to me. Was one filed? |
@ekohl |
If you see a PostgreSQL error as a user, I'd consider it a bug. IMHO it should either cascade (delete any permissions the user has) or provide a proper error why the user can't be deleted. |
A bug has already been raised for this issue - https://issues.redhat.com/browse/SAT-18656. |
1c361a6
to
e831eb0
Compare
PRT Result
|
PRT Result
|
PRT Result
|
b3943d2
to
ae01cf2
Compare
PRT Result
|
2e7f9ee
to
bac124b
Compare
PRT Result
|
bac124b
to
ac5c116
Compare
trigger: test-robottelo |
PRT Result
|
ac5c116
to
a71afda
Compare
trigger: test-robottelo |
PRT Result
|
Problem -
When creating another user with a specific role and adding resources in the filter with the 'view_facts' permission, an error occurred ('PG::ForeignKeyViolation: ERROR: update or delete on table "hosts" violates foreign key constraint "fact_values_host_id_fk" on table "fact_values"') during the teardown process while deleting the host. This happened because a user with only view permissions existed for the host and making it impossible to update or delete the user associated with the fact.
Solution -
To prevent this error, the user was removed before the teardown process.