[ovirt-devel] engine-setup upgrade issue: insert or update on table "cluster" violates foreign key constraint "cluster_default_network_provider_id_fkey"
Dominik Holler
dholler at redhat.com
Thu Sep 28 09:49:00 UTC 2017
Hi all,
I introduced an possible upgrade issue in engine-setup.
If engine-setup fails on upgrading the db with:
[ ERROR ] Failed to execute stage 'Misc configuration': insert or
update on table "cluster" violates foreign key constraint
"cluster_default_network_provider_id_fkey" DETAIL: Key
(default_network_provider_id)=(b32f7988-ca21-4d1b-b116-55d3f5794534) is
not present in table "providers".
please create the missing provider in sql by:
select InsertProvider(
v_id:='b32f7988-ca21-4d1b-b116-55d3f5794534',
v_name:='ovirt-provider-ovn',
v_description:='oVirt network provider for OVN',
v_url:='https://localhost:9696',
v_provider_type:='EXTERNAL_NETWORK',
v_auth_required:=False,
v_auth_username:=null,
v_auth_password:=null,
v_custom_properties:=null,
v_auth_url:=null
);
Please change the id of the new provider to the id logged in the error
message.
A suitable SQL prompt can by created by
sudo su - postgres -c "psql -U postgres engine"
I am going to post a patch which will fix this issue.
This issue arises if the ovirt-provider-ovn created be engine-setup is
gone, e.g. manually removed.
Dominik
More information about the Devel
mailing list