[ovirt-users] Unable to remove host (SQL error)
Jannick DelOro
jdeloro at web.de
Mon Apr 27 05:10:40 EDT 2015
Hello Eli,
> > > > > I'm unable to remove a re-installed host from oVirt 3.5 cluster. The
> > > > > engine.log states:
> > > > >
> > > > > 2015-04-26 21:19:27,795 ERROR
> > > > > [org.ovirt.engine.core.bll.RemoveVdsCommand]
> > > > > (org.ovirt.thread.pool-8-thread-43) [34db91ae] Command
> > > > > org.ovirt.engine.core.bll.RemoveVdsCommand throw exception:
> > > > > org.springframework.dao.DataIntegrityViolationException:
> > > > > CallableStatementCallback; SQL [{call deletevdsstatic(?)}]; ERROR:
> > > > > update
> > > > > or
> > > > > delete on table "vds_static" violates foreign key constraint
> > > > > "vds_static_vm_dynamic_m" on table "vm_dynamic"
> > > > > Detail: Key (vds_id)=(629ca86d-f6a6-4702-bf0f-182af3df3b8c) is still
> > > > > referenced from table "vm_dynamic".
> > > > > Where: SQL statement "DELETE FROM vds_static WHERE vds_id = $1 "
> > > > > PL/pgSQL function "deletevdsstatic" line 11 at SQL statement; nested
> > > > > exception is org.postgresql.util.PSQLException: ERROR: update or delete
> > > > > on
> > > > > table "vds_static" violates foreign key constraint
> > > > > "vds_static_vm_dynamic_m"
> > > > > on table "vm_dynamic"
> > > > > Detail: Key (vds_id)=(629ca86d-f6a6-4702-bf0f-182af3df3b8c) is still
> > > > > referenced from table "vm_dynamic".
> > > > > Where: SQL statement "DELETE FROM vds_static WHERE vds_id = $1 "
> > > > > PL/pgSQL function "deletevdsstatic" line 11 at SQL statement
> > > > > at
> > > > > org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:245)
> > > > > [spring-jdbc.jar:3.1.1.RELEASE]
> > > > > at
> > > > > org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72)
> > > > > [spring-jdbc.jar:3.1.1.RELEASE]
> > > > > [...]
> > > > >
> > > > > The host re-installed (Kickstart) before.
> > > >
> > > > Hi
> > > >
> > > > this should not happen, please open a bug for that and attach the full
> > > > engine
> > > > log
> > > >
> > > > >
> > > > > What can I do to remove the host (via Webinterface) or database
> > > > > interaction?
> > > >
> > > > from psql prompt
> > > >
> > > > > select DeleteVds('629ca86d-f6a6-4702-bf0f-182af3df3b8c');
> > >
> > >
> > > Looking again in the messages
> > > Seems you still have running VMs on this hots , can you put it first to
> > > maintenance and try the removale again before touching the DB ???
> >
> > No, the host is in maintenance mode and no VM is running on this host.
> >
> > But here is what has happened before:
> >
> > - VM on host got unresponsive. Was unable to migrate or power off.
> > - Host was restarted and clicked "Confirm "Host has been rebooted"".
> > - Faulty VM was started on different host.
> > - Host was put to maintenance mode.
> > - Host was re-installed via Kickstart.
> > - Trying to remove host from Cluster (due to change in address). Doesn't
> > work.
> > - Host was re-installed via oVirt web interface.
> > - Trying to remove host from Cluster. Doesn't work.
>
>
> Well, please open a BZ first with the full scenario you described above plus engine log
Will do.
> To resolve your current problem, please do from database prompt
>
> > update vm_dynamic set status=0, migrating_to_vds = null where migrating_to_vds = '629ca86d-f6a6-4702-bf0f-182af3df3b8c';
>
>
> After that, please try to remove again your host from the UI
I was able to remove the Host via UI after above mentioned database action. Thanks!
Kind regards
Jannick
More information about the Users
mailing list