The share extend error in generic driver.

Bug #1639188 reported by Xiaoyang Zhang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Shared File Systems Service (Manila)
Fix Released
Undecided
Xiaoyang Zhang

Bug Description

If a share is shrank from 10G to 5G, the volume is still 10G.
This share`s size display is 5G, but the share extend newsize
must be > 10G in the old code.

#manila create NFS 10 --share-network 24b55eb4-f5cf-429b-933d-e0af04410de9 --name test-share
| d65c857c-8f03-4607-b6df-cd0f9e8162cc | test-share | 10 | NFS | available | False | london | 20.1.2.3:/shares/share-d65c857c-8f03-4607-b6df-cd0f9e8162cc | manila-server@london#london |

#manila shrink test-share 5
| d65c857c-8f03-4607-b6df-cd0f9e8162cc | test-share | 5 | NFS | available | False | london | 20.1.2.3:/shares/share-d65c857c-8f03-4607-b6df-cd0f9e8162cc | manila-server@london#london |

#manila extend test-share 8
| d65c857c-8f03-4607-b6df-cd0f9e8162cc | test-share | 5 | NFS | extending_error | False | london | 20.1.2.3:/shares/share-d65c857c-8f03-4607-b6df-cd0f9e8162cc | manila-server@london#london |

2016-11-04 17:43:34.510 20497 ERROR oslo_messaging.rpc.dispatcher [req-c7b12007-4a3a-4063-b10a-b4eef5f9d479 ] Exception during message handling: Share d65c857c-8f03-4607-b6df-cd0f9e8162cc could not be extended due to error in the driver: Invalid input received: Invalid input received: New size for extend must be greater than current size. (current: 10, extended: 8)..
2016-11-04 17:43:34.510 20497 TRACE oslo_messaging.rpc.dispatcher Traceback (most recent call last):
2016-11-04 17:43:34.510 20497 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 142, in _dispatch_and_reply
2016-11-04 17:43:34.510 20497 TRACE oslo_messaging.rpc.dispatcher executor_callback))
2016-11-04 17:43:34.510 20497 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 186, in _dispatch
2016-11-04 17:43:34.510 20497 TRACE oslo_messaging.rpc.dispatcher executor_callback)
2016-11-04 17:43:34.510 20497 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 130, in _do_dispatch
2016-11-04 17:43:34.510 20497 TRACE oslo_messaging.rpc.dispatcher result = func(ctxt, **new_args)
2016-11-04 17:43:34.510 20497 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/manila/share/manager.py", line 882, in extend_share
2016-11-04 17:43:34.510 20497 TRACE oslo_messaging.rpc.dispatcher reason=six.text_type(e), share_id=share_id)
2016-11-04 17:43:34.510 20497 TRACE oslo_messaging.rpc.dispatcher ShareExtendingError: Share d65c857c-8f03-4607-b6df-cd0f9e8162cc could not be extended due to error in the driver: Invalid input received: Invalid input received: New size for extend must be greater than current size. (current: 10, extended: 8)..

Revision history for this message
Xiaoyang Zhang (es-xiaoyang) wrote :
Changed in manila:
assignee: nobody → Xiaoyang Zhang (es-xiaoyang)
status: New → Fix Committed
Revision history for this message
Valeriy Ponomaryov (vponomaryov) wrote :

Also, such bug-reports should include steps to reproduce, in current case it is following:

1) Create share of 10Gb size
2) shrink it to 5Gb
3) Extend it to 6 or 7 or 8 or 9 Gb size

Expected result: successfully extended
Actual: some exception

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

Reviewed: https://review.openstack.org/393589
Committed: https://git.openstack.org/cgit/openstack/manila/commit/?id=77a0349adc0a529b52c50347d1df3cca21a6dcfd
Submitter: Jenkins
Branch: master

commit 77a0349adc0a529b52c50347d1df3cca21a6dcfd
Author: Xiaoyang Zhang <email address hidden>
Date: Mon Nov 14 17:08:33 2016 +0800

    Fix extend operation of shrinked share in generic driver

    If a share is shrank from 10G to 5G, the volume is still 10G.
    This share`s size display is 5G, but the share extend newsize
    must be > 10G in the old code. So, I think only need to perform
    resize_filesystem when the share extend newsize <= volume size.
    The volume extension is performed only when new size larger than
    volume size.

    Change-Id: I7e49b446445b8005e2eb23e1d439354eb24915e0
    Close-Bug: #1639188

Revision history for this message
Jason Grosso (jgrosso) wrote :

moving to fix-released

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