AttributeError: 'Volume' object has no attribute 'instance_uuid' in VNX cinder driver

Bug #1432925 reported by Tina Tang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Medium
Tina Tang

Bug Description

The multi attach feature removed the instance_uuid field from the Volume object. However VNX driver is using this field to determine whether a volume is attached to a VM when do the volume retype.

https://review.openstack.org/#/c/85847/47/cinder/db/sqlalchemy/models.py

Now there is an exception thrown in the VNX driver as below:

1310849 2015-03-16 12:47:54.522 74387 ERROR cinder.volume.manager [-] Volume 53335089-b054-4f3e-aa03-19a5ece2a724: driver error when trying to retype, fallin g back to generic mechanism.
1310850 2015-03-16 12:47:54.523 74387 ERROR cinder.volume.manager [-] 'Volume' object has no attribute 'instance_uuid'
1310851 2015-03-16 12:47:54.523 74387 TRACE cinder.volume.manager Traceback (most recent call last):
1310852 2015-03-16 12:47:54.523 74387 TRACE cinder.volume.manager File "/opt/stack/cinder/cinder/volume/manager.py", line 1621, in retype
1310853 2015-03-16 12:47:54.523 74387 TRACE cinder.volume.manager host)
1310854 2015-03-16 12:47:54.523 74387 TRACE cinder.volume.manager File "/usr/local/lib/python2.7/dist-packages/osprofiler/profiler.py", line 105, in wrappe r
1310855 2015-03-16 12:47:54.523 74387 TRACE cinder.volume.manager return f(*args, **kwargs)
1310856 2015-03-16 12:47:54.523 74387 TRACE cinder.volume.manager File "/opt/stack/cinder/cinder/volume/drivers/emc/emc_cli_iscsi.py", line 93, in retype
1310857 2015-03-16 12:47:54.523 74387 TRACE cinder.volume.manager return self.cli.retype(ctxt, volume, new_type, diff, host)
1310858 2015-03-16 12:47:54.523 74387 TRACE cinder.volume.manager File "/opt/stack/cinder/cinder/volume/drivers/emc/emc_vnx_cli.py", line 1977, in retype
1310859 2015-03-16 12:47:54.523 74387 TRACE cinder.volume.manager volume, host, new_type))
1310860 2015-03-16 12:47:54.523 74387 TRACE cinder.volume.manager File "/opt/stack/cinder/cinder/volume/drivers/emc/emc_vnx_cli.py", line 1907, in _is_vali d_for_storage_assisted_migration
1310861 2015-03-16 12:47:54.523 74387 TRACE cinder.volume.manager and self._get_original_status(volume) == 'in-use':
1310862 2015-03-16 12:47:54.523 74387 TRACE cinder.volume.manager File "/opt/stack/cinder/cinder/volume/drivers/emc/emc_vnx_cli.py", line 1859, in _get_ori ginal_status
1310863 2015-03-16 12:47:54.523 74387 TRACE cinder.volume.manager if (volume['instance_uuid'] is None and
1310864 2015-03-16 12:47:54.523 74387 TRACE cinder.volume.manager File "/usr/local/lib/python2.7/dist-packages/oslo_db/sqlalchemy/models.py", line 54, in _ _getitem__
1310865 2015-03-16 12:47:54.523 74387 TRACE cinder.volume.manager return getattr(self, key)
1310866 2015-03-16 12:47:54.523 74387 TRACE cinder.volume.manager AttributeError: 'Volume' object has no attribute 'instance_uuid'

Tina Tang (tina-tang)
description: updated
Changed in cinder:
assignee: nobody → Tina Tang (tina-tang)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

Fix proposed to branch: master
Review: https://review.openstack.org/164976

Changed in cinder:
status: New → In Progress
Jay Bryant (jsbryant)
Changed in cinder:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/164976
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=82a1eb73d84c24bcc43cd86cf20e00dff1108763
Submitter: Jenkins
Branch: master

commit 82a1eb73d84c24bcc43cd86cf20e00dff1108763
Author: Tina <email address hidden>
Date: Mon Mar 16 18:55:31 2015 -0400

    Remove the reference of volume['instance_uuid']in VNX driver

    Multiattach feature removed the column 'instance_uuid' and
    'attached_host' from volume DB model. However, these 2 fields are
    used by VNX driver to determine the volume's original status
    in retype. This patch changed the VNX driver to not use those
    removed fields.

    Change-Id: I4b4820d93e784913eeb7e485439d5f434141bcb9
    Closes-Bug: 1432925

Changed in cinder:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in cinder:
milestone: none → kilo-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in cinder:
milestone: kilo-3 → 2015.1.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.