generic backend resize share failure when no access rule is set

Bug #1911695 reported by Elias Wimmer
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Shared File Systems Service (Manila)
Fix Released
Medium
Elias Wimmer

Bug Description

Description
===========
Resizing a generic backend share, which has no access rules defined fails.

Steps to reproduce
==================

A chronological list of steps which will help reproduce the issue you hit:
* resize a share with generic backend with no access rules defined

Environment
===========
Openstack Release Train
Kolla ansible
Neutron with OpenVSwitch

Log
==============
Extend share failed.: oslo_concurrency.processutils.ProcessExecutionError: Unexpected error while running command.
Command: sudo exportfs -u <world>:/shares/share-ba2425b9-19b1-411b-bc1f-9c7681328de2
Exit code: 1
Stdout: ''
Stderr: 'bash: world: No such file or directory\n'
2020-12-15 15:29:00.666 29 ERROR manila.share.manager Traceback (most recent call last):
2020-12-15 15:29:00.666 29 ERROR manila.share.manager File "/usr/lib/python3.6/site-packages/manila/share/manager.py", line 3823, in extend_share
2020-12-15 15:29:00.666 29 ERROR manila.share.manager share_instance, new_size, share_server=share_server)
2020-12-15 15:29:00.666 29 ERROR manila.share.manager File "/usr/lib/python3.6/site-packages/manila/share/drivers/generic.py", line 117, in wrap
2020-12-15 15:29:00.666 29 ERROR manila.share.manager return f(self, context, *args, **kwargs)
2020-12-15 15:29:00.666 29 ERROR manila.share.manager File "/usr/lib/python3.6/site-packages/manila/share/drivers/generic.py", line 656, in extend_share
2020-12-15 15:29:00.666 29 ERROR manila.share.manager helper.disable_access_for_maintenance(server_details, share['name'])
2020-12-15 15:29:00.666 29 ERROR manila.share.manager File "/usr/lib/python3.6/site-packages/manila/share/drivers/helpers.py", line 179, in wrapped_func
2020-12-15 15:29:00.666 29 ERROR manila.share.manager return source_func(self, *args, **kwargs)
2020-12-15 15:29:00.666 29 ERROR manila.share.manager File "/usr/lib/python3.6/site-packages/oslo_concurrency/lockutils.py", line 328, in inner
2020-12-15 15:29:00.666 29 ERROR manila.share.manager return f(*args, **kwargs)
2020-12-15 15:29:00.666 29 ERROR manila.share.manager File "/usr/lib/python3.6/site-packages/manila/share/drivers/helpers.py", line 177, in source_func
2020-12-15 15:29:00.666 29 ERROR manila.share.manager return f(self, *args, **kwargs)
2020-12-15 15:29:00.666 29 ERROR manila.share.manager File "/usr/lib/python3.6/site-packages/manila/share/drivers/helpers.py", line 387, in disable_access_for_maintenance
2020-12-15 15:29:00.666 29 ERROR manila.share.manager ':'.join((host, local_path))])
2020-12-15 15:29:00.666 29 ERROR manila.share.manager File "/usr/lib/python3.6/site-packages/manila/share/drivers/generic.py", line 171, in _ssh_exec
2020-12-15 15:29:00.666 29 ERROR manila.share.manager check_exit_code=check_exit_code)
2020-12-15 15:29:00.666 29 ERROR manila.share.manager File "/usr/lib/python3.6/site-packages/oslo_concurrency/processutils.py", line 570, in ssh_execute
2020-12-15 15:29:00.666 29 ERROR manila.share.manager cmd=sanitized_cmd)
2020-12-15 15:29:00.666 29 ERROR manila.share.manager oslo_concurrency.processutils.ProcessExecutionError: Unexpected error while running command.
2020-12-15 15:29:00.666 29 ERROR manila.share.manager Command: sudo exportfs -u <world>:/shares/share-ba2425b9-19b1-411b-bc1f-9c7681328de2
2020-12-15 15:29:00.666 29 ERROR manila.share.manager Exit code: 1
2020-12-15 15:29:00.666 29 ERROR manila.share.manager Stdout: ''
2020-12-15 15:29:00.666 29 ERROR manila.share.manager Stderr: 'bash: world: No such file or directory\n'
2020-12-15 15:29:00.666 29 ERROR manila.share.manager

Revision history for this message
Elias Wimmer (elias-wimmer) wrote :

