Bug 832106 - Failed to make template
Summary: Failed to make template
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: oVirt
Classification: Retired
Component: ovirt-engine-core
Version: 3.1 RC
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: ---
: ---
Assignee: Juan Hernández
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 822145
TreeView+ depends on / blocked
 
Reported: 2012-06-14 14:14 UTC by Mark Wu
Modified: 2012-06-20 14:10 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-06-20 11:19:00 UTC
oVirt Team: ---
Embargoed:


Attachments (Terms of Use)
engine.log (706.64 KB, text/x-log)
2012-06-15 06:33 UTC, Mark Wu
no flags Details
vdsm.log (1.50 MB, text/x-log)
2012-06-18 00:38 UTC, Mark Wu
no flags Details
ovf file (3.69 KB, application/octet-stream)
2012-06-19 01:22 UTC, Mark Wu
no flags Details
Another ovf file (3.70 KB, application/octet-stream)
2012-06-19 01:27 UTC, Mark Wu
no flags Details

Description Mark Wu 2012-06-14 14:14:50 UTC
Description of problem:
In my test, it always failed to make template from VM on ovirt-engine. The following errors keep appearing in the event window:

"Failed to complete creation of template xp-template from VM guest-xp"
"Failed to complete creation of template BLANK from VM VmName"

No related error messages are seen in engine.log


Version-Release number of selected component (if applicable):
ovirt-engine-3.1.0_0001-1.8.fc17

How reproducible:
always

Steps to Reproduce:
Just make template from a VM

  
Actual results:


Expected results:


Additional info:

Comment 1 Itamar Heim 2012-06-14 15:03:47 UTC
engine logs?

Comment 2 Mark Wu 2012-06-15 06:33:09 UTC
Created attachment 592043 [details]
engine.log

Comment 3 Mark Wu 2012-06-15 06:36:13 UTC
The operation failed very quickly. The vm and the template are locked forever.

Comment 4 Eli Mesika 2012-06-17 12:54:29 UTC
Please add vdsm logs as well

Comment 5 Mark Wu 2012-06-18 00:38:45 UTC
Created attachment 592485 [details]
vdsm.log

Here's the corresponding vdsm.log.

Comment 6 Eli Mesika 2012-06-18 07:09:34 UTC
(In reply to comment #5)
> Created attachment 592485 [details]
> vdsm.log
> 
> Here's the corresponding vdsm.log.

Hi
From initial investigation, it seems that it falls on loading the source VM OVF.
So, either the OVF is corrupted or we have a regression....

I need additional info 
please attach the guest-xp and VmName OVF files.
to do that:

1)get guest-xp and VmName UUID:
> echo "select vm_name,vm_guid from vm_static where vm_name in ('guest-xp','VmName');" | psql -U postgres engine
lets assume those IDs are id1 and id2
2)go to your Master domain location (you can see that on the Master storage domain properties in WebAdmin : Edit Storage Domain)
3) perform the following command:
find . -name "*.ovf" -exec grep id1 {} \; -print
find . -name "*.ovf" -exec grep id2 {} \; -print

4) Attach the resulted OVF files to this bug.

Thanks

Comment 7 Ofer Schreiber 2012-06-18 14:07:41 UTC
any updates about the OVF eli requested?

Comment 8 Mark Wu 2012-06-19 01:22:30 UTC
Created attachment 592799 [details]
ovf file

Actually, the real name of the guest is xp3. So xp3.ovf is the file you requested.
And I didn't create a VM named "VmName", so I can't get the entry for it. And I didn't manipulate the default template "BLANK". I am not sure how the message for "BLANK" template is triggered.

Comment 9 Mark Wu 2012-06-19 01:27:20 UTC
Created attachment 592801 [details]
Another ovf file

Another ovf file.
Actually, I have tried to make template on several VMs. All of them failed with the same phenomenon: get failure message in the event log very quickly and the VM is locked endless.

