Re: [Users] Failed to import Vm host to ovirt

2012-10-10 Thread Karli Sjöberg
Thank you so much for catching this, it made my life a bunch more easier!

When we wanted to upgrade from oVirt-3.0 to 3.1, we followed the procedure of 
exporting all of the machines to export domain, crashed the entire system and 
started building it up again. When it was up and running, we tried importing 
the machines back, they all failed and we couldn´t figure anything out from 
just that non-saying error message and cryptic errors in engine log. But then I 
remembered reading something a while back about this, searched back and 
compared our error messages, and they matched. So I then dove into the storage 
and changed all of the references from the old name to the new, and importing 
was all smooth sailing from there:
# sed -i '' 's/oldnetname/newnetname/g' master/vms/*/*.ovf

Devs: I can´t remember, is this explained anywhere in the upgrading documents, 
that the bridge names need to be the same before and after, or that you need to 
modify that afterwards if they´ve changed?

11 sep 2012 kl. 16.22 skrev Thomas Scofield:

Bugs filed.

https://bugzilla.redhat.com/show_bug.cgi?id=856219
https://bugzilla.redhat.com/show_bug.cgi?id=856234


On Tue, Sep 11, 2012 at 1:16 AM, Haim Ateya 
hat...@redhat.commailto:hat...@redhat.com wrote:
On 09/11/2012 12:32 AM, Thomas Scofield wrote:
While trying to import a virtual machine I got very generic error message in 
the web interface Failed to import Vm host to ovirt, in the engine.log I got 
this java exception below.  After doing some digging I realized the problem was 
I did not map the network bridge names from my previous machine to the bridge 
name used on the current machine. After modifing the 
master/vms/e94464d3-ae44-45ac-b09b-0e17f784a378/e94464d3-ae44-45ac-b09b-0e17f784a378.ovf
 file and updating the references to the bridge name the import worked as 
expected.  Could more information be added to the error message to indicate the 
source of the problem?  Are there any plans to allow the network configuration 
to be modified as part of the import?

Hi Thomas,

thanks for your feedback (and nice catch!).
please file 2 new bugs around this issue (one for the unhandled exception and 
another for more informative error message).

https://bugzilla.redhat.com/enter_bug.cgi?product=oVirt


2012-09-10 17:04:29,436 INFO  
[org.ovirt.engine.core.vdsbroker.irsbroker.GetVmsInfoVDSCommand] 
(ajp--0.0.0.0-8009-3) START, GetVmsInfoVDSCommand(storagePoolId = 
04f7efb6-f9f8-11e1-af92-6805ca00c345, ignoreFailoverLimit = false, 
compatabilityVersion = null, storageDomainId = 
913e496b-b0a3-4b2e-a481-7d1a101c89db, vmIdList = null), log id: 223efce6
2012-09-10 17:04:29,446 INFO  
[org.ovirt.engine.core.vdsbroker.irsbroker.GetVmsInfoVDSCommand] 
(ajp--0.0.0.0-8009-3) FINISH, GetVmsInfoVDSCommand, log id: 223efce6
2012-09-10 17:04:29,470 INFO  
[org.ovirt.engine.core.vdsbroker.irsbroker.GetImageDomainsListVDSCommand] 
(ajp--0.0.0.0-8009-3) START, GetImageDomainsListVDSCommand(storagePoolId = 
04f7efb6-f9f8-11e1-af92-6805ca00c345, ignoreFailoverLimit = false, 
compatabilityVersion = null, imageGroupId = 
b9d80d3d-0b3d-4249-8f12-3bc7e8b93464), log id: 682b1cec
2012-09-10 17:04:29,483 INFO  
[org.ovirt.engine.core.vdsbroker.irsbroker.GetImageDomainsListVDSCommand] 
(ajp--0.0.0.0-8009-3) FINISH, GetImageDomainsListVDSCommand, return: [], log 
id: 682b1cec
2012-09-10 17:04:29,484 INFO  
[org.ovirt.engine.core.vdsbroker.irsbroker.DoesImageExistVDSCommand] 
(ajp--0.0.0.0-8009-3) START, DoesImageExistVDSCommand(storagePoolId = 
04f7efb6-f9f8-11e1-af92-6805ca00c345, ignoreFailoverLimit = false, 
compatabilityVersion = null, storageDomainId = 
913e496b-b0a3-4b2e-a481-7d1a101c89db, imageGroupId = 
b9d80d3d-0b3d-4249-8f12-3bc7e8b93464, imageId = 
60fb55ea-1450-4f3e-b3ac-4ba0db3e80ab), log id: 6677ff61
2012-09-10 17:04:29,548 INFO  
[org.ovirt.engine.core.vdsbroker.irsbroker.DoesImageExistVDSCommand] 
(ajp--0.0.0.0-8009-3) FINISH, DoesImageExistVDSCommand, return: true, log id: 
6677ff61
2012-09-10 17:04:29,602 INFO  [org.ovirt.engine.core.bll.ImportVmCommand] 
(pool-3-thread-49) [30fbeac] Running command: ImportVmCommand internal: false. 
Entities affected :  ID: 70fc57d2-4f51-4029-a7ce-9e7705b27723 Type: Storage
2012-09-10 17:04:29,607 INFO  
[org.ovirt.engine.core.utils.transaction.TransactionSupport] (pool-3-thread-49) 
[30fbeac] transaction rolled back
2012-09-10 17:04:29,608 ERROR [org.ovirt.engine.core.bll.ImportVmCommand] 
(pool-3-thread-49) [30fbeac] Command org.ovirt.engine.core.bll.ImportVmCommand 
throw exception: java.lang.StringIndexOutOfBoundsException: String index out of 
range: 4
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 