The problem is that in "sudo exportfs -u <world>:/shares/share-..." <world> is not quoted and thus bash interprets it as a pipe.

Revision history for this message
Elias Wimmer (elias-wimmer) wrote :
Changed in manila:
milestone: none → wallaby-2
Revision history for this message
Goutham Pacha Ravi (gouthamr) wrote :
Changed in manila:
assignee: nobody → Elias Wimmer (elias-wimmer)
milestone: wallaby-2 → wallaby-3
importance: Undecided → Medium
Changed in manila:
milestone: wallaby-3 → wallaby-rc1
Revision history for this message
Goutham Pacha Ravi (gouthamr) wrote :

Hi Elias,

Any update wrt this bug? Can we help with anything? :)
Next week (Mar 15-19th) is a Manila Bug Squash week; so if you're looking to get this fixed, this is a great time to pursue it. [1] We'll have pretty good reviewer bandwidth during the week, and folks will be available to help and answer questions on IRC.

[1] http://lists.openstack.org/pipermail/openstack-discuss/2021-March/020920.html

Revision history for this message
Elias Wimmer (elias-wimmer) wrote : Re: [Bug 1911695] Re: generic backend resize share failure when no access rule is set
Download full text (4.8 KiB)

Hi Goutham,

sorry but it was quite stressful in February, coming week is much better!
I would really appreciate if someone could help me with a development setup.

Best wishes,
Elias

On Fri, Mar 12, 2021 at 8:55 PM Goutham Pacha Ravi <
<email address hidden>> wrote:

> Hi Elias,
>
> Any update wrt this bug? Can we help with anything? :)
> Next week (Mar 15-19th) is a Manila Bug Squash week; so if you're looking
> to get this fixed, this is a great time to pursue it. [1] We'll have pretty
> good reviewer bandwidth during the week, and folks will be available to
> help and answer questions on IRC.
>
>
> [1]
> http://lists.openstack.org/pipermail/openstack-discuss/2021-March/020920.html
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1911695
>
> Title:
> generic backend resize share failure when no access rule is set
>
> Status in OpenStack Shared File Systems Service (Manila):
> New
>
> Bug description:
> Description
> ===========
> Resizing a generic backend share, which has no access rules defined
> fails.
>
> Steps to reproduce
> ==================
>
> A chronological list of steps which will help reproduce the issue you
> hit:
> * resize a share with generic backend with no access rules defined
>
> Environment
> ===========
> Openstack Release Train
> Kolla ansible
> Neutron with OpenVSwitch
>
> Log
> ==============
> Extend share failed.:
> oslo_concurrency.processutils.ProcessExecutionError: Unexpected error while
> running command.
> Command: sudo exportfs -u
> <world>:/shares/share-ba2425b9-19b1-411b-bc1f-9c7681328de2
> Exit code: 1
> Stdout: ''
> Stderr: 'bash: world: No such file or directory\n'
> 2020-12-15 15:29:00.666 29 ERROR manila.share.manager Traceback (most
> recent call last):
> 2020-12-15 15:29:00.666 29 ERROR manila.share.manager File
> "/usr/lib/python3.6/site-packages/manila/share/manager.py", line 3823, in
> extend_share
> 2020-12-15 15:29:00.666 29 ERROR manila.share.manager
> share_instance, new_size, share_server=share_server)
> 2020-12-15 15:29:00.666 29 ERROR manila.share.manager File
> "/usr/lib/python3.6/site-packages/manila/share/drivers/generic.py", line
> 117, in wrap
> 2020-12-15 15:29:00.666 29 ERROR manila.share.manager return f(self,
> context, *args, **kwargs)
> 2020-12-15 15:29:00.666 29 ERROR manila.share.manager File
> "/usr/lib/python3.6/site-packages/manila/share/drivers/generic.py", line
> 656, in extend_share
> 2020-12-15 15:29:00.666 29 ERROR manila.share.manager
> helper.disable_access_for_maintenance(server_details, share['name'])
> 2020-12-15 15:29:00.666 29 ERROR manila.share.manager File
> "/usr/lib/python3.6/site-packages/manila/share/drivers/helpers.py", line
> 179, in wrapped_func
> 2020-12-15 15:29:00.666 29 ERROR manila.share.manager return
> source_func(self, *args, **kwargs)
> 2020-12-15 15:29:00.666 29 ERROR manila.share.manager File
> "/usr/lib/python3.6/site-packages/oslo_concurrency/lockutils.py", line 328,
> in inner
> 2020-12-15 15:29:00.666 29 ERROR manila.share.manager return
> f(*args, **kwargs)
> 2020-12-...