Comment 10 Koen van Bakel 2012-06-19 08:36:30 UTC
I have the same problem on ovirt-engine-3.1.0-3
I did have a look at the earlier provided logs... same results here.

Tried to create templates on/with different storage environments: iSCSI and Local. Problem stays the same.

In the ovirt-engine when you look at the tasks tab it states that the Copy of the VM has been succesfull but after that you get a repeating fail messages and everything is locked.

Comment 11 Eli Mesika 2012-06-19 11:33:46 UTC
http://gerrit.ovirt.org/#/c/5480/

Comment 12 Ofer Schreiber 2012-06-19 16:20:31 UTC
Mark and Koen - Any chance you can retest this with Eli's patch?

Comment 13 Juan Hernández 2012-06-19 19:30:30 UTC
I think that the problem is that the OvfTemplateWriter class doesn't balance correctly the open/close tags. It might be that the StAX implementation that we used in the past closes them automatically, but the StAX implementation in OpenJDK 7 doesn't. I applied the following change:

http://gerrit.ovirt.org/#/c/5506

And after that I can create templates correctly.

Comment 14 Mark Wu 2012-06-20 06:17:55 UTC
Sorry, I failed to build ovirt-engine from source code with the following error:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.3:run (deploy) on project engine-server-ear: An Ant BuildException has occured: Failed to copy /home/mark/Work/ovirt-engine/ear/target/engine/engine-bll.jar/org/ovirt/engine/core/bll/adbroker/MultipleLdapQueryExecutionFormatter.class to /usr/share/jboss-as/standalone/deployments/engine.ear/engine-bll.jar/org/ovirt/engine/core/bll/adbroker/MultipleLdapQueryExecutionFormatter.class due to java.io.FileNotFoundException /usr/share/jboss-as/standalone/deployments/engine.ear/engine-bll.jar/org/ovirt/engine/core/bll/adbroker/MultipleLdapQueryExecutionFormatter.class (No such file or directory) -> [Help 1]

I installed ovirt-engine and jboss-as from rpm package before. I have no idea how to resolve this problem. I already set env "JBOSS_HOME" to "/usr/share/jboss-as", but didn't help.

Comment 15 Yair Zaslavsky 2012-06-20 07:31:09 UTC
Following comment #14
Mark - Did you check that /usr/share/jboss-as/standalone/deployments/engine.ear/engine-bll.jar/org/ovirt/engine/core/bll/adbroker/ path exists?

This error does not relate to the fix suggested in the patch.
Your $JBOSS_HOME seem to point correctly to jboss.

Can you please specify here what steps of compilation you ran (I just performed fetch/rebase and it works for me).

Comment 16 Juan Hernández 2012-06-20 07:43:10 UTC
Mark, please note that the development environment should use the .zip jboss installation, not the RPMs. In addition in the production environment (if you install the ovirt-engine RPMs) the engine-bll.jar file is not expanded like in development environments, but compressed. The file is in the /usr/share/java/ovirt-engine/engine-bll.jar and we have a symbolic link in /usr/share/ovirt-engine/engine.ear.

To setup your development environment please follow the instructions here (this is a draft of updated build instructions):

http://ovirt.org/wiki/Building_Engine_Draft

Once you are able to build then you can replace the engine-bll.jar file in the /usr/share/java/ovirt-engine of your production environment with the one produced by your build, which should be in the following place:

$OVIRT_HOME/backend/manager/modules/bll/target/bll-3.1.0.jar

($OVIRT_HOME is the directory where you cloned the git repo, as explained in the build wiki)

Then restart the engine and try again.

Comment 17 Ofer Schreiber 2012-06-20 11:19:00 UTC
New rpms (ovirt-engine-3.1.0-0.1.20120620git6ef9f8.fc17.noarch.rpm) has been uploaded to ovirt.org, with a fix to that issue (verified by Juan and myself)

Comment 18 Koen van Bakel 2012-06-20 14:10:31 UTC
Thank you. Problem is fixed. This morning I tested it with the new rpms...worked.


Note You need to log in before you can comment on or make changes to this bug.