powermax and vnx drivers create_share_from_snapshot returns str instead of list

Bug #1871999 reported by Sam Wan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Shared File Systems Service (Manila)
Fix Released
Medium
Helen Walsh

Bug Description

powermax and vnx manila driver failed with below errors:
=======================
Apr 09 22:50:28.425282 vnxmanila2 manila-share[6155]: DEBUG manila.share.drivers.dell_emc.common.enas.utils [None req-7799d34a-814f-4e13-ba7f-ea2a84a3fd01 None None] Exiting NFSShare.create. Spent 0.174573 sec. Return None. {{(pid=6857) inner /opt/stack/new/manila/manila/share/drivers/dell_emc/common/enas/utils.py:60}}
Apr 09 22:50:28.425982 vnxmanila2 manila-share[6155]: DEBUG manila.share.drivers.dell_emc.common.enas.utils [None req-7799d34a-814f-4e13-ba7f-ea2a84a3fd01 None None] Exiting VNXStorageConnection._create_nfs_share. Spent 0.176218 sec. Return 52.0.0.35:/0f7d8660-20fe-47eb-bfa2-49cba7a42123. {{(pid=6857) inner /opt/stack/new/manila/manila/share/drivers/dell_emc/common/enas/utils.py:60}}
Apr 09 22:50:28.426652 vnxmanila2 manila-share[6155]: DEBUG manila.share.drivers.dell_emc.common.enas.utils [None req-7799d34a-814f-4e13-ba7f-ea2a84a3fd01 None None] Exiting VNXStorageConnection.create_share_from_snapshot. Spent 25.027263 sec. Return 52.0.0.35:/0f7d8660-20fe-47eb-bfa2-49cba7a42123. {{(pid=6857) inner /opt/stack/new/manila/manila/share/drivers/dell_emc/common/enas/utils.py:60}}
Apr 09 22:50:28.427149 vnxmanila2 manila-share[6155]: ERROR manila.share.manager [None req-7799d34a-814f-4e13-ba7f-ea2a84a3fd01 None None] Share instance 0f7d8660-20fe-47eb-bfa2-49cba7a42123 failed on creation.
Apr 09 22:50:28.427618 vnxmanila2 manila-share[6155]: WARNING manila.share.manager [None req-7799d34a-814f-4e13-ba7f-ea2a84a3fd01 None None] Share instance information in exception can not be written to db because it contains {} and it is not a dictionary.
Apr 09 22:50:28.448560 vnxmanila2 manila-share[6155]: INFO manila.message.api [None req-7799d34a-814f-4e13-ba7f-ea2a84a3fd01 None None] Creating message record for request_id = req-7799d34a-814f-4e13-ba7f-ea2a84a3fd01
Apr 09 22:50:28.460968 vnxmanila2 manila-share[6155]: ERROR oslo_messaging.rpc.server [None req-7799d34a-814f-4e13-ba7f-ea2a84a3fd01 None None] Exception during message handling: AttributeError: 'str' object has no attribute 'get'
Apr 09 22:50:28.460968 vnxmanila2 manila-share[6155]: ERROR oslo_messaging.rpc.server Traceback (most recent call last):
Apr 09 22:50:28.460968 vnxmanila2 manila-share[6155]: ERROR oslo_messaging.rpc.server File "/usr/local/lib/python3.6/dist-packages/oslo_messaging/rpc/server.py", line 165, in _process_incoming
Apr 09 22:50:28.460968 vnxmanila2 manila-share[6155]: ERROR oslo_messaging.rpc.server res = self.dispatcher.dispatch(message)
Apr 09 22:50:28.460968 vnxmanila2 manila-share[6155]: ERROR oslo_messaging.rpc.server File "/usr/local/lib/python3.6/dist-packages/oslo_messaging/rpc/dispatcher.py", line 276, in dispatch
Apr 09 22:50:28.460968 vnxmanila2 manila-share[6155]: ERROR oslo_messaging.rpc.server return self._do_dispatch(endpoint, method, ctxt, args)
Apr 09 22:50:28.460968 vnxmanila2 manila-share[6155]: ERROR oslo_messaging.rpc.server File "/usr/local/lib/python3.6/dist-packages/oslo_messaging/rpc/dispatcher.py", line 196, in _do_dispatch
Apr 09 22:50:28.460968 vnxmanila2 manila-share[6155]: ERROR oslo_messaging.rpc.server result = func(ctxt, **new_args)
Apr 09 22:50:28.460968 vnxmanila2 manila-share[6155]: ERROR oslo_messaging.rpc.server File "/opt/stack/new/manila/manila/share/manager.py", line 187, in wrapped
Apr 09 22:50:28.460968 vnxmanila2 manila-share[6155]: ERROR oslo_messaging.rpc.server return f(self, *args, **kwargs)
Apr 09 22:50:28.460968 vnxmanila2 manila-share[6155]: ERROR oslo_messaging.rpc.server File "/opt/stack/new/manila/manila/utils.py", line 568, in wrapper
Apr 09 22:50:28.460968 vnxmanila2 manila-share[6155]: ERROR oslo_messaging.rpc.server return func(self, *args, **kwargs)
Apr 09 22:50:28.460968 vnxmanila2 manila-share[6155]: ERROR oslo_messaging.rpc.server File "/opt/stack/new/manila/manila/share/manager.py", line 1830, in create_share_instance
Apr 09 22:50:28.460968 vnxmanila2 manila-share[6155]: ERROR oslo_messaging.rpc.server exception=e)
Apr 09 22:50:28.460968 vnxmanila2 manila-share[6155]: ERROR oslo_messaging.rpc.server File "/usr/local/lib/python3.6/dist-packages/oslo_utils/excutils.py", line 220, in __exit__
Apr 09 22:50:28.460968 vnxmanila2 manila-share[6155]: ERROR oslo_messaging.rpc.server self.force_reraise()
Apr 09 22:50:28.460968 vnxmanila2 manila-share[6155]: ERROR oslo_messaging.rpc.server File "/usr/local/lib/python3.6/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise
Apr 09 22:50:28.460968 vnxmanila2 manila-share[6155]: ERROR oslo_messaging.rpc.server six.reraise(self.type_, self.value, self.tb)
Apr 09 22:50:28.460968 vnxmanila2 manila-share[6155]: ERROR oslo_messaging.rpc.server File "/usr/local/lib/python3.6/dist-packages/six.py", line 703, in reraise
Apr 09 22:50:28.460968 vnxmanila2 manila-share[6155]: ERROR oslo_messaging.rpc.server raise value
Apr 09 22:50:28.460968 vnxmanila2 manila-share[6155]: ERROR oslo_messaging.rpc.server File "/opt/stack/new/manila/manila/share/manager.py", line 1781, in create_share_instance
Apr 09 22:50:28.460968 vnxmanila2 manila-share[6155]: ERROR oslo_messaging.rpc.server status = model_update.get('status')
Apr 09 22:50:28.460968 vnxmanila2 manila-share[6155]: ERROR oslo_messaging.rpc.server AttributeError: 'str' object has no attribute 'get'
Apr 09 22:50:28.460968 vnxmanila2 manila-share[6155]: ERROR oslo_messaging.rpc.server
Apr 09 22:50:31.442843 vnxmanila2 manila-share[6155]: DEBUG oslo_concurrency.lockutils [None req-1e678ff8-b8a8-4417-9c19-bf8af865962f None None] Lock "share_manager_0b474949-81ca-4ef3-affd-8fa0b59c4c62" acquired by "manila.share.manager.ShareManager._provide_share_server_for_share.<locals>._wrapped_provide_share_server_for_share" :: waited 0.000s {{(pid=6857) inner /usr/local/lib/python3.6/dist-packages/oslo_concurrency/lockutils.py:358}}
Apr 09 22:50:31.443575 vnxmanila2 manila-share[6155]: DEBUG manila.share.manager [None req-1e678ff8-b8a8-4417-9c19-bf8af865962f None None] Using share_server 93d9562a-fe7c-4eb6-b47b-b5deb10e9187 for share instance ce368f3b-7bc5-498e-965d-30a85d458f7a {{(pid=6857) _wrapped_provide_share_server_for_share /opt/stack/new/manila/manila/share/manager.py:631}}
==========================================

