Bug 1491816 - python-manilaclient Will Fail on Share List without "search_opts" Parameter For API Versions <= 2.34
Summary: python-manilaclient Will Fail on Share List without "search_opts" Parameter F...
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-manilaclient
Version: 12.0 (Pike)
Hardware: Unspecified
OS: Unspecified
Target Milestone: rc
: 12.0 (Pike)
Assignee: Tom Barron
QA Contact: Dustin Schoenbrun
Depends On:
TreeView+ depends on / blocked
Reported: 2017-09-14 18:42 UTC by Dustin Schoenbrun
Modified: 2018-02-05 19:12 UTC (History)
3 users (show)

Fixed In Version: python-manilaclient-1.17.2-1.el7ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2017-12-13 22:08:57 UTC
Target Upstream Version:

Attachments (Terms of Use)
Rally Run Log (10.11 KB, text/plain)
2017-11-16 21:35 UTC, Dustin Schoenbrun
no flags Details

System ID Private Priority Status Summary Last Updated
Launchpad 1707303 0 None None None 2017-09-14 18:42:16 UTC
OpenStack gerrit 488965 0 None None None 2017-09-14 18:56:52 UTC
Red Hat Product Errata RHEA-2017:3462 0 normal SHIPPED_LIVE Red Hat OpenStack Platform 12.0 Enhancement Advisory 2018-02-16 01:43:25 UTC

Description Dustin Schoenbrun 2017-09-14 18:42:16 UTC
Description of problem:
There was an issue discovered upstream while running Rally tests that showed that the list method for API versions <= 2.34 would fail if no search options were specified for the list command. This would cause the Manila Client to attempt to pop from a NoneType object causing a stack trace.

Version-Release number of selected component (if applicable):

How reproducible:
Seems to always be reproducible with upstream Rally tests.

Steps to Reproduce:
1. Deploy OSP-12 and ensure that Manila is installed.
2. Configure and run the Rally tests for Manila. 
3. Observe that the list method fails when no search options are specified as parameters to the list method.

Actual results:
Traceback (most recent call last):
  File "/opt/stack/new/rally/rally/task/runner.py", line 72, in _run_scenario_once
    getattr(scenario_inst, method_name)(**scenario_kwargs)
  File "/opt/stack/new/rally/rally/plugins/openstack/scenarios/manila/shares.py", line 325, in run
  File "/opt/stack/new/rally/rally/task/atomic.py", line 86, in func_atomic_actions
    f = func(self, *args, **kwargs)
  File "/opt/stack/new/rally/rally/plugins/openstack/scenarios/manila/utils.py", line 99, in _list_shares
    detailed=detailed, search_opts=search_opts)
  File "/opt/stack/new/python-manilaclient/manilaclient/api_versions.py", line 399, in substitution
    return method.func(obj, *args, **kwargs)
  File "/opt/stack/new/python-manilaclient/manilaclient/v2/shares.py", line 328, in list
    search_opts.pop("export_location", None)
AttributeError: 'NoneType' object has no attribute 'pop'

Expected results:
Rally Tests shall pass successfully.

Additional info:
It looks like this issue was fixed upstream already by https://review.openstack.org/#/c/488848/1. Should be fairly easy to pull this down and put it into our packages.

Comment 1 Tom Barron 2017-09-14 18:58:45 UTC
Fix included in openstack/python-manilaclient 1.17.2 release

Comment 4 Dustin Schoenbrun 2017-11-16 21:35:21 UTC
I was able to run the Rally test task for listing shares against the latest OSP-12 puddle (2017-11-09.2) and all of the tasks were able to pass. I was also able to explicitly try a "manila --os-share-api-version 2.34 list" specifying the 2.34 API version and it was able to complete successfully. Marking this one as verified.

Comment 5 Dustin Schoenbrun 2017-11-16 21:35:56 UTC
Created attachment 1353781 [details]
Rally Run Log

Comment 8 errata-xmlrpc 2017-12-13 22:08:57 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


Note You need to log in before you can comment on or make changes to this bug.