ManilaShares.create_and_extend_share fails with Python3.9 on OSP17/RHEL9

Bug #1975488 reported by Sanjay Chari
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
openstack-browbeat
Fix Released
Undecided
Sanjay Chari
python-manilaclient
Fix Released
Medium
Goutham Pacha Ravi

Bug Description

The ManilaShares.create_and_extend_share fails in OSP 17 with a RHEL 9 undercloud.

Traceback (most recent call last):
  File "/home/stack/browbeat/.rally-venv/lib64/python3.9/site-packages/rally/task/runner.py", line 69, in _run_scenario_once
    getattr(scenario_inst, method_name)(**scenario_kwargs)
  File "/home/stack/browbeat/.rally-venv/lib64/python3.9/site-packages/rally_openstack/task/scenarios/manila/shares.py", line 231, in run
    self._extend_share(share, new_size)
  File "/home/stack/browbeat/.rally-venv/lib64/python3.9/site-packages/rally/task/atomic.py", line 91, in func_atomic_actions
    f = func(self, *args, **kwargs)
  File "/home/stack/browbeat/.rally-venv/lib64/python3.9/site-packages/rally_openstack/task/scenarios/manila/utils.py", line 206, in _extend_share
    share.extend(new_size)
  File "/home/stack/browbeat/.rally-venv/lib64/python3.9/site-packages/manilaclient/v2/shares.py", line 100, in extend
    self.manager.extend(self, new_size, force=force)
  File "/home/stack/browbeat/.rally-venv/lib64/python3.9/site-packages/manilaclient/api_versions.py", line 399, in substitution
    return method.func(obj, *args, **kwargs)
TypeError: extend() got an unexpected keyword argument 'force'

This is mostly because Python3.9 is used in OSP 17, and because of changes in the manila codebase since OSP 16.2.

Revision history for this message
Goutham Pacha Ravi (gouthamr) wrote :

Hi, are these tests specifying an API microversion for manila?

This looks like a bug because you're using an older microversion, and the code's forcing the use of the "force" keyword:

Call:

https://opendev.org/openstack/python-manilaclient/src/commit/91c0d7980713aecc220b7adaed1c97b4d88b3cc8/manilaclient/v2/shares.py#L100

microversion based variants:
https://opendev.org/openstack/python-manilaclient/src/commit/91c0d7980713aecc220b7adaed1c97b4d88b3cc8/manilaclient/v2/shares.py#L744-L754

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-manilaclient (master)
Changed in python-manilaclient:
status: New → In Progress
Changed in python-manilaclient:
assignee: nobody → Goutham Pacha Ravi (gouthamr)
milestone: none → zed-2
importance: Undecided → High
importance: High → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to browbeat (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/x/browbeat/+/843240

Changed in openstack-browbeat:
status: New → In Progress
Changed in openstack-browbeat:
assignee: nobody → Sanjay Chari (sanjaychari)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-manilaclient (stable/yoga)
Revision history for this message
Victoria Martinez de la Cruz (vkmc) wrote :

Sounds like this bug is already fixed with the change in python-manilaclient, is it necessary to pin the python-manilaclient to browbeat too?

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

Reviewed: https://review.opendev.org/c/openstack/python-manilaclient/+/843215
Committed: https://opendev.org/openstack/python-manilaclient/commit/db8eafd838c603407d86b13e226d8d8b028b595e
Submitter: "Zuul (22348)"
Branch: master

commit db8eafd838c603407d86b13e226d8d8b028b595e
Author: Goutham Pacha Ravi <email address hidden>
Date: Wed May 25 02:57:17 2022 +0530

    Avoid using "force" kwarg in extend API

    The extend API was enhanced with API version
    2.64 to support a "force" argument; It's possible
    that clients are using older microversions
    when interacting with the manilaclient SDK;
    by mandating the use of the "force" kwarg,
    we introduce a regression. The "ShareManager"
    class has microversioned "extend" APIs,
    some of which do not accept the "force" kwarg.

    Change-Id: I56af42c6c3ece862747ddb62cd1eabdf608b9411
    Related-Bug: #1855391
    Closes-Bug: #1975488
    Signed-off-by: Goutham Pacha Ravi <email address hidden>

Changed in python-manilaclient:
status: In Progress → Fix Released
Revision history for this message
Sanjay Chari (sanjaychari) wrote :

@Victoria Martinez de la Cruz,
Browbeat uses Rally, specifically rally-openstack, in the backend to run performance tests. Since rally-openstack has an upper constraint of 3.0.0 for python-manilaclient[1], I think Browbeat should also have this constraint, to avoid similar issues from happening in other tests. We can change this constraint in Browbeat when the constraint is changed in rally-openstack in the future.

@Asma Syed Hameed, what do you think?

[1] https://github.com/openstack/rally-openstack/blob/20590f3071f6cc9f567a10106a2908f0e0ec7507/upper-constraints.txt#L89

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-manilaclient (stable/yoga)

Reviewed: https://review.opendev.org/c/openstack/python-manilaclient/+/843207
Committed: https://opendev.org/openstack/python-manilaclient/commit/c1c1133a7f912f6d4136ace537a1e5d80ec81bb6
Submitter: "Zuul (22348)"
Branch: stable/yoga

commit c1c1133a7f912f6d4136ace537a1e5d80ec81bb6
Author: Goutham Pacha Ravi <email address hidden>
Date: Wed May 25 02:57:17 2022 +0530

    Avoid using "force" kwarg in extend API

    The extend API was enhanced with API version
    2.64 to support a "force" argument; It's possible
    that clients are using older microversions
    when interacting with the manilaclient SDK;
    by mandating the use of the "force" kwarg,
    we introduce a regression. The "ShareManager"
    class has microversioned "extend" APIs,
    some of which do not accept the "force" kwarg.

    Change-Id: I56af42c6c3ece862747ddb62cd1eabdf608b9411
    Related-Bug: #1855391
    Closes-Bug: #1975488
    Signed-off-by: Goutham Pacha Ravi <email address hidden>
    (cherry picked from commit db8eafd838c603407d86b13e226d8d8b028b595e)

tags: added: in-stable-yoga
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to browbeat (master)

Reviewed: https://review.opendev.org/c/x/browbeat/+/843240
Committed: https://opendev.org/x/browbeat/commit/46920c6368637c0856c40ca5d83eb50cc2d40bd2
Submitter: "Zuul (22348)"
Branch: master

commit 46920c6368637c0856c40ca5d83eb50cc2d40bd2
Author: Sanjay Chari <email address hidden>
Date: Wed May 25 12:20:11 2022 +0530

    Fix ManilaShares.create_and_extend_share for OSP 17

    rally-openstack has an upper constraint of python-manilaclient==3.0.0.
    https://github.com/openstack/rally-openstack/blob/20590f3071f6cc9f567a10106a2908f0e0ec7507/upper-constraints.txt#L89
    Browbeat should have this constraint too.

    Closes-Bug: #1975488
    Change-Id: I290b1d9d76f6fe6b9ed4e475367cce78cc82c6cd

Changed in openstack-browbeat:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-manilaclient 3.3.1

This issue was fixed in the openstack/python-manilaclient 3.3.1 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-manilaclient 4.0.0

This issue was fixed in the openstack/python-manilaclient 4.0.0 release.

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.