This is because their create_share_from_snapsho returns str instead of list.
And with the merge of https://review.opendev.org/#/c/709697, the issue has been revealed.

tags: added: dell-emc powermax vnx
summary: - powermax and vnx manla driver create_share_from_snapsho' returns str
- instead of list
+ powermax and vnx drivers create_share_from_snapshot returns str instead
+ of list
Changed in manila:
status: New → Confirmed
milestone: none → ussuri-rc1
Revision history for this message
Goutham Pacha Ravi (gouthamr) wrote :

Hi Sam,

Thanks for this bug report. It appears that these drivers haven't been fixed up since a long time back when we deprecated the use of export location strings to accommodate multiple export locations [1], and subsequently export location metadata [2]

Export locations must be sent as a list of dictionaries, see the expected structure here [3].

So, good that you caught this issue. I'm in favor of fixing the drivers so that they are future proof.

Can you assign yourself, or find an owner for this bug?

[1] https://opendev.org/openstack/manila/commit/1e2b07294e62d105a324a959fc9285b61e41921e
[2] https://opendev.org/openstack/manila/commit/dcbdcf353432294e9fb4da25c2ad7abf8b08f3dc
[3] https://opendev.org/openstack/manila/src/commit/ba57e90d45c35db7cb383dabf3bb3da0b7db17d2/manila/share/driver.py#L478-L490

Revision history for this message
Sam Wan (sam-wan) wrote :

Hi Goutham,

<email address hidden> will take care of this.

Thanks and regards

Sam

Ryan Liang (ryan-liang)
Changed in manila:
assignee: nobody → Ryan Liang (ryan-liang)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to manila (master)

Fix proposed to branch: master
Review: https://review.opendev.org/718942

Changed in manila:
status: Confirmed → In Progress
Changed in manila:
assignee: Ryan Liang (ryan-liang) → Helen Walsh (walshh2)
Vida Haririan (vhariria)
Changed in manila:
importance: Undecided → Medium
Revision history for this message
Vida Haririan (vhariria) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to manila (master)

Reviewed: https://review.opendev.org/718942
Committed: https://git.openstack.org/cgit/openstack/manila/commit/?id=93487666351f38c17562a16e956b07214f467857
Submitter: Zuul
Branch: master

commit 93487666351f38c17562a16e956b07214f467857
Author: Ryan Liang <email address hidden>
Date: Fri Apr 10 16:37:38 2020 +0800

    VNX/PowerMax: Fix export locations

    It fixes the export locations returned by `create_share` and
    `create_share_from_snapshot`. The export locations should be a list of
    dict like: `[{'path': <original_location>}]`.

    Change-Id: Ic97fa34455054aeda10608486edf120a9dc3d9f3
    Closes-bug: #1871999

Changed in manila:
status: In Progress → Fix Released
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.