Manila share does not get into "shrinking_possible_data_loss_error" status when shrinking a share

Bug #1858328 reported by Liron Kuchlani on 2020-01-05
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Manila
Low
Douglas Viroel

Bug Description

Description of problem:
Manila share does not get into "shrinking_possible_data_loss_error"
status when shrinking a share which will cause to lose a data.

Version-Release number of selected component (if applicable):
puppet-manila-12.5.1-1.el7ost.noarch
python2-manilaclient-1.21.2-1.el7ost.noarch
python2-manila-tests-tempest-0.3.0-1.el7ost.noarch

How reproducible:
100%

Steps to Reproduce:
1. Launch an instance
2. Create share (Configured size + 1)
3. Configure RW access to the share
4. Perform ssh to instance
5. Mount share
6. Write data in share (in excess of 1GB)
7. Shrink share to 1GB

Actual results:
Manila share get into "shrinking_error" status.

Expected results:
Manila share should get into "shrinking_possible_data_loss_error" status and not "shrinking_error".

Additional info:

2020-01-05 06:27:14.166 43 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/manila/share/manager.py", line 3707, in shrink_share
2020-01-05 06:27:14.166 43 ERROR oslo_messaging.rpc.server error_occurred(e, **error_params)
2020-01-05 06:27:14.166 43 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/manila/share/manager.py", line 3672, in error_occurred
2020-01-05 06:27:14.166 43 ERROR oslo_messaging.rpc.server reason=six.text_type(exc), share_id=share_id)
2020-01-05 06:27:14.166 43 ERROR oslo_messaging.rpc.server ShareShrinkingError: Share 15888b1a-a320-45b3-a647-78fc8e4da24f could not be shrunk due to error in the driver: NetApp API failed. Reason - 160:Unabl
e to set volume attribute "size" for volume "share_401cac30_41d3_4330_9039_f3e01eba66ae" on Vserver "rhos_ci". Reason: Selected volume size is too small to hold the current volume data.
2020-01-05 06:27:14.166 43 ERROR oslo_messaging.rpc.server

Traceback (most recent call last):
  File "/home/stack/tempest-auto/manila-tempest-plugin/manila_tempest_tests/tests/scenario/test_share_shrink.py", line 84, in test_create_shrink_and_write
    LOG.debug('Step 8 - try update size, shrink and wait')
  File "/home/stack/tempest-auto/manila-tempest-plugin/manila_tempest_tests/services/share/v2/json/shares_client.py", line 457, in shrink_share
    "shares/%s/action" % share_id, body, version=version)
  File "/home/stack/tempest-auto/manila-tempest-plugin/manila_tempest_tests/services/share/v2/json/shares_client.py", line 70, in post
    headers=headers)
  File "tempest/lib/common/rest_client.py", line 283, in post
    return self.request('POST', url, extra_headers, headers, body, chunked)
  File "tempest/lib/common/rest_client.py", line 687, in request
    self._error_checker(resp, resp_body)
  File "tempest/lib/common/rest_client.py", line 798, in _error_checker
    raise exceptions.BadRequest(resp_body, resp=resp)
tempest.lib.exceptions.BadRequest: Bad request
Details: {u'message': u'Invalid share: Share 15888b1a-a320-45b3-a647-78fc8e4da24f status must in (available, shrinking_possible_data_loss_error) to shrink, but current status is: shrinking_error.', u'code': 400}

Tom Barron (tpb) on 2020-01-07
tags: added: drivers netapp
Douglas Viroel (dviroel) on 2020-01-27
Changed in manila:
importance: Undecided → Low
assignee: nobody → Douglas Viroel (dviroel)
status: New → Triaged
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers