Bug 998411 - [vdsm] guest alignment scan fails on host due to lvchange (deactivate lv) failure
Summary: [vdsm] guest alignment scan fails on host due to lvchange (deactivate lv) fai...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: vdsm
Version: 3.3.0
Hardware: x86_64
OS: Unspecified
unspecified
high
Target Milestone: ---
: 3.3.0
Assignee: Yeela Kaplan
QA Contact: Leonid Natapov
URL:
Whiteboard: storage
Depends On:
Blocks: 773427
TreeView+ depends on / blocked
 
Reported: 2013-08-19 08:56 UTC by Elad
Modified: 2016-02-10 17:34 UTC (History)
11 users (show)

Fixed In Version: is13
Doc Type: Bug Fix
Doc Text:
An alignment scan failed on a disk that had been partitioned because VDSM failed to deactivate the volume. This was because the engine expected a dictionary word instead of an integer for the status of getDiskAlignment. This has now been fixed, and the alignment scan succeeds as expected.
Clone Of:
Environment:
Last Closed: 2014-01-21 16:12:53 UTC
oVirt Team: Storage
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
logs (1.27 MB, application/x-gzip)
2013-08-19 08:56 UTC, Elad
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2014:0040 0 normal SHIPPED_LIVE vdsm bug fix and enhancement update 2014-01-21 20:26:21 UTC
oVirt gerrit 18737 0 None MERGED clientIF: return doneCode in getDiskAlignment 2020-07-06 17:07:30 UTC

Description Elad 2013-08-19 08:56:20 UTC
Created attachment 787953 [details]
logs

Description of problem:
related to this new 3.3 feature:
https://bugzilla.redhat.com/show_bug.cgi?id=773427

I tried to scan alignment a disk that has been partitioned.
This action is failing every time because vdsm is unable to deactivate the volume


Version-Release number of selected component (if applicable):
vdsm-4.12.0-61.git8178ec2.el6ev.x86_64

How reproducible:
100%

Steps to Reproduce:
On a block pool:
- create a vm and run it with OS and guest-agent installed.
- add a new 3 GB disk and plug it to the vm.
- create a partition on the disk that starts from the 2048 sector with fdisk (need to change the units to sectors)
- scan alignment (on UI - under disk sub-tab, under VMs main tab - right click on the disk - 'scan alignment'

Actual results:
vdsm fails in lvchange (deactivate lv):

:
Thread-36873::ERROR::2013-08-19 11:19:21,416::task::850::TaskManager.Task::(_setError) Task=`d91d258d-e546-4af0-ae20-b5910d581072`::Unexpected error
Traceback (most recent call last):
  File "/usr/share/vdsm/storage/task.py", line 857, in _run
    return fn(*args, **kargs)
  File "/usr/share/vdsm/logUtils.py", line 45, in wrapper
    res = f(*args, **kwargs)
  File "/usr/share/vdsm/storage/hsm.py", line 3270, in teardownImage
    dom.deactivateImage(imgUUID)
  File "/usr/share/vdsm/storage/blockSD.py", line 998, in deactivateImage
    lvm.deactivateLVs(self.sdUUID, volUUIDs)
  File "/usr/share/vdsm/storage/lvm.py", line 1129, in deactivateLVs
    _setLVAvailability(vgName, toDeactivate, "n")
  File "/usr/share/vdsm/storage/lvm.py", line 784, in _setLVAvailability
    raise error(str(e))
CannotDeactivateLogicalVolume: Cannot deactivate Logical Volume: ('General Storage Exception: ("5 [] [\'  device-mapper: remove ioctl on  failed: Device or resource busy\

and vdsm is unable to scan guest alignment

Expected results:
This volume is activated so I'm not sure about the expected results.

Additional info:
logs

Comment 1 Leonid Natapov 2013-09-17 08:38:47 UTC
is13. guest alignment succeeds.

Comment 2 Charlie 2013-11-28 00:33:02 UTC
This bug is currently attached to errata RHBA-2013:15291. If this change is not to be documented in the text for this errata please either remove it from the errata, set the requires_doc_text flag to 
minus (-), or leave a "Doc Text" value of "--no tech note required" if you do not have permission to alter the flag.

Otherwise to aid in the development of relevant and accurate release documentation, please fill out the "Doc Text" field above with these four (4) pieces of information:

* Cause: What actions or circumstances cause this bug to present.
* Consequence: What happens when the bug presents.
* Fix: What was done to fix the bug.
* Result: What now happens when the actions or circumstances above occur. (NB: this is not the same as 'the bug doesn't present anymore')

Once filled out, please set the "Doc Type" field to the appropriate value for the type of change made and submit your edits to the bug.

For further details on the Cause, Consequence, Fix, Result format please refer to:

https://bugzilla.redhat.com/page.cgi?id=fields.html#cf_release_notes 

Thanks in advance.

Comment 3 errata-xmlrpc 2014-01-21 16:12:53 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2014-0040.html


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