Read more...

Changed in manila:
status: New → Confirmed
Revision history for this message
Goutham Pacha Ravi (gouthamr) wrote :

> I would really appreciate if someone could help me with a development setup.

Hi Elias, dev setup instructions are here: https://docs.openstack.org/manila/latest/contributor/development-environment-devstack.html

I followed up with some more detail on an email I found for your Gerrit account.

tags: added: wallaby-rc-bugsquash
Revision history for this message
Goutham Pacha Ravi (gouthamr) wrote :

Fix proposed to branch: master
    https://review.opendev.org/781556
    Fix generic share resize with 0.0.0.0/24 access

Changed in manila:
status: Confirmed → In Progress
Changed in manila:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/manila 12.0.0.0rc1

This issue was fixed in the openstack/manila 12.0.0.0rc1 release candidate.

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

Reviewed: https://review.opendev.org/c/openstack/manila/+/782429
Committed: https://opendev.org/openstack/manila/commit/1286806e83a5c719d9281ed40586c378c87165b5
Submitter: "Zuul (22348)"
Branch: stable/victoria

commit 1286806e83a5c719d9281ed40586c378c87165b5
Author: Elias Wimmer <email address hidden>
Date: Thu Mar 18 17:27:56 2021 +0100

    Fix generic share resize with 0.0.0.0/24 access

    Add missing quotes to exportfs command to protect <world> being
    interpreted as file redirect

    Closes-Bug: #1911695
    Change-Id: Ie95a476e9a81c58df998c3f44da137b023b53cc6
    (cherry picked from commit 258625260682142d085979e9a345d9ba46b118ad)

tags: added: in-stable-victoria
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to manila (stable/ussuri)

Fix proposed to branch: stable/ussuri
Review: https://review.opendev.org/c/openstack/manila/+/797309

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

Reviewed: https://review.opendev.org/c/openstack/manila/+/797309
Committed: https://opendev.org/openstack/manila/commit/18250acf313cb868576c334ec40dd2f61aba5cd7
Submitter: "Zuul (22348)"
Branch: stable/ussuri

commit 18250acf313cb868576c334ec40dd2f61aba5cd7
Author: Elias Wimmer <email address hidden>
Date: Thu Mar 18 17:27:56 2021 +0100

    Fix generic share resize with 0.0.0.0/24 access

    Add missing quotes to exportfs command to protect <world> being
    interpreted as file redirect

    Closes-Bug: #1911695
    Change-Id: Ie95a476e9a81c58df998c3f44da137b023b53cc6
    (cherry picked from commit 258625260682142d085979e9a345d9ba46b118ad)
    (cherry picked from commit 1286806e83a5c719d9281ed40586c378c87165b5)

tags: added: in-stable-ussuri
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to manila (stable/train)

Fix proposed to branch: stable/train
Review: https://review.opendev.org/c/openstack/manila/+/806523

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/manila 11.1.0

This issue was fixed in the openstack/manila 11.1.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/manila 10.2.0

This issue was fixed in the openstack/manila 10.2.0 release.

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

Reviewed: https://review.opendev.org/c/openstack/manila/+/806523
Committed: https://opendev.org/openstack/manila/commit/8283c58961db0a8e952edc7c4e0c32dbb6d14b36
Submitter: "Zuul (22348)"
Branch: stable/train

commit 8283c58961db0a8e952edc7c4e0c32dbb6d14b36
Author: Elias Wimmer <email address hidden>
Date: Thu Mar 18 17:27:56 2021 +0100

    Fix generic share resize with 0.0.0.0/24 access

    Add missing quotes to exportfs command to protect <world> being
    interpreted as file redirect

    Closes-Bug: #1911695
    Change-Id: Ie95a476e9a81c58df998c3f44da137b023b53cc6
    (cherry picked from commit 258625260682142d085979e9a345d9ba46b118ad)
    (cherry picked from commit 1286806e83a5c719d9281ed40586c378c87165b5)
    (cherry picked from commit 18250acf313cb868576c334ec40dd2f61aba5cd7)

tags: added: in-stable-train
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.