generic driver cannot remove user rule for NFS share

Bug #1591357 reported by Rodrigo Barbieri
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Shared File Systems Service (Manila)
Fix Released
Medium
haobing1

Bug Description

Since commit [1], below errors occurs when trying to delete a user rule in a NFS share using generic driver. Please see steps below:

1) User adds rule1 ip '10.0.0.1' - success
2) User adds rule2 user 'lala' - error, access type not supported
3) User adds rule3 ip '10.0.0.2' - error, but rule3 is added to DB
4) User removes rule2 - should be success, and also apply rule3, but below error is shown.

[1] - https://github.com/openstack/manila/commit/7bf936b9010cb7bbfe8412ea991be9bd6f8b0f80

2016-06-10 13:45:19.696 ERROR oslo_messaging.rpc.server [req-a15570a0-a4c4-415d-b4a5-8277ff3fab21 ca71c4cc3fed4a1cbbfd97f968f7d536 234b54ea84124dbb8fb897aa83939aa6] Exc
eption during handling message
2016-06-10 13:45:19.696 TRACE oslo_messaging.rpc.server Traceback (most recent call last):
2016-06-10 13:45:19.696 TRACE oslo_messaging.rpc.server File "/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/server.py", line 133, in _process_incoming
2016-06-10 13:45:19.696 TRACE oslo_messaging.rpc.server res = self.dispatcher.dispatch(message)
2016-06-10 13:45:19.696 TRACE oslo_messaging.rpc.server File "/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 153, in dispatch
2016-06-10 13:45:19.696 TRACE oslo_messaging.rpc.server return self._do_dispatch(endpoint, method, ctxt, args)
2016-06-10 13:45:19.696 TRACE oslo_messaging.rpc.server File "/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 122, in _do_dispatch
2016-06-10 13:45:19.696 TRACE oslo_messaging.rpc.server result = func(ctxt, **new_args)
2016-06-10 13:45:19.696 TRACE oslo_messaging.rpc.server File "/opt/stack/manila/manila/share/manager.py", line 152, in wrapped
2016-06-10 13:45:19.696 TRACE oslo_messaging.rpc.server return f(self, *args, **kwargs)
2016-06-10 13:45:19.696 TRACE oslo_messaging.rpc.server File "/opt/stack/manila/manila/utils.py", line 616, in wrapper
2016-06-10 13:45:19.696 TRACE oslo_messaging.rpc.server return func(self, *args, **kwargs)
2016-06-10 13:45:19.696 TRACE oslo_messaging.rpc.server File "/opt/stack/manila/manila/share/manager.py", line 2272, in deny_access
2016-06-10 13:45:19.696 TRACE oslo_messaging.rpc.server share_server=share_server
2016-06-10 13:45:19.696 TRACE oslo_messaging.rpc.server File "/opt/stack/manila/manila/share/access.py", line 85, in update_access_rules
2016-06-10 13:45:19.696 TRACE oslo_messaging.rpc.server share_server=share_server
2016-06-10 13:45:19.696 TRACE oslo_messaging.rpc.server File "/opt/stack/manila/manila/share/drivers/generic.py", line 120, in wrap
2016-06-10 13:45:19.696 TRACE oslo_messaging.rpc.server return f(self, context, *args, **kwargs)
2016-06-10 13:45:19.696 TRACE oslo_messaging.rpc.server File "/opt/stack/manila/manila/share/drivers/generic.py", line 882, in update_access
2016-06-10 13:45:19.696 TRACE oslo_messaging.rpc.server delete_rules=delete_rules)
2016-06-10 13:45:19.696 TRACE oslo_messaging.rpc.server File "/opt/stack/manila/manila/share/drivers/helpers.py", line 133, in wrapped_func
2016-06-10 13:45:19.696 TRACE oslo_messaging.rpc.server return source_func(self, *args, **kwargs)
2016-06-10 13:45:19.696 TRACE oslo_messaging.rpc.server File "/usr/local/lib/python2.7/dist-packages/oslo_concurrency/lockutils.py", line 271, in inner
2016-06-10 13:45:19.696 TRACE oslo_messaging.rpc.server return f(*args, **kwargs)
2016-06-10 13:45:19.696 TRACE oslo_messaging.rpc.server File "/opt/stack/manila/manila/share/drivers/helpers.py", line 131, in source_func
2016-06-10 13:45:19.696 TRACE oslo_messaging.rpc.server return f(self, *args, **kwargs)
2016-06-10 13:45:19.696 TRACE oslo_messaging.rpc.server File "/opt/stack/manila/manila/share/drivers/helpers.py", line 208, in update_access
2016-06-10 13:45:19.696 TRACE oslo_messaging.rpc.server access['access_to'])
2016-06-10 13:45:19.696 TRACE oslo_messaging.rpc.server File "/opt/stack/manila/manila/share/drivers/helpers.py", line 161, in _get_parsed_access_to
2016-06-10 13:45:19.696 TRACE oslo_messaging.rpc.server netmask = utils.cidr_to_netmask(access_to)
2016-06-10 13:45:19.696 TRACE oslo_messaging.rpc.server File "/opt/stack/manila/manila/utils.py", line 499, in cidr_to_netmask
2016-06-10 13:45:19.696 TRACE oslo_messaging.rpc.server raise exception.InvalidInput(_("Invalid cidr supplied %s") % cidr)
2016-06-10 13:45:19.696 TRACE oslo_messaging.rpc.server InvalidInput: Invalid cidr supplied lala
2016-06-10 13:45:19.696 TRACE oslo_messaging.rpc.server

