AttributeError: 'ShareSnapshotInstance' object has no attribute 'name'

Bug #1488006 reported by Peter Wang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Shared File Systems Service (Manila)
Fix Released
Critical
Igor Malinovskiy

Bug Description

create snapshot failed as below:

the traceback=======

2015-08-24 04:05:00.222 12911 ERROR oslo_messaging.rpc.dispatcher six.reraise(self.type_, self.value, self.tb)
2015-08-24 04:05:00.222 12911 ERROR oslo_messaging.rpc.dispatcher File "/opt/stack/new/manila/manila/share/manager.py", line 679, in delete_snapshot
2015-08-24 04:05:00.222 12911 ERROR oslo_messaging.rpc.dispatcher share_server=share_server)
2015-08-24 04:05:00.222 12911 ERROR oslo_messaging.rpc.dispatcher File "/opt/stack/new/manila/manila/share/drivers/emc/driver.py", line 109, in delete_snapshot
2015-08-24 04:05:00.222 12911 ERROR oslo_messaging.rpc.dispatcher share_server)
2015-08-24 04:05:00.222 12911 ERROR oslo_messaging.rpc.dispatcher File "/opt/stack/new/manila/manila/share/drivers/emc/plugins/vnx/utils.py", line 48, in inner
2015-08-24 04:05:00.222 12911 ERROR oslo_messaging.rpc.dispatcher ret = func(self, *args, **kwargs)
2015-08-24 04:05:00.222 12911 ERROR oslo_messaging.rpc.dispatcher File "/opt/stack/new/manila/manila/share/drivers/emc/plugins/vnx/connection.py", line 321, in delete_snapshot
2015-08-24 04:05:00.222 12911 ERROR oslo_messaging.rpc.dispatcher ckpt_name = snapshot['name']
2015-08-24 04:05:00.222 12911 ERROR oslo_messaging.rpc.dispatcher File "/usr/local/lib/python2.7/dist-packages/oslo_db/sqlalchemy/models.py", line 54, in __getitem__
2015-08-24 04:05:00.222 12911 ERROR oslo_messaging.rpc.dispatcher return getattr(self, key)
2015-08-24 04:05:00.222 12911 ERROR oslo_messaging.rpc.dispatcher AttributeError: 'ShareSnapshotInstance' object has no attribute 'name'

 both VNX and Isilon driver are broken. Create_snapshot and delete_snapshot will not work due to above exception

From the code change, manager is passing type ‘ShareSnapshotInstance’ instead of previous type ‘ShareSnapshot’
        try:
            self.driver.delete_snapshot(context, snapshot_instance,
                                        share_server=share_server)
        except exception.ShareSnapshotIsBusy:

Since VNX/Isilon driver are expecting ‘name’ key from snapshot_instance while snapshot_instance doesn’t have this key.

This issue introduced by https://review.openstack.org/#/c/199489/

Any drivers refering snapshot['name'] will break due to this change

I think Manila framework should handle this..

Thanks
Peter

Xing Yang (xing-yang)
Changed in manila:
importance: Undecided → High
Changed in manila:
milestone: none → liberty-3
importance: High → Critical
status: New → Triaged
Changed in manila:
assignee: nobody → Igor Malinovskiy (imalinovskiy)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to manila (master)

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

Changed in manila:
status: Triaged → In Progress
Thierry Carrez (ttx)
Changed in manila:
milestone: liberty-3 → liberty-rc1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to manila (master)

Reviewed: https://review.openstack.org/219264
Committed: https://git.openstack.org/cgit/openstack/manila/commit/?id=952dfdbc74542cd026e181d3dc57422dd3037ece
Submitter: Jenkins
Branch: master

commit 952dfdbc74542cd026e181d3dc57422dd3037ece
Author: Igor Malinovskiy <email address hidden>
Date: Tue Sep 1 16:05:37 2015 +0300

    Add attributes 'name' and 'share_name' to ShareSnapshotInstance

    ShareSnapshotInstance should have attributes 'name' and 'share_name'
    to maintain compatibility with HDFS, VNX, Isilon and GPFS drivers.

    Change-Id: Ieae6024a81248fc09eca304fbae9615ddc57b006
    Closes-Bug: #1488006

Changed in manila:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in manila:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in manila:
milestone: liberty-rc1 → 1.0.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.