EMC VMAX Volume Snapshot failing with volume cannot be found

Bug #1616133 reported by David Rosales
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Medium
Helen Walsh

Bug Description

The volume snapshot feature is failing for EMC VMAX. The driver is attempting to parse the volume_id out of the volume_name of the source volume in the create_snapshot function. The snapshot object that is being passed around here already has the volume_id. It looks like this should be used here instead of attempting to parse the id from the name

Revision history for this message
David Rosales (darosale) wrote :
Download full text (3.5 KiB)

2016-08-23 11:28:02.348 36948 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/server.py", line 133, in _process_incoming
2016-08-23 11:28:02.348 36948 ERROR oslo_messaging.rpc.server res = self.dispatcher.dispatch(message)
2016-08-23 11:28:02.348 36948 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 150, in dispatch
2016-08-23 11:28:02.348 36948 ERROR oslo_messaging.rpc.server return self._do_dispatch(endpoint, method, ctxt, args)
2016-08-23 11:28:02.348 36948 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 121, in _do_dispatch
2016-08-23 11:28:02.348 36948 ERROR oslo_messaging.rpc.server result = func(ctxt, **new_args)
2016-08-23 11:28:02.348 36948 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/cinder/volume/manager.py", line 816, in create_snapshot
2016-08-23 11:28:02.348 36948 ERROR oslo_messaging.rpc.server snapshot.save()
2016-08-23 11:28:02.348 36948 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__
2016-08-23 11:28:02.348 36948 ERROR oslo_messaging.rpc.server self.force_reraise()
2016-08-23 11:28:02.348 36948 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
2016-08-23 11:28:02.348 36948 ERROR oslo_messaging.rpc.server six.reraise(self.type_, self.value, self.tb)
2016-08-23 11:28:02.348 36948 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/cinder/volume/manager.py", line 808, in create_snapshot
2016-08-23 11:28:02.348 36948 ERROR oslo_messaging.rpc.server model_update = self.driver.create_snapshot(snapshot)
2016-08-23 11:28:02.348 36948 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/cinder/volume/drivers/emc/emc_vmax_fc.py", line 130, in create_snapshot
2016-08-23 11:28:02.348 36948 ERROR oslo_messaging.rpc.server volume = self.db.volume_get(ctxt, volumeid)
2016-08-23 11:28:02.348 36948 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/cinder/db/api.py", line 251, in volume_get
2016-08-23 11:28:02.348 36948 ERROR oslo_messaging.rpc.server return IMPL.volume_get(context, volume_id)
2016-08-23 11:28:02.348 36948 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/cinder/db/sqlalchemy/api.py", line 197, in wrapper
2016-08-23 11:28:02.348 36948 ERROR oslo_messaging.rpc.server return f(*args, **kwargs)
2016-08-23 11:28:02.348 36948 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/cinder/db/sqlalchemy/api.py", line 1743, in volume_get
2016-08-23 11:28:02.348 36948 ERROR oslo_messaging.rpc.server return _volume_get(context, volume_id)
2016-08-23 11:28:02.348 36948 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/cinder/db/sqlalchemy/api.py", line 197, in wrapper
2016-08-23 11:28:02.348 36948 ERROR oslo_messaging.rpc.server return f(*args, **kwargs)
2016-08-23 11:28:02.348 36948 ERROR oslo_messaging.rpc.server File ...

Read more...

Revision history for this message
David Rosales (darosale) wrote :

The case is the same for delete snapshot. It performs the same logic to parse the volume id instead of using snapshot['volume_id']

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/363546

Changed in cinder:
assignee: nobody → Helen Walsh (walshh2)
status: New → In Progress
Xing Yang (xing-yang)
Changed in cinder:
milestone: none → newton-rc1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/363546
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=0d241780eec2571a310593e15f0f001d5fad8637
Submitter: Jenkins
Branch: master

commit 0d241780eec2571a310593e15f0f001d5fad8637
Author: Helen Walsh <email address hidden>
Date: Wed Aug 31 10:54:46 2016 +0100

    VMAX driver - Retrieve volume from snapshot

    The VMAX driver retrieves volume id from snapshot['volume_name'] in
    create_snapshot and delete_snapshot and then gets volume from db using
    the volume id. If the volume_name is changed, volume id may not be in
    it any more. This is not a reliable way of getting volume id.
    Also a driver should not access db directly. In this patch, the source
    volume is retrieved from snapshot without parsing the volume name for
    volume id and accessing db.

    Change-Id: I99ebecb27d82d5a967369a04bf2c34158e6670ec
    Closes-Bug: #1616133

Changed in cinder:
status: In Progress → Fix Released
Xing Yang (xing-yang)
Changed in cinder:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/cinder 9.0.0.0rc1

This issue was fixed in the openstack/cinder 9.0.0.0rc1 release candidate.

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.