Bug 1022975 - [vdsm] storage domain upgrade fails with attributeError
Summary: [vdsm] storage domain upgrade fails with attributeError
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: vdsm
Version: 3.3.0
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: 3.3.0
Assignee: Federico Simoncelli
QA Contact: Gadi Ickowicz
Whiteboard: storage
Keywords: Regression
Depends On:
Blocks: 1019391 3.3snap2
TreeView+ depends on / blocked
Reported: 2013-10-24 11:48 UTC by Gadi Ickowicz
Modified: 2016-02-10 20:47 UTC (History)
12 users (show)

The v3ResetMetaVolSize argument was changed from volume object to volume UUID, which triggered attribute errors during the execution. Consequently, upgrading a storage pool or domain from 3.0 compatibility mode to 3.1 failed. This update reintroduces volume objects as accepted arguments and correctly handles such exceptions.
Clone Of:
Last Closed: 2014-01-21 16:19:08 UTC
amureini: Triaged+

Attachments (Terms of Use)
vdsm + engine logs (13.22 MB, application/x-bzip)
2013-10-24 11:48 UTC, Gadi Ickowicz
no flags Details
vdsm logs (609.17 KB, application/gzip)
2013-11-10 13:44 UTC, Gadi Ickowicz
no flags Details

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2014:0040 normal SHIPPED_LIVE vdsm bug fix and enhancement update 2014-01-21 20:26:21 UTC
oVirt gerrit 20721 None None None Never
oVirt gerrit 20891 None None None Never

Description Gadi Ickowicz 2013-10-24 11:48:45 UTC
Created attachment 815741 [details]
vdsm + engine logs

Description of problem:
Upgrading a storage pool/domain from 3.0 compatibility mode to 3.1 fails with attribute error:

Thread-241::DEBUG::2013-10-22 08:58:07,378::resourceManager::648::ResourceManager::(releaseResource) No one is waiting for resource 'Storage.upgrade_7f288a0e-90d3-47ae-b2d2-7892bb42b950', Clearing records.
Thread-241::ERROR::2013-10-22 08:58:07,379::task::850::TaskManager.Task::(_setError) Task=`4b3edc02-9877-4b63-8518-294d68c1dbc2`::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 3565, in upgradeStoragePool
  File "/usr/share/vdsm/storage/securable.py", line 68, in wrapper
    return f(self, *args, **kwargs)
  File "/usr/share/vdsm/storage/sp.py", line 445, in _upgradePool
    self._convertDomain(self.masterDomain, str(targetDomVersion))
  File "/usr/share/vdsm/storage/sp.py", line 1093, in _convertDomain
  File "/usr/share/vdsm/storage/imageRepository/formatConverter.py", line 356, in convert
    converter(repoPath, hostId, imageRepo, isMsd)
  File "/usr/share/vdsm/storage/imageRepository/formatConverter.py", line 279, in v3DomainConverter
    v3ResetMetaVolSize(vol)  # BZ#811880
  File "/usr/share/vdsm/storage/imageRepository/formatConverter.py", line 132, in v3ResetMetaVolSize
    log.debug("Checking the volume size for the volume %s", vol.volUUID)
AttributeError: 'str' object has no attribute 'volUUID'
Thread-241::DEBUG::2013-10-22 08:58:07,382::task::869::TaskManager.Task::(_run) Task=`4b3edc02-9877-4b63-8518-294d68c1dbc2`::Task._run: 4b3edc02-9877-4b63-8518-294d68c1dbc2 ('7f288a0e-90d3-47ae-b2d2-7892bb42b950', '3') {} failed - stopping task

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Create dc+cluster with 3.0 compatiblity mode
2. Upgrade dc to 3.1 

Actual results:
Engine reports upgrade as successful however vdsm logs show upgrade process was terminated in the middle due to attribute error listed above

Expected results:
Upgrade should succeed

Additional info:

Comment 1 Federico Simoncelli 2013-10-30 23:50:50 UTC
This regression was introduced in commit:

 c072945 One shot prepare.

where img.prepare was replaced by sd.getVolsOfImage:

+            imgVolumes = sd.getVolsOfImage(allVolumes, imgUUID).keys()
-                for vol in img.prepare(domain.sdUUID, imgUUID):
+                try:
+                    domain.activateVolumes(imgUUID, imgVolumes)
+                except (OSError, se.CannotActivateLogicalVolumes):
+                    log.error("Image %s can't be activated.",
+                              imgUUID, exc_info=True)
+                for vol in imgVolumes:
                         v3ResetMetaVolSize(vol)  # BZ#811880

The patch changed the v3ResetMetaVolSize argument from a volume object to the volume uuid (string), therefore triggering the attribute error, e.g.:

 AttributeError: 'str' object has no attribute 'volUUID'

Comment 2 Gadi Ickowicz 2013-11-10 13:44:58 UTC
Created attachment 822076 [details]
vdsm logs

verified on is22 (vdsm-4.13.0-0.7.beta1.el6ev.x86_64) upgrade from 3.0 to 3.1 successful

Comment 3 Charlie 2013-11-28 00:35:24 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:


Thanks in advance.

Comment 4 errata-xmlrpc 2014-01-21 16:19:08 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.


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