glusterfs_driver: Allow access with NFS volume mapped layout is broken

Bug #1498835 reported by karthick
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Shared File Systems Service (Manila)
Fix Released
Medium
Csaba Henk

Bug Description

After addition of commit 2153b5fa473af9e8bd207935eccd8dc47d7ad07a to liberty master branch, attempting to allow access to a volume mapped layout fails with error - 'AttributeError: 'NoneType' object has no attribute 'split''

This issue is seen as export vol list is empty for a new volume created and we try to split an empty list.

    def _get_vol_exports(self):
        export_vol = self.gluster_manager.get_gluster_vol_option(
            NFS_RPC_AUTH_ALLOW)
        return export_vol.split(',')

snippet of logs:

2015-09-23 12:34:24.39 TRACE oslo_messaging.rpc.dispatcher Traceback (most recent call last):
2015-09-23 12:34:24.39 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 142, in _dispatch_and_reply
2015-09-23 12:34:24.39 TRACE oslo_messaging.rpc.dispatcher executor_callback))
2015-09-23 12:34:24.39 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 186, in _dispatch
2015-09-23 12:34:24.39 TRACE oslo_messaging.rpc.dispatcher executor_callback)
2015-09-23 12:34:24.39 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 129, in _do_dispatch
2015-09-23 12:34:24.39 TRACE oslo_messaging.rpc.dispatcher result = func(ctxt, **new_args)
2015-09-23 12:34:24.39 TRACE oslo_messaging.rpc.dispatcher File "/opt/stack/manila/manila/share/manager.py", line 110, in wrapped
2015-09-23 12:34:24.39 TRACE oslo_messaging.rpc.dispatcher return f(self, *args, **kwargs)
2015-09-23 12:34:24.39 TRACE oslo_messaging.rpc.dispatcher File "/opt/stack/manila/manila/share/manager.py", line 1066, in allow_access
2015-09-23 12:34:24.39 TRACE oslo_messaging.rpc.dispatcher context, access_mapping['id'], access_mapping.STATE_ERROR)
2015-09-23 12:34:24.39 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 195, in __exit__
2015-09-23 12:34:24.39 TRACE oslo_messaging.rpc.dispatcher six.reraise(self.type_, self.value, self.tb)
2015-09-23 12:34:24.39 TRACE oslo_messaging.rpc.dispatcher File "/opt/stack/manila/manila/share/manager.py", line 1060, in allow_access
2015-09-23 12:34:24.39 TRACE oslo_messaging.rpc.dispatcher share_server=share_server)
2015-09-23 12:34:24.39 TRACE oslo_messaging.rpc.dispatcher File "/opt/stack/manila/manila/share/drivers/glusterfs/layout.py", line 101, in allow_access
2015-09-23 12:34:24.39 TRACE oslo_messaging.rpc.dispatcher access, share_server)
2015-09-23 12:34:24.39 TRACE oslo_messaging.rpc.dispatcher File "/opt/stack/manila/manila/share/drivers/glusterfs/__init__.py", line 148, in _allow_access_via_manager
2015-09-23 12:34:24.39 TRACE oslo_messaging.rpc.dispatcher self._get_helper(gluster_mgr).allow_access('/', share, access)
2015-09-23 12:34:24.39 TRACE oslo_messaging.rpc.dispatcher File "/opt/stack/manila/manila/share/drivers/glusterfs/__init__.py", line 317, in allow_access
2015-09-23 12:34:24.39 TRACE oslo_messaging.rpc.dispatcher self._manage_access(access['access_type'], access['access_to'], cbk)
2015-09-23 12:34:24.39 TRACE oslo_messaging.rpc.dispatcher File "/opt/stack/manila/manila/share/drivers/glusterfs/__init__.py", line 290, in _manage_access
2015-09-23 12:34:24.39 TRACE oslo_messaging.rpc.dispatcher export_vol_list = self._get_vol_exports()
2015-09-23 12:34:24.39 TRACE oslo_messaging.rpc.dispatcher File "/opt/stack/manila/manila/share/drivers/glusterfs/__init__.py", line 266, in _get_vol_exports
2015-09-23 12:34:24.39 TRACE oslo_messaging.rpc.dispatcher return export_vol.split(',')
2015-09-23 12:34:24.39 TRACE oslo_messaging.rpc.dispatcher AttributeError: 'NoneType' object has no attribute 'split'

tags: added: driver glusterfs
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/226800

Changed in manila:
assignee: nobody → Csaba Henk (chenk)
status: New → In Progress
Csaba Henk (chenk)
tags: added: liberty-rc-potential
Changed in manila:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to manila (master)

Reviewed: https://review.openstack.org/226800
Committed: https://git.openstack.org/cgit/openstack/manila/commit/?id=42eb36b74594b6431c5cb0915a1bd327aca3f11f
Submitter: Jenkins
Branch: master

