create snapshot failed due to absent of snapshot['share_id']
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Shared File Systems Service (Manila) |
Fix Released
|
Critical
|
Valeriy Ponomaryov |
Bug Description
Recently, we met consistently failure in VNX/Unity manila CI.
When creating snapshot, drivers are expecting the snapshot[
VNX driver code:
def create_
"""Create snapshot from share."""
share_name = snapshot[
share_proto = snapshot[
DEBUG LOG:
=======
2017-06-12 23:11:16.715 27653 INFO manila.
2017-06-12 23:12:07.401 27653 DEBUG manila.
> /opt/stack/
-> share_name = snapshot[
(Pdb) l
267 reason=reason)
268
269 def create_
270 """Create snapshot from share."""
271 import pdb;pdb.set_trace()
272 -> share_name = snapshot[
273 share_proto = snapshot[
274 backend_share = self.client.
275
276 snapshot_name = snapshot['id']
277 if self._is_
(Pdb) snapshot
{'status': u'creating', 'share_id': None, 'share_name': u'CI-a8bbba04-
(Pdb) snapshot[
(Pdb) snapshot.share_id
*** AttributeError: 'dict' object has no attribute 'share_id'
(Pdb) snapshot['share']
<manila.
(Pdb) snapshot[
u'a8bbba04-
(Pdb) snapshot[
u'a989bea0-
DB:
mysql> select * from share_snapshot_
+------
| created_at | updated_at | deleted_at | deleted | id | snapshot_id | share_instance_id | status | progress | provider_location | user_id | project_id | size | share_proto | share_id | share_group_
+------
| 2017-06-13 03:12:07 | NULL | NULL | False | 755b21ce-
+------
1 row in set (0.00 sec)
==================
We can see the share_id is not populated by manila
This should be a regression in manila, or all drivers need to be updated.
Please advise.
Thanks
Peter
Changed in manila: | |
importance: | Undecided → High |
importance: | High → Critical |
Changed in manila: | |
assignee: | nobody → EMC VNX OpenStack (emc-vnx-openstack) |
Changed in manila: | |
milestone: | none → pike-3 |
The "share_id" property was removed from ShareSnapshotIn stance in the following patch. As a result, drivers referencing "share_id" ran into this problem because it is not populated any more.
https:/ /review. openstack. org/#/c/ 433854/ 12/manila/ db/sqlalchemy/ models. py
The "share_id" property was a temporary fix for backward compatibility when "Instance" was introduced. "share_instance_id" should be the right one to use.