Bug 1304405 - Copying a disk converts the volume type to SHARED
Summary: Copying a disk converts the volume type to SHARED
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Storage
Version: 3.6.2.6
Hardware: Unspecified
OS: Unspecified
high
urgent
Target Milestone: ovirt-3.6.3
: 3.6.3.1
Assignee: Tal Nisan
QA Contact: Elad
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-02-03 14:15 UTC by Raz Tamir
Modified: 2016-03-10 12:49 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-03-10 12:49:23 UTC
oVirt Team: Storage
Embargoed:
rule-engine: ovirt-3.6.z+
rule-engine: exception+
ylavi: planning_ack+
amureini: devel_ack+
acanan: testing_ack+


Attachments (Terms of Use)
engine and vdsm logs (2.11 MB, application/x-gzip)
2016-02-03 14:15 UTC, Raz Tamir
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 53090 0 master MERGED core: Copy non template disks correctly 2016-02-04 15:14:41 UTC
oVirt gerrit 53097 0 ovirt-engine-3.6 MERGED core: Copy non template disks correctly 2016-02-04 16:13:55 UTC
oVirt gerrit 53098 0 ovirt-engine-3.6.3 MERGED core: Copy non template disks correctly 2016-02-04 16:14:48 UTC

Description Raz Tamir 2016-02-03 14:15:59 UTC
Created attachment 1120792 [details]
engine and vdsm logs

Description of problem:
* This bug scenario was raised by a customer

After copying a disk, the image type of the new image is shared.
After creating a snapshot with this new image it is impossible to perform live snapshot deletion.

From engine.log (the copy):

2016-02-03 14:24:51,292 INFO  [org.ovirt.engine.core.vdsbroker.irsbroker.CopyImageVDSCommand] (org.ovirt.thread.pool-7-thread-35) [3bbc6663] START, CopyImageVDSCommand( CopyImageVDSCommandParameters:{runAsync='true
', storagePoolId='6b6602e0-bc14-41b8-8e4b-a1ef53f83750', ignoreFailoverLimit='false', storageDomainId='f165957f-0a0c-4bb6-90c8-bbf5fcfeb4dc', imageGroupId='6708758f-1644-4044-9512-6eb2928b7b1b', imageId='b07b76bc-9
b30-4e5f-8249-1dd22f8807d3', dstImageGroupId='18dc6f7c-cf15-441f-b0cd-a13a9a8b443f', vmId='00000000-0000-0000-0000-000000000000', dstImageId='58e8e1a7-0f15-40c1-a231-54dcb4e8aab8', imageDescription='', dstStorageDo
mainId='f165957f-0a0c-4bb6-90c8-bbf5fcfeb4dc', copyVolumeType='SharedVol', volumeFormat='COW', preallocate='Sparse', postZero='false', force='false'})

From engine.log (live merge):

