Bug 1462526 - Copy of template Disk become illegal when trying to remove it from block-based master storage domain
Copy of template Disk become illegal when trying to remove it from block-base...
Status: CLOSED WORKSFORME
Product: ovirt-engine
Classification: oVirt
Component: BLL.Storage (Show other bugs)
4.2.0
Unspecified Unspecified
unspecified Severity high (vote)
: ovirt-4.2.0
: ---
Assigned To: Daniel Erez
Raz Tamir
: Regression
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-06-18 09:31 EDT by Eyal Shenitzky
Modified: 2017-10-23 08:18 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-10-23 08:18:52 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Storage
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
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 09:31 EDT, Eyal Shenitzky
no flags Details

  None (edit)
Description Eyal Shenitzky 2017-06-18 09:31:37 EDT
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 09:59:10 EDT
Regression?
Comment 2 Allon Mureinik 2017-06-19 04:47:06 EDT
(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 01:23:56 EDT
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 10:46:28 EDT
@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 07:32:22 EDT
(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 08:56:00 EDT
(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 08:18:52 EDT
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.