Extend and shrink share do not work for microversions >= 2.7

Bug #1531536 reported by Tiago Pasqualini da Silva
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Shared File Systems Service (Manila)
Fix Released
High
NidhiMittalHada

Bug Description

Extend and shrink share are currently not working for microversions 2.7 or newer. When trying to extend or shrink a share, manila raises an error telling that the new share size must be an integer.

Example: http://paste.openstack.org/show/483131/

Changed in manila:
status: New → Confirmed
importance: Undecided → High
Changed in manila:
assignee: nobody → NidhiMittalHada (nidhimittal19)
Revision history for this message
NidhiMittalHada (nidhimittal19) wrote :

working on this.

Revision history for this message
NidhiMittalHada (nidhimittal19) wrote :

Its easily reproduced ..
Traceback (most recent call last):
  File "/opt/stack/python-manilaclient/manilaclient/shell.py", line 641, in main
    map(encodeutils.safe_decode, sys.argv[1:]))
  File "/opt/stack/python-manilaclient/manilaclient/shell.py", line 516, in main
    args.func(self.cs, args)
  File "/opt/stack/python-manilaclient/manilaclient/v2/shell.py", line 2416, in do_extend
    cs.shares.extend(share, args.new_size)
  File "/opt/stack/python-manilaclient/manilaclient/api_versions.py", line 384, in substitution
    return method.func(obj, *args, **kwargs)
  File "/opt/stack/python-manilaclient/manilaclient/v2/shares.py", line 548, in extend
    return self._do_extend(share, new_size, "extend")
  File "/opt/stack/python-manilaclient/manilaclient/v2/shares.py", line 540, in _do_extend
    return self._action(action_name, share, {"new_size": new_size})
  File "/opt/stack/python-manilaclient/manilaclient/v2/shares.py", line 516, in _action
    return self.api.client.post(url, body=body)
  File "/opt/stack/python-manilaclient/manilaclient/common/httpclient.py", line 170, in post
    return self._cs_request(url, 'POST', **kwargs)
  File "/opt/stack/python-manilaclient/manilaclient/common/httpclient.py", line 129, in _cs_request
    **kwargs)
  File "/opt/stack/python-manilaclient/manilaclient/common/httpclient.py", line 143, in _cs_request_with_retries
    resp, body = self.request(url, method, **kwargs)
  File "/opt/stack/python-manilaclient/manilaclient/common/httpclient.py", line 121, in request
    raise exceptions.from_response(resp, method, url)
BadRequest: New share size must be specified as an integer. (HTTP 400) (Request-ID: req-624e3210-d951-4cff-9e68-c7accab13d84)
ERROR: New share size must be specified as an integer.

working on it....

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/264715

Changed in manila:
status: Confirmed → In Progress
summary: - Extend share does not work for microversions >= 2.7
+ Extend and shrink share does not work for microversions >= 2.7
description: updated
summary: - Extend and shrink share does not work for microversions >= 2.7
+ Extend and shrink share do not work for microversions >= 2.7
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to manila (master)

Reviewed: https://review.openstack.org/264715
Committed: https://git.openstack.org/cgit/openstack/manila/commit/?id=672175728fac7357195af880d91f30824de7d34d
Submitter: Jenkins
Branch: master

commit 672175728fac7357195af880d91f30824de7d34d
Author: nidhimittalhada <email address hidden>
Date: Mon Jan 11 14:52:53 2016 +0530

    Fix 'extend' API for 2.7+ microversions

    Extend/Shrink share is not working in microversion 2.7+.
    When trying to extend/shrink a share, manila raises an
    error telling that the new share size must be an integer.
    Bug was due to improper use of get method on dictionary.
    Corrected by using get method properly.

    Change-Id: I700581d815da0fdd6addedc42f3e2ba528680e60
    Closes-Bug: #1531536

Changed in manila:
status: In Progress → Fix Released
Revision history for this message
Thierry Carrez (ttx) wrote : Fix included in openstack/manila 2.0.0.0b2

This issue was fixed in the openstack/manila 2.0.0.0b2 development milestone.

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.