2016-02-02 18:40:46,371 INFO  [org.ovirt.engine.core.vdsbroker.vdsbroker.MergeVDSCommand] (pool-6-thread-3) [195f830e] START, MergeVDSCommand(HostName = host_mixed_2, MergeVDSCommandParameters:{runAsync='true', hostId='e1903445-198c-4c69-aae3-7aba812145ac', vmId='8f26ad7e-6243-40a2-bd6e-e5438bbcae84', storagePoolId='6b6602e0-bc14-41b8-8e4b-a1ef53f83750', storageDomainId='7b00a096-46ae-4241-956d-9a8461f0227a', imageGroupId='5521c659-0a1e-4880-ac46-a9ff0c756b6d', imageId='8f136f80-4008-469a-8d0b-cd0e830c1920', baseImageId='76aebca7-0067-470b-b101-5f24fa2bfa4d', topImageId='8f136f80-4008-469a-8d0b-cd0e830c1920', bandwidth='0'}), log id: 20f2a1d1
2016-02-02 18:40:47,490 ERROR [org.ovirt.engine.core.vdsbroker.vdsbroker.MergeVDSCommand] (pool-6-thread-3) [195f830e] Failed in 'MergeVDS' method
2016-02-02 18:40:47,495 ERROR [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (pool-6-thread-3) [195f830e] Correlation ID: null, Call Stack: null, Custom Event ID: -1, Message: VDSM host_mixed_2 command failed: Merge failed
2016-02-02 18:40:47,495 INFO  [org.ovirt.engine.core.vdsbroker.vdsbroker.MergeVDSCommand] (pool-6-thread-3) [195f830e] Command 'org.ovirt.engine.core.vdsbroker.vdsbroker.MergeVDSCommand' return value 'StatusOnlyReturnForXmlRpc [status=StatusForXmlRpc [code=52, message=Merge failed]]'
2016-02-02 18:40:47,495 INFO  [org.ovirt.engine.core.vdsbroker.vdsbroker.MergeVDSCommand] (pool-6-thread-3) [195f830e] HostName = host_mixed_2
2016-02-02 18:40:47,495 ERROR [org.ovirt.engine.core.vdsbroker.vdsbroker.MergeVDSCommand] (pool-6-thread-3) [195f830e] Command 'MergeVDSCommand(HostName = host_mixed_2, MergeVDSCommandParameters:{runAsync='true', hostId='e1903445-198c-4c69-aae3-7aba812145ac', vmId='8f26ad7e-6243-40a2-bd6e-e5438bbcae84', storagePoolId='6b6602e0-bc14-41b8-8e4b-a1ef53f83750', storageDomainId='7b00a096-46ae-4241-956d-9a8461f0227a', imageGroupId='5521c659-0a1e-4880-ac46-a9ff0c756b6d', imageId='8f136f80-4008-469a-8d0b-cd0e830c1920', baseImageId='76aebca7-0067-470b-b101-5f24fa2bfa4d', topImageId='8f136f80-4008-469a-8d0b-cd0e830c1920', bandwidth='0'})' execution failed: VDSGenericException: VDSErrorException: Failed to MergeVDS, error = Merge failed, code = 52
2016-02-02 18:40:47,495 INFO  [org.ovirt.engine.core.vdsbroker.vdsbroker.MergeVDSCommand] (pool-6-thread-3) [195f830e] FINISH, MergeVDSCommand, log id: 20f2a1d1
2016-02-02 18:40:47,496 ERROR [org.ovirt.engine.core.bll.MergeCommand] (pool-6-thread-3) [195f830e] Command 'org.ovirt.engine.core.bll.MergeCommand' failed: EngineException: org.ovirt.engine.core.vdsbroker.vdsbroker.VDSErrorException: VDSGenericException: VDSErrorException: Failed to MergeVDS, error = Merge failed, code = 52 (Failed with error mergeErr and code 52)
2016-02-02 18:40:47,547 ERROR [org.ovirt.engine.core.bll.MergeCommand] (pool-6-thread-3) [195f830e] Transaction rolled-back for command 'org.ovirt.engine.core.bll.MergeCommand'.
2016-02-02 18:40:48,326 ERROR [org.ovirt.engine.core.bll.RemoveSnapshotSingleDiskLiveCommand] (DefaultQuartzScheduler_Worker-39) [7342129b] Failed child command status for step 'MERGE'
2016-02-02 18:40:49,389 ERROR [org.ovirt.engine.core.bll.RemoveSnapshotSingleDiskLiveCommand] (DefaultQuartzScheduler_Worker-64) [7342129b] Merging of snapshot '133c508d-b4f7-48cd-9184-ae2cbd48e631' images '76aebca7-0067-470b-b101-5f24fa2bfa4d'..'8f136f80-4008-469a-8d0b-cd0e830c1920' failed. Images have been marked illegal and can no longer be previewed or reverted to. Please retry Live Merge on the snapshot to complete the operation.
2016-02-02 18:40:49,456 INFO  [org.ovirt.engine.core.bll.RemoveSnapshotCommandCallback] (DefaultQuartzScheduler_Worker-64) [719d4e9] All Live Merge child commands have completed, status 'FAILED'
2016-02-02 18:40:50,497 ERROR [org.ovirt.engine.core.bll.RemoveSnapshotCommand] (DefaultQuartzScheduler_Worker-2) [719d4e9] Ending command 'org.ovirt.engine.core.bll.RemoveSnapshotCommand' with failure.
2016-02-02 18:40:50,572 ERROR [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (DefaultQuartzScheduler_Worker-2) [719d4e9] Correlation ID: 719d4e9, Job ID: 10a1a12d-c74a-49ee-987f-f3750529b4e5, Call Stack: null, Custom Event ID: -1, Message: Failed to delete snapshot 's1' for VM 'cloned'.


From vdsm.log:

jsonrpc.Executor/3::ERROR::2016-02-03 15:53:59,831::vm::4845::virt.vm::(merge) vmId=`a115617b-9295-4429-ad1a-1a03219e46e9`



Version-Release number of selected component (if applicable):
vdsm-4.17.19-0.el7ev.noarch
rhevm-3.6.2.6-0.1.el6.noarch

How reproducible:
100%

Steps to Reproduce:
1. Create vm + 1 disk
2. Copy the disk
3. Remove the original disk
4. Attache the copy disk to the vm
5. Create snapshot
6. Start the vm and live delete the snapshot

Actual results:
Explained above

Expected results:


Additional info:
engine and vdsm logs are attached
** ignore failures related to 'Storage domain does not exist'

Comment 1 Allon Mureinik 2016-02-03 16:34:36 UTC
(In reply to ratamir from comment #0)
> Description of problem:
> * This bug scenario was raised by a customer
Can you include attach the ticket's link for future reference please?

> 
> After copying a disk, the image type of the new image is shared.
> After creating a snapshot with this new image it is impossible to perform
> live snapshot deletion.
A SHARED volume means a template. So a live merge should indeed refuse to merge to a SHARED volume. The bug here, if so, is that copying a disk converts it to SHARED.

Tentatively targeting to 3.6.5
If the above analysis is correct, we should strive to push it in to 3.6.3 too.

Comment 2 Aharon Canan 2016-02-04 08:58:20 UTC
(In reply to Allon Mureinik from comment #1)
> (In reply to ratamir from comment #0)
> > Description of problem:
> > * This bug scenario was raised by a customer
> Can you include attach the ticket's link for future reference please?
> 

Came from ovirt.org, not from customer (GSS) so no ticket here.

> > 
> > After copying a disk, the image type of the new image is shared.
> > After creating a snapshot with this new image it is impossible to perform
> > live snapshot deletion.
> A SHARED volume means a template. So a live merge should indeed refuse to
> merge to a SHARED volume. The bug here, if so, is that copying a disk
> converts it to SHARED.
> 
> Tentatively targeting to 3.6.5
> If the above analysis is correct, we should strive to push it in to 3.6.3
> too.

Comment 3 Raz Tamir 2016-02-04 09:01:41 UTC
Hi Allon,
If "live merge should indeed refuse to merge to a SHARED volume" so the bug should be the copying a disk converts the image volume to shared, because from the copy command, copyVolumeType='SharedVol'

Comment 4 Allon Mureinik 2016-02-04 09:04:00 UTC
(In reply to ratamir from comment #3)
> Hi Allon,
> If "live merge should indeed refuse to merge to a SHARED volume" so the bug
> should be the copying a disk converts the image volume to shared, because
> from the copy command, copyVolumeType='SharedVol'

Yup, agreed. As I stated in comment 1 - "The bug here, if so, is that copying a disk converts it to SHARED."

Comment 5 Gil Klein 2016-02-04 09:19:09 UTC
(In reply to Aharon Canan from comment #2)
> (In reply to Allon Mureinik from comment #1)
> > (In reply to ratamir from comment #0)
> > > Description of problem:
> > > * This bug scenario was raised by a customer
> > Can you include attach the ticket's link for future reference please?
> > 
> 
> Came from ovirt.org, not from customer (GSS) so no ticket here.
>
Link to the email thread is here [1]

[1] http://lists.ovirt.org/pipermail/users/2016-January/thread.html#37577

Comment 6 Elad 2016-02-22 13:11:56 UTC
After disk copy, replaced the attached disk to the copied one, created a snapshot and live merged it. merge succeeded.

2016-02-22 12:37:30,520 INFO  [org.ovirt.engine.core.vdsbroker.irsbroker.CopyImageVDSCommand] (org.ovirt.thread.pool-6-thread-24) [2a94a962] START, CopyImageVDSCommand
....
copyVolumeType='LeafVol'


Verified using:
rhevm-3.6.3.2-0.1.el6.noarch
vdsm-4.17.21-0.el7ev.noarch


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