Bug 1462526 - Copy of template Disk become illegal when trying to remove it from block-based master storage domain
Summary: Copy of template Disk become illegal when trying to remove it from block-base...
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Storage
Version: 4.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ovirt-4.2.0
: ---
Assignee: Daniel Erez
QA Contact: Raz Tamir
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-06-18 13:31 UTC by Eyal Shenitzky
Modified: 2017-10-23 12:18 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-10-23 12:18:52 UTC
oVirt Team: Storage
Embargoed:
derez: needinfo-
rule-engine: ovirt-4.2+
rule-engine: blocker+


Attachments (Terms of Use)
engine and vdsm logs (2.40 MB, application/x-gzip)
2017-06-18 13:31 UTC, Eyal Shenitzky
no flags Details

Description Eyal Shenitzky 2017-06-18 13:31:37 UTC
Created attachment 1288845 [details]
engine and vdsm logs

Description of problem:

When trying to remove a copy of template disk that found on block-based storage domain, the operation failed if the domain is the master storage domain (and the disk copy created before the domain become the master storage domain) and the disk move to 'illegal' state.

When trying to create a VM from the template with the illegal disk, the operation succeeds and the disk return to 'ok' state.


Engine log:

017-06-18 16:28:00,201+03 ERROR [org.ovirt.engine.core.bll.storage.disk.image.RemoveImageCommand] (org.ovirt.thread.pool-7-thread-3) [765d4dfd-3ec2-469f-ad4e-c25ab29d93ff] Command 'org.ovirt.engine.core.bll.storage.disk.image.RemoveImageCommand' failed: EngineException: org.ovirt.engine.core.vdsbroker.irsbroker.IrsOperationFailedNoFailoverException: IRSGenericException: IRSErrorException: Shared Volume cannot be deleted: ("Cannot delete shared image b01daa49-8919-49b8-bce4-ca083223e8df. volImgs: {'fad4f7fa-7f9e-43ed-94ce-15ae1c4c375d': ImgsPar(imgs=['b01daa49-8919-49b8-bce4-ca083223e8df', '83388a88-e57b-4543-a8cf-a777c2bd632d'], parent='00000000-0000-0000-0000-000000000000')}",) (Failed with error CannotDeleteSharedVolume and code 223)


Version-Release number of selected component (if applicable):
Engine - 4.2.0-0.0.master.20170612192318.gitf773263.el7.centos
VDSM - 4.20.0-1049.gite64d80e.el7.centos.x86_64

How reproducible:
75%

Steps to Reproduce:
1. Create 2 block-based storage domains.
2. Create a template from a VM.
3. Copy the template disk to the second storage domain
4. Move the master storage domain to maintenance.
5. Try to remove the disk that found on the new master storage domain

Actual results:
Failed to remove the copy of the template disk and the disk become 'illegal'.

Expected results:
The disk should remove successfully

Additional info:
Engine and VDSM logs attached

Comment 1 Yaniv Kaul 2017-06-18 13:59:10 UTC
Regression?

Comment 2 Allon Mureinik 2017-06-19 08:47:06 UTC
(In reply to Yaniv Kaul from comment #1)
> Regression?

In order words - Eyal, does this happen in 4.1.z too?

Comment 3 Red Hat Bugzilla Rules Engine 2017-06-20 05:23:56 UTC
This bug report has Keywords: Regression or TestBlocker.
Since no regressions or test blockers are allowed between releases, it is also being identified as a blocker for this release. Please resolve ASAP.

Comment 4 Daniel Erez 2017-07-09 14:46:28 UTC
@Eyal - CannotDeleteSharedVolume error means that there is an image based on the one you've tried to delete. Have you created a VM from that template?

Comment 5 Allon Mureinik 2017-07-10 11:32:22 UTC
(In reply to Daniel Erez from comment #4)
> @Eyal - CannotDeleteSharedVolume error means that there is an image based on
> the one you've tried to delete. Have you created a VM from that template?
But shouldn't it be blocked by engine in that case?

Comment 6 Daniel Erez 2017-07-10 12:56:00 UTC
(In reply to Allon Mureinik from comment #5)
> (In reply to Daniel Erez from comment #4)
> > @Eyal - CannotDeleteSharedVolume error means that there is an image based on
> > the one you've tried to delete. Have you created a VM from that template?
> But shouldn't it be blocked by engine in that case?

Should be, but it may be to source of this issue if not.

Comment 7 Daniel Erez 2017-10-23 12:18:52 UTC
Couldn't reproduce on latest build following the described scenario. Please re-open if reproduced and provide exact steps.


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