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

Bug 1092371

Summary: Extending Thin provision Read Only Disk should block with canDoAction
Product: Red Hat Enterprise Virtualization Manager Reporter: Raz Tamir <ratamir>
Component: ovirt-engineAssignee: Vered Volansky <vered>
Status: CLOSED CURRENTRELEASE QA Contact: Ori Gofen <ogofen>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 3.4.0CC: acanan, acathrow, amureini, gklein, iheim, knesenko, lpeer, Rhev-m-bugs, scohen, tnisan, yeylon
Target Milestone: ---   
Target Release: 3.4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: storage
Fixed In Version: org.ovirt.engine-root-3.4.0-17 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 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
vdsm and engine logs none

Description Raz Tamir 2014-04-29 07:45:14 UTC
Created attachment 890681 [details]
vdsm and engine logs

Description of problem:
Trying to extend a sparse RO disk will cause the following ERROR on VDSM:
Thread-13::ERROR::2014-04-28 20:12:40,360::vm::4353::vm.Vm::(_diskSizeExtendCow) vmId=`f65ca7d3-4b82-4c92-bf6a-d72180f20c97`::An error occurred while trying to extend the disk vdb to size 1
6106127360
Traceback (most recent call last):
  File "/usr/share/vdsm/vm.py", line 4349, in _diskSizeExtendCow
    libvirt.VIR_DOMAIN_BLOCK_RESIZE_BYTES)
  File "/usr/share/vdsm/vm.py", line 859, in f
    ret = attr(*args, **kwargs)
  File "/usr/lib64/python2.6/site-packages/vdsm/libvirtconnection.py", line 92, in wrapper
    ret = f(*args, **kwargs)
  File "/usr/lib64/python2.6/site-packages/libvirt.py", line 648, in blockResize
    if ret == -1: raise libvirtError ('virDomainBlockResize() failed', dom=self)
libvirtError: internal error unable to execute QEMU command 'block_resize': Device 'drive-virtio-disk1' is read only

This should be blocked with CanDoAction I guess.


Version-Release number of selected component (if applicable):
3.4.0-0.15.beta3.el6ev.noarch
vdsm-4.14.7-0.1.beta3.el6ev.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Attach a sparse disk to vm as RO
2. Try to extend the disk
3.

Actual results:
Explained above


Expected results:
Operation should block with CanDoAction

Additional info:

Comment 1 Allon Mureinik 2014-04-29 08:34:02 UTC
This should be fixed together with bug 1092087 - we should have a single patch to add a CDA regardless of the disk's format or allocation policy.

Comment 2 Ori Gofen 2014-05-12 14:44:48 UTC
verified on av9 operation blocked,from logs:

"WARN  [org.ovirt.engine.core.bll.UpdateVmDiskCommand] (ajp-/127.0.0.1:8702-5) [738650b2] CanDoAction of action UpdateVmDisk failed. Reasons:VAR__ACTION__UPDATE,VAR__TYPE__VM_DISK,
ACTION_TYPE_FAILED_CANNOT_RESIZE_READ_ONLY_DISK"

Comment 3 Itamar Heim 2014-06-12 14:09:00 UTC
Closing as part of 3.4.0