Changed in manila:
importance: Undecided → High
Changed in manila:
importance: High → Medium
Shashi (shashi-kant)
Changed in manila:
assignee: nobody → Shashi (shashi-kant)
Shashi (shashi-kant)
Changed in manila:
assignee: Shashi (shashi-kant) → nobody
haobing1 (haobing1)
Changed in manila:
assignee: nobody → haobing1 (haobing1)
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/549094

Changed in manila:
status: New → In Progress
Tom Barron (tpb)
tags: added: access-rules
Tom Barron (tpb)
Changed in manila:
milestone: none → rocky-3
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to manila (master)

Reviewed: https://review.openstack.org/549094
Committed: https://git.openstack.org/cgit/openstack/manila/commit/?id=74989545065981ccf42152949f5f29566d68703c
Submitter: Zuul
Branch: master

commit 74989545065981ccf42152949f5f29566d68703c
Author: haobing1 <email address hidden>
Date: Fri Mar 2 10:49:28 2018 +0800

    Cannot remove user rule for NFS share

    Use generic driver create share, then add user type access failed.
    We can not use 'manila access-deny' to delete the user rule
    in a NFS share db.
    This path fix this issue.

    Change-Id: I9375c4be9361d593102a382eb9c14c2d776bb1aa
    Closes-Bug:#1591357

Changed in manila:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to manila (stable/queens)

Fix proposed to branch: stable/queens
Review: https://review.openstack.org/579274

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

Reviewed: https://review.openstack.org/579274
Committed: https://git.openstack.org/cgit/openstack/manila/commit/?id=4ec3aceeddfe37b92be2a4de481f55ae24ef1cf6
Submitter: Zuul
Branch: stable/queens

commit 4ec3aceeddfe37b92be2a4de481f55ae24ef1cf6
Author: haobing1 <email address hidden>
Date: Fri Mar 2 10:49:28 2018 +0800

    Cannot remove user rule for NFS share

    Use generic driver create share, then add user type access failed.
    We can not use 'manila access-deny' to delete the user rule
    in a NFS share db.
    This path fix this issue.

    Change-Id: I9375c4be9361d593102a382eb9c14c2d776bb1aa
    Closes-Bug:#1591357
    (cherry picked from commit 74989545065981ccf42152949f5f29566d68703c)

tags: added: in-stable-queens
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/manila 6.0.2

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

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

This issue was fixed in the openstack/manila 7.0.0.0b3 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.