Bug 1421293 - AddVmFromTemplate fails with Cinder disk
Summary: AddVmFromTemplate fails with Cinder disk
Status: CLOSED DUPLICATE of bug 1399191
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Storage
Hardware: x86_64
OS: Linux
Target Milestone: ---
: ---
Assignee: Allon Mureinik
QA Contact: Raz Tamir
Depends On:
TreeView+ depends on / blocked
Reported: 2017-02-10 22:11 UTC by Andrew Richards
Modified: 2017-02-16 15:36 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2017-02-16 15:36:33 UTC
oVirt Team: Storage

Attachments (Terms of Use)
/var/log/ovirt-engine/engine.log context of error referenced (38.95 KB, text/plain)
2017-02-10 22:11 UTC, Andrew Richards
no flags Details
complete /var/log/vdsm/vdsm.log & /var/log/ovirt-engine/engine.log (906.51 KB, application/zip)
2017-02-13 15:11 UTC, Andrew Richards
no flags Details

Description Andrew Richards 2017-02-10 22:11:33 UTC
Created attachment 1249159 [details]
/var/log/ovirt-engine/engine.log context of error referenced

Description of problem:
If a Template is created including a Cinder disk, VMs that are launched using this template will fail and leave the Engine looping endlessly through futile attempts to clear the failed job. Cinder shows the new volume successfully created and available. No errors in the Cinder logs.

Version-Release number of selected component (if applicable):

How reproducible:
Consistently reproducible.

Steps to Reproduce:
1. Create a VM with a Cinder boot disk
2. Create a Template from this VM once the VM is ready
3. Create a New VM from this template

Actual results:
The VM fails to complete creation and the task to finalize the VM retries endlessly until manual intervention in the database to clear the job.

Expected results:
A new VM is created atop a clone of the template's Cinder disk.

Additional info:
This looks very similar to https://bugzilla.redhat.com/show_bug.cgi?id=1377442

Cinder is from RDO repo, Liberty version. Cinder API is running v2.

/var/log/ovirt-engine/engine.log initial error message:

ERROR [org.ovirt.engine.core.bll.AddVmFromTemplateCommand] (default task-205) [7eaf76cd] Command 'org.ovirt.engine.core.bll.AddVmFromTemplateCommand' failed: CallableStatementCallback; SQL [{call insert_entity_snapshot(?, ?, ?, ?, ?, ?, ?, ?, ?)}]; ERROR: duplicate key value violates unique constraint "uq_command_id_entity_id"
  Detail: Key (command_id, entity_id, entity_type, snapshot_type)=(26914962-4948-486d-9251-186abba98641, adfa27b6-95c0-4854-8e2a-33b623d27dea, org.ovirt.engine.core.common.businessentities.VmDynamic, 2) already exists.

Complete relevant log entries can be found here: http://pastebin.com/FhM88TJ2 or in the attached text file.

Comment 1 Tal Nisan 2017-02-12 13:57:35 UTC
Could not reproduced on master, Liron I think your latest fixed to the SPDM tasks infra fixed it as it looks familiar, can you confirm?

Comment 2 Liron Aravot 2017-02-12 20:09:00 UTC
Tal, it shouldn't. But this one should be a duplicate of 1399191.
Andrew, please attach the complete engine/vdsm logs so we can confirm that.


Comment 3 Andrew Richards 2017-02-13 15:11:52 UTC
Created attachment 1249892 [details]
complete /var/log/vdsm/vdsm.log & /var/log/ovirt-engine/engine.log

The lab setup where I confirmed this behavior only as a single VDSM host, its vdsm.log is attached along with he complete engine.log from the time of the error.

Comment 4 Yaniv Kaul 2017-02-13 19:26:44 UTC
Liron - please confirm if it's a dup of bug 1399191 and close-dup if it is.

Comment 5 Liron Aravot 2017-02-16 15:36:33 UTC

*** This bug has been marked as a duplicate of bug 1399191 ***

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