Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1288852

Summary: [cinder] Restarting engine during create VM from template: cinder disk is created, rollback failure (no VM)
Product: [oVirt] ovirt-engine Reporter: Natalie Gavrielov <ngavrilo>
Component: BLL.StorageAssignee: Maor <mlipchuk>
Status: CLOSED CURRENTRELEASE QA Contact: Natalie Gavrielov <ngavrilo>
Severity: high Docs Contact:
Priority: medium    
Version: 3.6.1CC: amureini, bugs, derez, mlipchuk, tnisan, ylavi
Target Milestone: ovirt-3.6.2Flags: rule-engine: ovirt-3.6.z+
ylavi: planning_ack+
tnisan: devel_ack+
rule-engine: testing_ack+
Target Release: 3.6.2.5   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-02-18 11:07:01 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Storage RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
engine.log, vdsm.log, ceph.log, cinder logs none

Description Natalie Gavrielov 2015-12-06 15:13:41 UTC
Created attachment 1102807 [details]
engine.log, vdsm.log, ceph.log, cinder logs

Description of problem:

When performing an engine restart, during create VM from template with cinder disks, operation fails (VM fails to create) - which is ok, but a cinder disk is created, and it's is not linked to anything.

Version-Release number of selected component (if applicable):
rhevm-3.6.1-0.2.el6.noarch


How reproducible:

Not always, because it depends on when performing the engine restart.

Steps to Reproduce:
1. Create a VM, with a few cinder-ceph disks, and install an OS.
2. Make a template out of the VM.
3. Create a new VM out of the template.
4. Meanwhile, restart the engine.

Actual results:

VM from template was not created, which is OK, but..
A Cinder / Ceph volume is created:
In this particular case, VM template has 2 disks, 10gb bootable and the second one is 8gb.
Looking at cinder volumes, it seems that 8gb was created:
| ac9cbef9-c891-44e4-ad98-21a453c7be66 | available | cinder-vm_Disk2 |  8   |     ceph    |  false   |             |
This volume does not appear on the engine side (Disks tab).

engine.log:
2015-12-06 13:53:34,881 ERROR [org.ovirt.engine.core.vdsbroker.VdsManager] (DefaultQuartzScheduler_Worker-69) [] Timer update runtime info failed. Exception:: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: javax.resource.ResourceException: IJ000451: The connection manager is shutdown: java:/ENGINEDataSource
2015-12-06 13:53:34,881 ERROR [org.ovirt.engine.core.bll.storage.CloneSingleCinderDiskCommand] (pool-6-thread-2) [774e56bd] Exception: org.springframework.dao.DataAccessResourceFailureException: Error retreiving database metadata; nested exception is org.springframework.jdbc.support.MetaDataAccessException: Could not get Connection for extracting meta data; nested exception is org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: javax.resource.ResourceException: IJ000451: The connection manager is shutdown: java:/ENGINEDataSource
2015-12-06 13:53:34,916 ERROR [org.ovirt.engine.core.bll.storage.CloneSingleCinderDiskCommand] (pool-6-thread-2) [774e56bd] Transaction rolled-back for command 'org.ovirt.engine.core.bll.storage.CloneSingleCinderDiskCommand'.
2015-12-06 13:53:34,948 ERROR [org.ovirt.engine.core.bll.storage.CloneCinderDisksCommand] (pool-6-thread-1) [] Error cloning Cinder disk 'cinder-vm_Disk2': javax.ejb.EJBException: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: javax.resource.ResourceException: IJ000451: The connection manager is shutdown: java:/ENGINEDataSource
2015-12-06 13:53:34,949 ERROR [org.ovirt.engine.core.bll.CommandsFactory] (pool-6-thread-1) [] Error in invocating CTOR of command 'CloneSingleCinderDisk': null
2015-12-06 13:53:34,949 ERROR [org.ovirt.engine.core.bll.storage.CloneCinderDisksCommand] (pool-6-thread-1) [] Command 'org.ovirt.engine.core.bll.storage.CloneCinderDisksCommand' failed: null
2015-12-06 13:53:34,950 ERROR [org.ovirt.engine.core.bll.storage.CloneCinderDisksCommand] (pool-6-thread-1) [] Exception: java.lang.NullPointerException

Expected:
 
Either rollback or roll forward.
In case of a rollback - not leaving any leftovers such as disks on cinder/ceph side.

Comment 1 Maor 2016-01-10 12:05:51 UTC
I found a different scenario where the VM stays in lock status forever.
Since this was not the scenario in this specific bug, I've opened a new seperate bug on that issue since it is also related to VM which has only image disks (No Cinder disks) https://bugzilla.redhat.com/1297190

Comment 2 Natalie Gavrielov 2016-02-08 15:54:48 UTC
Verified, rhevm-3.6.3-0.1.el6.noarch.
Ran the scenario described in comment #0 a few times.
All result in a VM creation with cinder cinder disks.