ok, that last one was my fault i think - i thought the DB restore I did was 100% fail, but it wasnt ... removed all the DB entries that I could identify and the VMs are restoring now ...


On 15 January 2013 23:16, Alex Leonhardt <alex.tuxx@gmail.com> wrote:
i'm now getting :


2013-01-15 23:14:58,934 INFO  [org.ovirt.engine.core.bll.ImportVmCommand] (pool-3-thread-47) [215749c1] Running command: ImportVmCommand internal: false. Entities affected :  ID: 9bd4735c-a02b-403a-8e66-c5679b70e137 Type: Storage
2013-01-15 23:14:58,940 ERROR [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (pool-3-thread-47) [215749c1] Try to add duplicate values with same name. Type: UNASSIGNED. Value: vmname
2013-01-15 23:14:58,949 ERROR [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (pool-3-thread-47) [215749c1] Try to add duplicate values with same name. Type: UNASSIGNED. Value: vmname
2013-01-15 23:14:58,972 INFO  [org.ovirt.engine.core.utils.transaction.TransactionSupport] (pool-3-thread-47) [215749c1] transaction rolled back
2013-01-15 23:14:58,973 ERROR [org.ovirt.engine.core.bll.ImportVmCommand] (pool-3-thread-47) [215749c1] Command org.ovirt.engine.core.bll.ImportVmCommand throw exception: org.springframework.dao.DataIntegrityViolationException: CallableStatementCallback; SQL [{call insertbasedisk(?, ?, ?, ?, ?, ?, ?, ?, ?)}]; ERROR: duplicate key value violates unique constraint "pk_disks"
  Where: SQL statement "INSERT INTO base_disks( disk_id, disk_interface, wipe_after_delete, propagate_errors, disk_alias, disk_description, shareable, boot, allow_snapshot) VALUES(  $1 ,  $2 ,  $3 ,  $4 ,  $5 ,  $6 ,  $7 ,  $8 ,  $9 )"
PL/pgSQL function "insertbasedisk" line 2 at SQL statement; nested exception is org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "pk_disks"
  Where: SQL statement "INSERT INTO base_disks( disk_id, disk_interface, wipe_after_delete, propagate_errors, disk_alias, disk_description, shareable, boot, allow_snapshot) VALUES(  $1 ,  $2 ,  $3 ,  $4 ,  $5 ,  $6 ,  $7 ,  $8 ,  $9 )"
PL/pgSQL function "insertbasedisk" line 2 at SQL statement
    at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:228) [spring-jdbc-2.5.6.SEC02.jar:2.5.6.SEC02]
    at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72) [spring-jdbc-2.5.6.SEC02.jar:2.5.6.SEC02]
    at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:952) [spring-jdbc-2.5.6.SEC02.jar:2.5.6.SEC02]
    at org.springframework.jdbc.core.JdbcTemplate.call(JdbcTemplate.java:985) [spring-jdbc-2.5.6.SEC02.jar:2.5.6.SEC02]
    at org.springframework.jdbc.core.simple.AbstractJdbcCall.executeCallInternal(AbstractJdbcCall.java:368) [spring-jdbc-2.5.6.SEC02.jar:2.5.6.SEC02]
    at org.springframework.jdbc.core.simple.AbstractJdbcCall.doExecute(AbstractJdbcCall.java:342) [spring-jdbc-2.5.6.SEC02.jar:2.5.6.SEC02]
    at org.springframework.jdbc.core.simple.SimpleJdbcCall.execute(SimpleJdbcCall.java:164) [spring-jdbc-2.5.6.SEC02.jar:2.5.6.SEC02]
    at org.ovirt.engine.core.dal.dbbroker.SimpleJdbcCallsHandler.executeImpl(SimpleJdbcCallsHandler.java:124) [engine-dal.jar:]
    at org.ovirt.engine.core.dal.dbbroker.SimpleJdbcCallsHandler.executeModification(SimpleJdbcCallsHandler.java:37) [engine-dal.jar:]
    at org.ovirt.engine.core.dao.DefaultGenericDaoDbFacade.save(DefaultGenericDaoDbFacade.java:93) [engine-dal.jar:]
    at org.ovirt.engine.core.bll.ImportVmCommand.addVmImagesAndSnapshots(ImportVmCommand.java:638) [engine-bll.jar:]
    at org.ovirt.engine.core.bll.ImportVmCommand.access$200(ImportVmCommand.java:76) [engine-bll.jar:]
    at org.ovirt.engine.core.bll.ImportVmCommand$4.runInTransaction(ImportVmCommand.java:501) [engine-bll.jar:]
    at org.ovirt.engine.core.bll.ImportVmCommand$4.runInTransaction(ImportVmCommand.java:497) [engine-bll.jar:]
    at org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInNewTransaction(TransactionSupport.java:204) [engine-utils.jar:]
    at org.ovirt.engine.core.bll.ImportVmCommand.processImages(ImportVmCommand.java:497) [engine-bll.jar:]
    at org.ovirt.engine.core.bll.ImportVmCommand.executeCommand(ImportVmCommand.java:477) [engine-bll.jar:]

    at org.ovirt.engine.core.bll.CommandBase.ExecuteWithoutTransaction(CommandBase.java:804) [engine-bll.jar:]
    at org.ovirt.engine.core.bll.CommandBase.executeActionInTransactionScope(CommandBase.java:896) [engine-bll.jar:]
    at org.ovirt.engine.core.bll.CommandBase.runInTransaction(CommandBase.java:1203) [engine-bll.jar:]
    at org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInSuppressed(TransactionSupport.java:168) [engine-utils.jar:]
    at org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInScope(TransactionSupport.java:107) [engine-utils.jar:]
    at org.ovirt.engine.core.bll.CommandBase.Execute(CommandBase.java:911) [engine-bll.jar:]
    at org.ovirt.engine.core.bll.CommandBase.ExecuteAction(CommandBase.java:268) [engine-bll.jar:]
    at org.ovirt.engine.core.bll.MultipleActionsRunner.executeValidatedCommands(MultipleActionsRunner.java:182) [engine-bll.jar:]
    at org.ovirt.engine.core.bll.MultipleActionsRunner.RunCommands(MultipleActionsRunner.java:162) [engine-bll.jar:]
    at org.ovirt.engine.core.bll.MultipleActionsRunner$1.run(MultipleActionsRunner.java:84) [engine-bll.jar:]
    at org.ovirt.engine.core.utils.threadpool.ThreadPoolUtil$InternalWrapperRunnable.run(ThreadPoolUtil.java:64) [engine-utils.jar:]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [rt.jar:1.6.0_24]
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) [rt.jar:1.6.0_24]
    at java.util.concurrent.FutureTask.run(FutureTask.java:166) [rt.jar:1.6.0_24]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.6.0_24]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.6.0_24]
    at java.lang.Thread.run(Thread.java:679) [rt.jar:1.6.0_24]
