El Domingo, 6 de Julio de 2014 07.06 CLT, Arik Hadas <[email protected]> Ha escrito:
----- Original Message -----
> On 04/07/14 14:45, Oved Ourfali wrote:
> > Is there a migration of this VM in progress? Did it migrate recently?
> Thank you Oved, I have already solved the problem, I have posted the
> solution to the list.
>
> However I don't understand how the data is recorded in the table
> "vm_dyanmic".
>
> I guess that in this table the engine records the current status data of
> the vm's in the datacenter. In my engine DB almost all the registries in
> the "vm_dynamic" table have a vm id in the "migrating_to_vds" field,
> this id is the same in the "run_on_vds" field.
>
> Is it right that the "migrating_to_vds" field have a value after the vm
&g t; has been migrated??
Yes, we're about to fix it.
Note that there is an open bug for this issue:
https://bugzilla.redhat.com/show_bug.cgi?id=1112359
If you will be able to provide the info I've asked for there,
it could help us to solve it faster :)
Arik
>
> My setup:
>
> oVirt Engine Version: 3.4.0-1.el6
> Nodes (vds's, hosts, etc.): Centos 6.5 ovirt-node 3.4, vdsm-4.14.6-0.el6
>
> Thank you, and happy weekend!
>
> Federico
> > I suggest to attach the engine log here as well, if possible, for
> > examination. Cc-ing some guys that might help but bare in mind that for
> > some of them it is already weekend.
> >
> > Oved
> >
> > On Jul 4, 2014 6:07 PM, Federico Alberto Sayd wrote:
> >> Hello People:
> >>
> >> I am trying t o remove a host from ovirt-engine but I have fouHello People:
> > I am trying to remove a host from ovirt-engine but I have found that a
> > orphaned record in the engine DB prevents the removal of the host.
> > The host is in maintenance mode, it doesn't have vm's running on it.
> > The engine logs says that there is a reference to the id of the host
> > (vds_id in the table vds_static) in the field "migrating_to_vds" in the
> > table "dynamic_vds". Obviously this is a orphaned record, but a
> > constraint in the table "dynamic_vds" prevents the removal of the host.
> > How can I solve this?
> > Someone that knows the internals of engine's DB that can confirm if I
> > can remove the problematic registry in order to remove the host??
> > Another solution?
> >
> > I really need to remove this h ost. Please help and
> >
> > Thanks!
> > _______________________________________________
> > Users mailing list
> > [email protected]
> > http://lists.ovirt.org/mailman/listinfo/user
Indeed, you are right, is the same bug. I didn't find this bug when googled the problem. I have attached an extract of the logs when I tried to remove the host, it looks identical to the logs reported in the bug except that postgres transactions are logged in Spanish.
I will try to find the log entry when the vm was migrated and the value was not correctly updated in the "migrating_to_vds" field. I think that that is the more critical bug.
Thank you
Federico
: false. Entities affected : ID: c212c0a9-a784-4958-bad1-eb3a95b8c9da Type: VDS
2014-07-03 16:14:59,768 INFO [org.ovirt.engine.core.vdsbroker.SetVdsStatusVDSCommand] (org.ovirt.thread.pool-6-thread-18) [48ec807b] START, SetVdsStatusVDSCommand(HostName = ov-nodo2, HostId
= c212c0a9-a784-4958-bad1-eb3a95b8c9da, status=PreparingForMaintenance, nonOperationalReason=NONE, stopSpmFailureLogged=true), log id: 5220b0cb
2014-07-03 16:14:59,774 INFO [org.ovirt.engine.core.vdsbroker.SetVdsStatusVDSCommand] (org.ovirt.thread.pool-6-thread-18) [48ec807b] FINISH, SetVdsStatusVDSCommand, log id: 5220b0cb
2014-07-03 16:14:59,851 INFO [org.ovirt.engine.core.bll.MaintenanceVdsCommand] (org.ovirt.thread.pool-6-thread-18) [48ec807b] Running command: MaintenanceVdsCommand internal: true. Entities a
ffected : ID: c212c0a9-a784-4958-bad1-eb3a95b8c9da Type: VDS
2014-07-03 16:14:59,863 INFO [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (org.ovirt.thread.pool-6-thread-18) [48ec807b] Correlation ID: 48ec807b, Job ID: 8d38ddb4-e
68f-4d0c-83d7-e2ebd085f337, Call Stack: null, Custom Event ID: -1, Message: Host ov-nodo2 was switched to Maintenance mode by fsayd.
2014-07-03 16:15:01,943 INFO [org.ovirt.engine.core.vdsbroker.VdsUpdateRunTimeInfo] (DefaultQuartzScheduler_Worker-3) Updated vds status from Preparing for Maintenance to Maintenance in datab
ase, vds = c212c0a9-a784-4958-bad1-eb3a95b8c9da : ov-nodo2
2014-07-03 16:15:01,963 INFO [org.ovirt.engine.core.vdsbroker.irsbroker.IrsBrokerCommand] (org.ovirt.thread.pool-6-thread-36) Clearing cache of pool: a686da64-af46-435a-a7e9-3f597e9da802 for problematic entities of VDS: ov-nodo2.
2014-07-03 16:15:01,969 INFO [org.ovirt.engine.core.vdsbroker.vdsbroker.DisconnectStoragePoolVDSCommand] (DefaultQuartzScheduler_Worker-3) START, DisconnectStoragePoolVDSCommand(HostName = ov-nodo2, HostId = c212c0a9-a784-4958-bad1-eb3a95b8c9da, storagePoolId = a686da64-af46-435a-a7e9-3f597e9da802, vds_spm_id = 2), log id: 73e82ba8
2014-07-03 16:15:05,456 INFO [org.ovirt.engine.core.bll.RemoveVdsCommand] (ajp--127.0.0.1-8702-29) [7f3139c7] Lock Acquired to object EngineLock [exclusiveLocks= key: c212c0a9-a784-4958-bad1-eb3a95b8c9da value: VDS
, sharedLocks= ]
2014-07-03 16:15:05,467 INFO [org.ovirt.engine.core.bll.RemoveVdsCommand] (org.ovirt.thread.pool-6-thread-21) [7f3139c7] Running command: RemoveVdsCommand internal: false. Entities affected : ID: c212c0a9-a784-4958-bad1-eb3a95b8c9da Type: VDS
2014-07-03 16:15:05,484 INFO [org.ovirt.engine.core.utils.transaction.TransactionSupport] (org.ovirt.thread.pool-6-thread-21) [7f3139c7] transaction rolled back
2014-07-03 16:15:05,485 ERROR [org.ovirt.engine.core.bll.RemoveVdsCommand] (org.ovirt.thread.pool-6-thread-21) [7f3139c7] Command org.ovirt.engine.core.bll.RemoveVdsCommand throw exception: org.springframework.dao.DataIntegrityViolationException: CallableStatementCallback; SQL [{call deletevdsstatic(?)}]; ERROR: update o delete en «vds_static» viola la llave foránea «vds_static_vm_dynamic_m» en la tabla «vm_dynamic»
Detail: La llave (vds_id)=(c212c0a9-a784-4958-bad1-eb3a95b8c9da) todavÃa es referida desde la tabla «vm_dynamic».
Where: sentencia SQL: «DELETE FROM vds_static WHERE vds_id = $1 »
PL/pgSQL function "deletevdsstatic" line 11 at sentencia SQL; nested exception is org.postgresql.util.PSQLException: ERROR: update o delete en «vds_static» viola la llave foránea «vds_static_vm_dynamic_m» en la tabla «vm_dynamic»
Detail: La llave (vds_id)=(c212c0a9-a784-4958-bad1-eb3a95b8c9da) todavÃa es referida desde la tabla «vm_dynamic».
Where: sentencia SQL: «DELETE FROM vds_static WHERE vds_id = $1 »
PL/pgSQL function "deletevdsstatic" line 11 at sentencia SQL; nested exception is org.postgresql.util.PSQLException: ERROR: update o delete en «vds_static» viola la llave foránea «vds_static_vm_dynamic_m» en la tabla «vm_dynamic»
Detail: La llave (vds_id)=(c212c0a9-a784-4958-bad1-eb3a95b8c9da) todavÃa es referida desde la tabla «vm_dynamic».
Where: sentencia SQL: «DELETE FROM vds_static WHERE vds_id = $1 »
PL/pgSQL function "deletevdsstatic" line 11 at sentencia SQL
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]
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:1030) [spring-jdbc.jar:3.1.1.RELEASE]
at org.springframework.jdbc.core.JdbcTemplate.call(JdbcTemplate.java:1064) [spring-jdbc.jar:3.1.1.RELEASE]
at org.springframework.jdbc.core.simple.AbstractJdbcCall.executeCallInternal(AbstractJdbcCall.java:388) [spring-jdbc.jar:3.1.1.RELEASE]
at org.springframework.jdbc.core.simple.AbstractJdbcCall.doExecute(AbstractJdbcCall.java:351) [spring-jdbc.jar:3.1.1.RELEASE]
at org.springframework.jdbc.core.simple.SimpleJdbcCall.execute(SimpleJdbcCall.java:181) [spring-jdbc.jar:3.1.1.RELEASE]
at org.ovirt.engine.core.dal.dbbroker.SimpleJdbcCallsHandler.executeImpl(SimpleJdbcCallsHandler.java:137) [dal.jar:]
at org.ovirt.engine.core.dal.dbbroker.SimpleJdbcCallsHandler.executeModification(SimpleJdbcCallsHandler.java:74) [dal.jar:]
at org.ovirt.engine.core.dao.VdsStaticDAODbFacadeImpl.remove(VdsStaticDAODbFacadeImpl.java:110) [dal.jar:]
at org.ovirt.engine.core.dao.VdsStaticDAODbFacadeImpl.remove(VdsStaticDAODbFacadeImpl.java:20) [dal.jar:]
at org.ovirt.engine.core.bll.RemoveVdsCommand.RemoveVdsStaticFromDb(RemoveVdsCommand.java:147) [bll.jar:]
at org.ovirt.engine.core.bll.RemoveVdsCommand.access$200(RemoveVdsCommand.java:36) [bll.jar:]
at org.ovirt.engine.core.bll.RemoveVdsCommand$1.runInTransaction(RemoveVdsCommand.java:75) [bll.jar:]
at org.ovirt.engine.core.bll.RemoveVdsCommand$1.runInTransaction(RemoveVdsCommand.java:69) [bll.jar:]
at org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInNewTransaction(TransactionSupport.java:210) [utils.jar:]
at org.ovirt.engine.core.bll.RemoveVdsCommand.executeCommand(RemoveVdsCommand.java:69) [bll.jar:]
at org.ovirt.engine.core.bll.CommandBase.executeWithoutTransaction(CommandBase.java:1123) [bll.jar:]
at org.ovirt.engine.core.bll.CommandBase.executeActionInTransactionScope(CommandBase.java:1208) [bll.jar:]
at org.ovirt.engine.core.bll.CommandBase.runInTransaction(CommandBase.java:1884) [bll.jar:]
at org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInSuppressed(TransactionSupport.java:174) [utils.jar:]
at org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInScope(TransactionSupport.java:116) [utils.jar:]
at org.ovirt.engine.core.bll.CommandBase.execute(CommandBase.java:1228) [bll.jar:]
at org.ovirt.engine.core.bll.CommandBase.executeAction(CommandBase.java:351) [bll.jar:]
at org.ovirt.engine.core.bll.MultipleActionsRunner.executeValidatedCommand(MultipleActionsRunner.java:189) [bll.jar:]
at org.ovirt.engine.core.bll.MultipleActionsRunner.runCommands(MultipleActionsRunner.java:156) [bll.jar:]
at org.ovirt.engine.core.bll.MultipleActionsRunner$2.run(MultipleActionsRunner.java:165) [bll.jar:]
at org.ovirt.engine.core.utils.threadpool.ThreadPoolUtil$InternalWrapperRunnable.run(ThreadPoolUtil.java:97) [utils.jar:]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [rt.jar:1.7.0_51]
at java.util.concurrent.FutureTask.run(FutureTask.java:262) [rt.jar:1.7.0_51]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_51]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_51]
at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_51]
Caused by: org.postgresql.util.PSQLException: ERROR: update o delete en «vds_static» viola la llave foránea «vds_static_vm_dynamic_m» en la tabla «vm_dynamic»
Detail: La llave (vds_id)=(c212c0a9-a784-4958-bad1-eb3a95b8c9da) todavÃa es referida desde la tabla «vm_dynamic».
Where: sentencia SQL: «DELETE FROM vds_static WHERE vds_id = $1 »
PL/pgSQL function "deletevdsstatic" line 11 at sentencia SQL
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2103)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1836)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:512)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:388)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:381)
at org.jboss.jca.adapters.jdbc.CachedPreparedStatement.execute(CachedPreparedStatement.java:297)
at org.jboss.jca.adapters.jdbc.WrappedPreparedStatement.execute(WrappedPreparedStatement.java:404)
at org.springframework.jdbc.core.JdbcTemplate$6.doInCallableStatement(JdbcTemplate.java:1066) [spring-jdbc.jar:3.1.1.RELEASE]
at org.springframework.jdbc.core.JdbcTemplate$6.doInCallableStatement(JdbcTemplate.java:1) [spring-jdbc.jar:3.1.1.RELEASE]
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:1014) [spring-jdbc.jar:3.1.1.RELEASE]
... 30 more2014-07-03 16:15:05,511 INFO [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (org.ovirt.thread.pool-6-thread-21) [7f3139c7] Correlation ID: 7f3139c7, Call Stack: null, Custom Event ID: -1, Message: Failed to remove Host ov-nodo2 (User: fsayd). 2014-07-03 16:15:05,514 INFO [org.ovirt.engine.core.bll.RemoveVdsCommand] (org.ovirt.thread.pool-6-thread-21) [7f3139c7] Lock freed to object EngineLock [exclusiveLocks= key: c212c0a9-a784-4958-bad1-eb3a95b8c9da value: VDS , sharedLocks= ]
_______________________________________________ Users mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/users

