oVirt / ovirt-engine

The oVirt Engine virtualization manager
Other
519 stars 271 forks source link

engine upgrade fails when db tables are owned indirectly #841

Closed betanummeric closed 1 year ago

betanummeric commented 1 year ago

Apparently, ovirt-engine insists on having the user used for database connections own all postgres objects directly:

Failed to execute stage 'Setup validation': Cannot upgrade the Engine database schema due to wrong ownership of some database entities.

The error is raised here: https://github.com/oVirt/ovirt-engine/blob/a65cf0eae8858ab2278c3f537dc427e3ff20eba7/packaging/setup/plugins/ovirt-engine-setup/ovirt-engine/db/schema.py#L298-L343

I'd like to put the postgres user in a postgres group and make that group owner of the tables etc. This makes it possible to share owner privileges with other users. The ovirt-engine user would still have full privileges, but the check fails, due to the rol.rolname != %(user)s.

My request is to let the check succeed also when the user is a member of the owner role.

betanummeric commented 1 year ago

resolved by PR #842