Caused by: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "pk_disks"
  Where: SQL statement "INSERT INTO base_disks( disk_id, disk_interface, wipe_after_delete, propagate_errors, disk_alias, disk_description, shareable, boot, allow_snapshot) VALUES(  $1 ,  $2 ,  $3 ,  $4 ,  $5 ,  $6 ,  $7 ,  $8 ,  $9 )"
PL/pgSQL function "insertbasedisk" line 2 at SQL statement
    at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2062) [postgresql-jdbc.jar:]
    at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1795) [postgresql-jdbc.jar:]
    at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257) [postgresql-jdbc.jar:]
    at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:479) [postgresql-jdbc.jar:]
    at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:367) [postgresql-jdbc.jar:]
    at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:360) [postgresql-jdbc.jar:]
    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$5.doInCallableStatement(JdbcTemplate.java:987) [spring-jdbc-2.5.6.SEC02.jar:2.5.6.SEC02]
    at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:936) [spring-jdbc-2.5.6.SEC02.jar:2.5.6.SEC02]
    ... 31 more


_after_ successfully importing 1 VM ...

Alex



On 15 January 2013 22:00, Itamar Heim <iheim@redhat.com> wrote:
On 01/15/2013 10:24 PM, Alex Leonhardt wrote:
Hi,

Am trying to import VMs from an abandoned storage pool -

all I'm getting is this :