Re: [Users] Failed to import Vm host to ovirt

2012-09-11 Thread Thomas Scofield
Bugs filed.

https://bugzilla.redhat.com/show_bug.cgi?id=856219
https://bugzilla.redhat.com/show_bug.cgi?id=856234


On Tue, Sep 11, 2012 at 1:16 AM, Haim Ateya hat...@redhat.com wrote:

 On 09/11/2012 12:32 AM, Thomas Scofield wrote:

 While trying to import a virtual machine I got very generic error message
 in the web interface Failed to import Vm host to ovirt, in the engine.log
 I got this java exception below.  After doing some digging I realized the
 problem was I did not map the network bridge names from my previous machine
 to the bridge name used on the current machine. After modifing the
 master/vms/e94464d3-ae44-45ac-**b09b-0e17f784a378/e94464d3-**
 ae44-45ac-b09b-0e17f784a378.**ovf file and updating the references to
 the bridge name the import worked as expected.  Could more information be
 added to the error message to indicate the source of the problem?  Are
 there any plans to allow the network configuration to be modified as part
 of the import?


 Hi Thomas,

 thanks for your feedback (and nice catch!).
 please file 2 new bugs around this issue (one for the unhandled exception
 and another for more informative error message).

 https://bugzilla.redhat.com/**enter_bug.cgi?product=oVirthttps://bugzilla.redhat.com/enter_bug.cgi?product=oVirt


 2012-09-10 17:04:29,436 INFO  [org.ovirt.engine.core.**
 vdsbroker.irsbroker.**GetVmsInfoVDSCommand] (ajp--0.0.0.0-8009-3) START,
 GetVmsInfoVDSCommand(**storagePoolId = 
 04f7efb6-f9f8-11e1-af92-**6805ca00c345,
 ignoreFailoverLimit = false, compatabilityVersion = null, storageDomainId =
 913e496b-b0a3-4b2e-a481-**7d1a101c89db, vmIdList = null), log id:
 223efce6
 2012-09-10 17:04:29,446 INFO  [org.ovirt.engine.core.**
 vdsbroker.irsbroker.**GetVmsInfoVDSCommand] (ajp--0.0.0.0-8009-3)
 FINISH, GetVmsInfoVDSCommand, log id: 223efce6
 2012-09-10 17:04:29,470 INFO  [org.ovirt.engine.core.**
 vdsbroker.irsbroker.**GetImageDomainsListVDSCommand]
 (ajp--0.0.0.0-8009-3) START, GetImageDomainsListVDSCommand(**storagePoolId
 = 04f7efb6-f9f8-11e1-af92-**6805ca00c345, ignoreFailoverLimit = false,
 compatabilityVersion = null, imageGroupId = 
 b9d80d3d-0b3d-4249-8f12-**3bc7e8b93464),
 log id: 682b1cec
 2012-09-10 17:04:29,483 INFO  [org.ovirt.engine.core.**
 vdsbroker.irsbroker.**GetImageDomainsListVDSCommand]
 (ajp--0.0.0.0-8009-3) FINISH, GetImageDomainsListVDSCommand, return: [],
 log id: 682b1cec
 2012-09-10 17:04:29,484 INFO  [org.ovirt.engine.core.**
 vdsbroker.irsbroker.**DoesImageExistVDSCommand] (ajp--0.0.0.0-8009-3)
 START, DoesImageExistVDSCommand(**storagePoolId =
 04f7efb6-f9f8-11e1-af92-**6805ca00c345, ignoreFailoverLimit = false,
 compatabilityVersion = null, storageDomainId = 
 913e496b-b0a3-4b2e-a481-**7d1a101c89db,
 imageGroupId = b9d80d3d-0b3d-4249-8f12-**3bc7e8b93464, imageId =
 60fb55ea-1450-4f3e-b3ac-**4ba0db3e80ab), log id: 6677ff61
 2012-09-10 17:04:29,548 INFO  [org.ovirt.engine.core.**
 vdsbroker.irsbroker.**DoesImageExistVDSCommand] (ajp--0.0.0.0-8009-3)
 FINISH, DoesImageExistVDSCommand, return: true, log id: 6677ff61
 2012-09-10 17:04:29,602 INFO  [org.ovirt.engine.core.bll.**ImportVmCommand]
 (pool-3-thread-49) [30fbeac] Running command: ImportVmCommand internal:
 false. Entities affected :  ID: 70fc57d2-4f51-4029-a7ce-**9e7705b27723
 Type: Storage
 2012-09-10 17:04:29,607 INFO  [org.ovirt.engine.core.utils.**transaction.
 **TransactionSupport] (pool-3-thread-49) [30fbeac] transaction rolled
 back
 2012-09-10 17:04:29,608 ERROR [org.ovirt.engine.core.bll.**ImportVmCommand]
 (pool-3-thread-49) [30fbeac] Command 
 org.ovirt.engine.core.bll.**ImportVmCommand
 throw exception: java.lang.**StringIndexOutOfBoundsExceptio**n: String
 index out of range: 4
 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.**