share-group-snapshot-create is not passing share as part of snapshot

Bug #1660321 reported by Rodrigo Barbieri
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Shared File Systems Service (Manila)
Fix Released
High
Valeriy Ponomaryov

Bug Description

When attempting to create a share-group-snapshot, drivers are invoked in a loop to create snapshot of shares member of the group. This call to drivers, however, has its parameters inconsistent with snapshot-create call, as it is not passing the share within the snapshot object, causing some drivers to fail, such as the HNAS manila driver. See exception below:

2017-01-30 07:30:28.97 ERROR manila.share.manager [req-b4fe447d-187c-4d94-86be-ab8a7f2a5a74 6a08846c319c4ae5aa3c09402e88a450 649c607e28c244d2b58b22840c2214af] Share group snapshot fa66eea4-b6b1-47bf-a2f5-753803305cc8: create failed
2017-01-30 07:30:28.98 ERROR oslo_messaging.rpc.server [req-b4fe447d-187c-4d94-86be-ab8a7f2a5a74 6a08846c319c4ae5aa3c09402e88a450 649c607e28c244d2b58b22840c2214af] Exception during message handling
2017-01-30 07:30:28.98 TRACE oslo_messaging.rpc.server Traceback (most recent call last):
2017-01-30 07:30:28.98 TRACE oslo_messaging.rpc.server File "/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/server.py", line 155, in _process_incoming
2017-01-30 07:30:28.98 TRACE oslo_messaging.rpc.server res = self.dispatcher.dispatch(message)
2017-01-30 07:30:28.98 TRACE oslo_messaging.rpc.server File "/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 222, in dispatch
2017-01-30 07:30:28.98 TRACE oslo_messaging.rpc.server return self._do_dispatch(endpoint, method, ctxt, args)
2017-01-30 07:30:28.98 TRACE oslo_messaging.rpc.server File "/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 192, in _do_dispatch
2017-01-30 07:30:28.98 TRACE oslo_messaging.rpc.server result = func(ctxt, **new_args)
2017-01-30 07:30:28.98 TRACE oslo_messaging.rpc.server File "/opt/stack/manila/manila/utils.py", line 519, in wrapper
2017-01-30 07:30:28.98 TRACE oslo_messaging.rpc.server return func(self, *args, **kwargs)
2017-01-30 07:30:28.98 TRACE oslo_messaging.rpc.server File "/opt/stack/manila/manila/share/manager.py", line 3595, in create_share_group_snapshot
2017-01-30 07:30:28.98 TRACE oslo_messaging.rpc.server share_group_snapshot_id)
2017-01-30 07:30:28.98 TRACE oslo_messaging.rpc.server File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 220, in __exit__
2017-01-30 07:30:28.98 TRACE oslo_messaging.rpc.server self.force_reraise()
2017-01-30 07:30:28.98 TRACE oslo_messaging.rpc.server File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise
2017-01-30 07:30:28.98 TRACE oslo_messaging.rpc.server six.reraise(self.type_, self.value, self.tb)
2017-01-30 07:30:28.98 TRACE oslo_messaging.rpc.server File "/opt/stack/manila/manila/share/manager.py", line 3575, in create_share_group_snapshot
2017-01-30 07:30:28.98 TRACE oslo_messaging.rpc.server context, snap_ref, share_server=share_server))
2017-01-30 07:30:28.98 TRACE oslo_messaging.rpc.server File "/opt/stack/manila/manila/share/driver.py", line 1341, in create_share_group_snapshot
2017-01-30 07:30:28.98 TRACE oslo_messaging.rpc.server share_server=share_server)
2017-01-30 07:30:28.98 TRACE oslo_messaging.rpc.server File "/opt/stack/manila/manila/share/drivers/hitachi/hnas/driver.py", line 394, in create_snapshot
2017-01-30 07:30:28.98 TRACE oslo_messaging.rpc.server export_locations = self._create_snapshot(hnas_share_id, snapshot)
2017-01-30 07:30:28.98 TRACE oslo_messaging.rpc.server File "/opt/stack/manila/manila/share/drivers/hitachi/hnas/driver.py", line 962, in _create_snapshot
2017-01-30 07:30:28.98 TRACE oslo_messaging.rpc.server self._ensure_share(snapshot['share'], hnas_share_id)
2017-01-30 07:30:28.98 TRACE oslo_messaging.rpc.server KeyError: 'share'
2017-01-30 07:30:28.98 TRACE oslo_messaging.rpc.server

Changed in manila:
importance: Undecided → High
milestone: none → ocata-rc1
Changed in manila:
status: New → In Progress
assignee: nobody → Valeriy Ponomaryov (vponomaryov)
Revision history for this message
Valeriy Ponomaryov (vponomaryov) wrote :

Bot haven't mapped existing commit for some reason, here it is: https://review.openstack.org/#/c/427811/

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to manila (master)

Reviewed: https://review.openstack.org/427811
Committed: https://git.openstack.org/cgit/openstack/manila/commit/?id=64649b97e7eea1a76d0d78feb7d178d866ca2831
Submitter: Jenkins
Branch: master

commit 64649b97e7eea1a76d0d78feb7d178d866ca2831
Author: Valeriy Ponomaryov <email address hidden>
Date: Wed Feb 1 13:41:06 2017 +0200

    Fix default approach for share group snapshot creation

    Default approach uses common driver interface of single snapshot
    creation. So, emulate it correctly providing all required keys.
    Also add 'provider_location' attribute to share group snapshot
    members DB model, because it is required for some drivers and
    was absent.

    Change-Id: If120d85ef3dd3ba90e2dc12a5b81b69feecb31ea
    Closes-Bug: #1660321

Changed in manila:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/manila 4.0.0.0rc1

This issue was fixed in the openstack/manila 4.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.