2013-01-15 20:21:05,958 INFO
[org.ovirt.engine.core.vdsbroker.irsbroker.GetVmsInfoVDSCommand]
(ajp--0.0.0.0-8009-16) START, GetVmsInfoVDSCommand(storagePoolId =
38a9ac9d-fe31-4003-8111-3ac741470b6e, ignoreFailoverLimit = false,
compatabilityVersion = null, storageDomainId =
b9c2cf06-73ea-4dd4-900b-3af322ab223d, vmIdList = null), log id: 65b1c9a8
2013-01-15 20:21:06,013 INFO
[org.ovirt.engine.core.vdsbroker.irsbroker.GetVmsInfoVDSCommand]
(ajp--0.0.0.0-8009-16) FINISH, GetVmsInfoVDSCommand, log id: 65b1c9a8
2013-01-15 20:21:06,036 INFO
[org.ovirt.engine.core.vdsbroker.irsbroker.GetVmsInfoVDSCommand]
(ajp--0.0.0.0-8009-11) START, GetVmsInfoVDSCommand(storagePoolId =
38a9ac9d-fe31-4003-8111-3ac741470b6e, ignoreFailoverLimit = false,
compatabilityVersion = null, storageDomainId =
b9c2cf06-73ea-4dd4-900b-3af322ab223d, vmIdList = null), log id: 7b0bc172
2013-01-15 20:21:06,085 INFO
[org.ovirt.engine.core.vdsbroker.irsbroker.GetVmsInfoVDSCommand]
(ajp--0.0.0.0-8009-11) FINISH, GetVmsInfoVDSCommand, log id: 7b0bc172
2013-01-15 20:21:06,928 INFO
[org.ovirt.engine.core.vdsbroker.irsbroker.GetImageDomainsListVDSCommand] (ajp--0.0.0.0-8009-11)
START, GetImageDomainsListVDSCommand(storagePoolId =
38a9ac9d-fe31-4003-8111-3ac741470b6e, ignoreFailoverLimit = false,
compatabilityVersion = null, imageGroupId =
8d41be6c-a586-4bb6-be4b-f1241a4bf088), log id: 79952c27
2013-01-15 20:21:06,951 INFO
[org.ovirt.engine.core.vdsbroker.irsbroker.GetImageDomainsListVDSCommand] (ajp--0.0.0.0-8009-11)
FINISH, GetImageDomainsListVDSCommand, return: [], log id: 79952c27
2013-01-15 20:21:06,954 INFO
[org.ovirt.engine.core.vdsbroker.irsbroker.DoesImageExistVDSCommand]
(ajp--0.0.0.0-8009-11) START, DoesImageExistVDSCommand(storagePoolId =
38a9ac9d-fe31-4003-8111-3ac741470b6e, ignoreFailoverLimit = false,
compatabilityVersion = null, storageDomainId =
b9c2cf06-73ea-4dd4-900b-3af322ab223d, imageGroupId =
8d41be6c-a586-4bb6-be4b-f1241a4bf088, imageId =
a4782145-626c-4a6e-9e1e-fce5f1dd8f78), log id: 3085f2cd
2013-01-15 20:21:06,993 INFO
[org.ovirt.engine.core.vdsbroker.irsbroker.DoesImageExistVDSCommand]
(ajp--0.0.0.0-8009-11) FINISH, DoesImageExistVDSCommand, return: true,
log id: 3085f2cd
2013-01-15 20:21:07,039 INFO
[org.ovirt.engine.core.bll.ImportVmCommand] (pool-3-thread-48) [8991b34]
Running command: ImportVmCommand internal: false. Entities affected :
ID: b756284f-06f9-44cd-ba45-6cac3486fe37 Type: Storage
2013-01-15 20:21:07,040 ERROR
[org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector]
(pool-3-thread-48) [8991b34] Try to add duplicate values with same name.
Type: UNASSIGNED. Value: vmname
2013-01-15 20:21:07,045 ERROR
[org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector]
(pool-3-thread-48) [8991b34] Try to add duplicate values with same name.
Type: UNASSIGNED. Value: vmname
2013-01-15 20:21:07,049 INFO
[org.ovirt.engine.core.utils.transaction.TransactionSupport]
(pool-3-thread-48) [8991b34] transaction rolled back
2013-01-15 20:21:07,050 ERROR
[org.ovirt.engine.core.bll.ImportVmCommand] (pool-3-thread-48) [8991b34]
Command org.ovirt.engine.core.bll.ImportVmCommand throw exception:
java.lang.StringIndexOutOfBoundsException: String index out of range: 6
     at
java.lang.AbstractStringBuilder.deleteCharAt(AbstractStringBuilder.java:766)
[rt.jar:1.6.0_24]
     at java.lang.StringBuilder.deleteCharAt(StringBuilder.java:280)
[rt.jar:1.6.0_24]
     at