commit 42eb36b74594b6431c5cb0915a1bd327aca3f11f
Author: Csaba Henk <email address hidden>
Date: Wed Sep 23 15:56:22 2015 +0200

    glusterfs: manage nfs.rpc-auth-allow not being set

    GlusterNFSVolHelper._get_vol_exports should return an
    empty list if nfs.rpc-auth-allow is not set on the
    backing volume.

    Change-Id: I481bcef66efb7f49da7ea9dab27300825388d6d8
    Closes-Bug: #1498835

Changed in manila:
status: In Progress → Fix Committed
Changed in manila:
milestone: none → liberty-rc2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to manila (stable/liberty)

Fix proposed to branch: stable/liberty
Review: https://review.openstack.org/229770

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

Reviewed: https://review.openstack.org/229770
Committed: https://git.openstack.org/cgit/openstack/manila/commit/?id=722a22eac20109081662cc1796560963578575c6
Submitter: Jenkins
Branch: stable/liberty

commit 722a22eac20109081662cc1796560963578575c6
Author: Csaba Henk <email address hidden>
Date: Wed Sep 23 15:56:22 2015 +0200

    glusterfs: manage nfs.rpc-auth-allow not being set

    GlusterNFSVolHelper._get_vol_exports should return an
    empty list if nfs.rpc-auth-allow is not set on the
    backing volume.

    Change-Id: I481bcef66efb7f49da7ea9dab27300825388d6d8
    Closes-Bug: #1498835
    (cherry picked from commit 42eb36b74594b6431c5cb0915a1bd327aca3f11f)

tags: added: in-stable-liberty
Changed in manila:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in manila:
milestone: liberty-rc2 → 1.0.0
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/235328

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to manila (master)
Download full text (11.9 KiB)

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

commit f1eded1fbcaf309e1c9a4be3f8a14bd25daa3e46
Author: Gaurang Tapase <email address hidden>
Date: Mon Oct 12 20:47:19 2015 +0530

    Fix usage of dependencies

    Manila is broken is threee places, so fix them:
    1) test 'test_misc' with WebOb 1.5

    WebOb 1.5 was released at 2015-10-11. With this new version,
    webob.exc.WSGIHTTPException() constructor now fails with a KeyError
    when the HTTP status code is 0.

    test_exceptions_raise() of test_misc tries to instantiate all
    exceptions of manila.exception. The problem is that
    ConvertedException uses a default HTTP status code of 0.

    Modify the default HTTP status code of ConvertedException to 400 to
    fix the unit tests.

    2) Add dependency for 'testresources' that is required by migration
    tests.

    3) Remove 2 unit tests related to testing of oslo.policy lib
    functionality that should not be tested in Manila. It started failing
    because under-the-hood behaviour was changed in new realese 0.12.0

    Closes-Bug: #1505153
    Closes-Bug: #1505374

    (cherry picked from commit 9c99814ce5943bd4c33bf3650b832666e31b3411)

    -- squashed with another change to get tests to pass on stable/liberty --

    Fix broken unit tests

    With release of six module version 1.10.0 several our unit tests
    started to fail because of usage of not strict constructions.

    Changes:
    1) Manila unit test
    "manila.tests.share.test_api.ShareAPITestCase.test_extend_quota_error"
    used str for int substitution. So, use int data for int substitution.

    2) Module 'manila.share.drivers.hp.hp_3par_mediator' was using
    LOG.exception function when no traceback were exist it led to
    AttributeError on py34. So, replace all usages of 'LOG.exception'
    with 'LOG.error' where no raised exceptions exist.

    Change-Id: Ic5b37bfb9d939d03f6ff68bc53d134bf9e5f996e
    Closes-Bug: #1503969
    (cherry picked from commit f38b8d4efd1f68f4ea29747f7377e0936f61d89c)

    --

    Change-Id: I0f28f3c3fb2c7eec1bafc3a617344990f86810cf

commit 151b691bb2d4baa436913924df60b8c197f91463
Author: Valeriy Ponomaryov <email address hidden>
Date: Thu Oct 1 12:42:05 2015 +0300

    Fix display of availability-zone for manila-manage command

    Commands "manila-manage service list" and "manila-manage host list"
    were displaying availability zone instance instead of its name.

    Such bug appeared after implementation of Availability zone model.
    So, fix it by providing 'name' field of availability zone model.

    Change-Id: I14c3451380df01853183aed265344b1783c95939
    Closes-Bug: #1499677

commit 77455a5ac6be828e8dfd3e75566eaff2823595d4
Author: Csaba Henk <email address hidden>
Date: Wed Sep 30 14:57:00 2015 +0200

    glusterfs_native: use dynamic-auth option if available

    With dynamic-auth restarting the volume is not necessary
    in deny_access.

    Change-Id: Ic25af1795c279b34370...

Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/manila 2.0.0.0b1

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