Bug 832106 - Failed to make template
Failed to make template
Status: CLOSED NEXTRELEASE
Product: oVirt
Classification: Community
Component: ovirt-engine-core (Show other bugs)
3.1 RC
Unspecified Unspecified
urgent Severity urgent
: ---
: ---
Assigned To: Juan Hernández
:
Depends On:
Blocks: 822145
  Show dependency treegraph
 
Reported: 2012-06-14 10:14 EDT by Mark Wu
Modified: 2012-06-20 10:10 EDT (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-06-20 07:19:00 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Mark Wu 2012-06-14 10:14:50 EDT
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 11:03:47 EDT
engine logs?
Comment 2 Mark Wu 2012-06-15 02:33:09 EDT
Created attachment 592043 [details]
engine.log
Comment 3 Mark Wu 2012-06-15 02:36:13 EDT
The operation failed very quickly. The vm and the template are locked forever.
Comment 4 Eli Mesika 2012-06-17 08:54:29 EDT
Please add vdsm logs as well
Comment 5 Mark Wu 2012-06-17 20:38:45 EDT
Created attachment 592485 [details]
vdsm.log

Here's the corresponding vdsm.log.
Comment 6 Eli Mesika 2012-06-18 03:09:34 EDT
(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 10:07:41 EDT
any updates about the OVF eli requested?
Comment 8 Mark Wu 2012-06-18 21:22:30 EDT
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-18 21:27:20 EDT
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 04:36:30 EDT
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 07:33:46 EDT
http://gerrit.ovirt.org/#/c/5480/
Comment 12 Ofer Schreiber 2012-06-19 12:20:31 EDT
Mark and Koen - Any chance you can retest this with Eli's patch?
Comment 13 Juan Hernández 2012-06-19 15:30:30 EDT
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 02:17:55 EDT
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 03:31:09 EDT
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 03:43:10 EDT
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 07:19:00 EDT
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 10:10:31 EDT
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.