org.ovirt.engine.core.bll.ImportVmCommand.auditInvalidInterfaces(ImportVmCommand.java:933)
[engine-bll.jar:]
     at
org.ovirt.engine.core.bll.ImportVmCommand.AddVmNetwork(ImportVmCommand.java:801)
[engine-bll.jar:]
     at
org.ovirt.engine.core.bll.ImportVmCommand$3.runInTransaction(ImportVmCommand.java:488)
[engine-bll.jar:]
     at
org.ovirt.engine.core.bll.ImportVmCommand$3.runInTransaction(ImportVmCommand.java:482)
[engine-bll.jar:]
     at
org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInNewTransaction(TransactionSupport.java:204)
[engine-utils.jar:]
     at
org.ovirt.engine.core.bll.ImportVmCommand.addVmToDb(ImportVmCommand.java:482)
[engine-bll.jar:]
     at
org.ovirt.engine.core.bll.ImportVmCommand.executeCommand(ImportVmCommand.java:476)
[engine-bll.jar:]
     at
org.ovirt.engine.core.bll.CommandBase.ExecuteWithoutTransaction(CommandBase.java:804)
[engine-bll.jar:]
     at
org.ovirt.engine.core.bll.CommandBase.executeActionInTransactionScope(CommandBase.java:896)
[engine-bll.jar:]
     at
org.ovirt.engine.core.bll.CommandBase.runInTransaction(CommandBase.java:1203)
[engine-bll.jar:]
     at
org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInSuppressed(TransactionSupport.java:168)
[engine-utils.jar:]
     at
org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInScope(TransactionSupport.java:107)
[engine-utils.jar:]
     at
org.ovirt.engine.core.bll.CommandBase.Execute(CommandBase.java:911)
[engine-bll.jar:]
     at
org.ovirt.engine.core.bll.CommandBase.ExecuteAction(CommandBase.java:268) [engine-bll.jar:]
     at
org.ovirt.engine.core.bll.MultipleActionsRunner.executeValidatedCommands(MultipleActionsRunner.java:182)
[engine-bll.jar:]
     at
org.ovirt.engine.core.bll.MultipleActionsRunner.RunCommands(MultipleActionsRunner.java:162)
[engine-bll.jar:]
     at
org.ovirt.engine.core.bll.MultipleActionsRunner$1.run(MultipleActionsRunner.java:84)
[engine-bll.jar:]
     at
org.ovirt.engine.core.utils.threadpool.ThreadPoolUtil$InternalWrapperRunnable.run(ThreadPoolUtil.java:64)
[engine-utils.jar:]
     at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
[rt.jar:1.6.0_24]
     at
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
[rt.jar:1.6.0_24]
     at java.util.concurrent.FutureTask.run(FutureTask.java:166)
[rt.jar:1.6.0_24]
     at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
[rt.jar:1.6.0_24]
     at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
[rt.jar:1.6.0_24]
     at java.lang.Thread.run(Thread.java:679) [rt.jar:1.6.0_24]

2013-01-15 20:21:07,232 INFO
[org.ovirt.engine.core.vdsbroker.irsbroker.GetVmsInfoVDSCommand]
(ajp--0.0.0.0-8009-14) START, GetVmsInfoVDSCommand(storagePoolId =
38a9ac9d-fe31-4003-8111-3ac741470b6e, ignoreFailoverLimit = false,
compatabilityVersion = null, storageDomainId =
b9c2cf06-73ea-4dd4-900b-3af322ab223d, vmIdList = null), log id: 44689362
2013-01-15 20:21:07,284 INFO
[org.ovirt.engine.core.vdsbroker.irsbroker.GetVmsInfoVDSCommand]
(ajp--0.0.0.0-8009-14) FINISH, GetVmsInfoVDSCommand, log id: 44689362


above only as I was somehow able to convince it, that it was a export
domain ...


question really is - how can i re-attach the Storage domain ?? Ideally
w/o having to re-import the VMs ... although i'd accept it as a work
around - however - re-creating is out of question, it'll take me 3 days
( and my job ) ...

Alex



--

| RHCE | Senior Systems Engineer | www.vcore.co <http://www.vcore.co> |
www.vsearchcloud.com <http://www.vsearchcloud.com> |


_______________________________________________
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


easiest to check this if you can add the OVF causing the issue




--

| RHCE | Senior Systems Engineer | www.vcore.co | www.vsearchcloud.com |



--

| RHCE | Senior Systems Engineer | www.vcore.co | www.vsearchcloud.com |