ganesha cannot handle access-allow 0.0.0.0/0

Bug #1800627 reported by Tom Barron
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Shared File Systems Service (Manila)
Fix Released
Low
Tom Barron

Bug Description

Manila users expect to be able to use 'manila access-allow <share-id> ip 0.0.0.0/0' to allow access to all but ganesha cannot handle this rule. From the manila-share log:

2018-10-18 12:14:04.423 42 DEBUG oslo_concurrency.processutils [req-5a39d23d-ddda-4e7e-8768-3d003d542a42 d66740685fee449283847eee95b10bf3 9c6b0916963f4ae0b699c6b500c24890 - - -] Running cmd (subprocess): mktemp -p /etc/ganesha/export.d -t share-89b22ddf-5b60-4e44-8383-c751304b375c.conf.XXXXXX execute /usr/lib/python2.7/site-packages/oslo_concurrency/processutils.py:372
2018-10-18 12:14:04.815 42 DEBUG oslo_concurrency.processutils [req-5a39d23d-ddda-4e7e-8768-3d003d542a42 d66740685fee449283847eee95b10bf3 9c6b0916963f4ae0b699c6b500c24890 - - -] CMD "mktemp -p /etc/ganesha/export.d -t share-89b22ddf-5b60-4e44-8383-c751304b375c.conf.XXXXXX" returned: 0 in 0.392s execute /usr/lib/python2.7/site-packages/oslo_concurrency/processutils.py:409
2018-10-18 12:14:04.816 42 DEBUG oslo_concurrency.processutils [req-5a39d23d-ddda-4e7e-8768-3d003d542a42 d66740685fee449283847eee95b10bf3 9c6b0916963f4ae0b699c6b500c24890 - - -] Running cmd (subprocess): sh -c echo 'EXPORT {
    CLIENT {
        Clients = 0.0.0.0/0;
        Access_Type = "rw";
    }

    SecType = "sys";
    Pseudo = "/volumes/_nogroup/89b22ddf-5b60-4e44-8383-c751304b375c";
    Squash = "None";
    FSAL {
        User_Id = "ganesha-89b22ddf-5b60-4e44-8383-c751304b375c";
        Secret_Access_Key = "AQB9d8hbl3r7DhAABYYE7K87ama8m0dOBUwq3Q==";
        Name = "Ceph";
    }
    Tag = "share-89b22ddf-5b60-4e44-8383-c751304b375c";
    Path = "/volumes/_nogroup/89b22ddf-5b60-4e44-8383-c751304b375c";
    Export_Id = 1002;
}
' > /etc/ganesha/export.d/share-89b22ddf-5b60-4e44-8383-c751304b375c.conf.OxRw3e execute /usr/lib/python2.7/site-packages/oslo_concurrency/processutils.py:372
...
2018-10-18 12:14:05.209 42 DEBUG oslo_concurrency.processutils [req-5a39d23d-ddda-4e7e-8768-3d003d542a42 d66740685fee449283847eee95b10bf3 9c6b0916963f4ae0b699c6b500c24890 - - -] Running cmd (subprocess): dbus-send --print-reply --system --dest=org.ganesha.nfsd /org/ganesha/nfsd/ExportMgr org.ganesha.nfsd.exportmgr.AddExport string:/etc/ganesha/export.d/share-89b22ddf-5b60-4e44-8383-c751304b375c.conf.OxRw3e string:EXPORT(Export_Id=1002) execute /usr/lib/python2.7/site-packages/oslo_concurrency/processutils.py:372
2018-10-18 12:14:05.616 42 DEBUG oslo_concurrency.processutils [req-5a39d23d-ddda-4e7e-8768-3d003d542a42 d66740685fee449283847eee95b10bf3 9c6b0916963f4ae0b699c6b500c24890 - - -] CMD "dbus-send --print-reply --system --dest=org.ganesha.nfsd /org/ganesha/nfsd/ExportMgr org.ganesha.nfsd.exportmgr.AddExport string:/etc/ganesha/export.d/share-89b22ddf-5b60-4e44-8383-c751304b375c.conf.OxRw3e string:EXPORT(Export_Id=1002)" returned: 1 in 0.408s execute /usr/lib/python2.7/site-packages/oslo_concurrency/processutils.py:409
2018-10-18 12:14:05.617 42 DEBUG oslo_concurrency.processutils [req-5a39d23d-ddda-4e7e-8768-3d003d542a42 d66740685fee449283847eee95b10bf3 9c6b0916963f4ae0b699c6b500c24890 - - -] u'dbus-send --print-reply --system --dest=org.ganesha.nfsd /org/ganesha/nfsd/ExportMgr org.ganesha.nfsd.exportmgr.AddExport string:/etc/ganesha/export.d/share-89b22ddf-5b60-4e44-8383-c751304b375c.conf.OxRw3e string:EXPORT(Export_Id=1002)' failed. Not Retrying. execute /usr/lib/python2.7/site-packages/oslo_concurrency/processutils.py:457
2018-10-18 12:14:05.618 42 ERROR manila.share.drivers.ganesha.manager [req-5a39d23d-ddda-4e7e-8768-3d003d542a42 d66740685fee449283847eee95b10bf3 9c6b0916963f4ae0b699c6b500c24890 - - -] Error while executing management command on Ganesha node <no name>: dbus call exportmgr.AddExport.: ProcessExecutionError: Unexpected error while running command.
2018-10-18 12:14:05.621 42 DEBUG oslo_concurrency.processutils [req-5a39d23d-ddda-4e7e-8768-3d003d542a42 d66740685fee449283847eee95b10bf3 9c6b0916963f4ae0b699c6b500c24890 - - -] Running cmd (subprocess): rm -f /etc/ganesha/export.d/share-89b22ddf-5b60-4e44-8383-c751304b375c.conf.OxRw3e execute /usr/lib/python2.7/site-packages/oslo_concurrency/processutils.py:372
...
2018-10-18 12:14:06.462 42 ERROR oslo_messaging.rpc.server [req-5a39d23d-ddda-4e7e-8768-3d003d542a42 d66740685fee449283847eee95b10bf3 9c6b0916963f4ae0b699c6b500c24890 - - -] Exception during message handling: GaneshaCommandFailure: Ganesha management command failed.
Command: dbus-send --print-reply --system --dest=org.ganesha.nfsd /org/ganesha/nfsd/ExportMgr org.ganesha.nfsd.exportmgr.AddExport string:/etc/ganesha/export.d/share-89b22ddf-5b60-4e44-8383-c751304b375c.conf.OxRw3e string:EXPORT(Export_Id=1002)
Exit code: 1
Stdout: u''
Stderr: u'Error org.freedesktop.DBus.Error.InvalidFileContent: 0 export entries in /etc/ganesha/export.d/share-89b22ddf-5b60-4e44-8383-c751304b375c.conf.OxRw3e added because (fsal load, invalid param value, block validation, unknown param) errors. Details:\nConfig File (/etc/ganesha/export.d/share-89b22ddf-5b60-4e44-8383-c751304b375c.conf.OxRw3e:3): Expected a client, got a file path name for (0.0.0.0/0)\nConfig File (/etc/ganesha/export.d/share-89b22ddf-5b60-4e44-8383-c751304b375c.conf.OxRw3e:2): 1 validation errors in block Client\nConfig File (/etc/ganesha/export.d/share-89b22ddf-5b60-4e44-8383-c751304b375c.conf.OxRw3e:2): Errors processing block (CLIENT)\nConfig File (/etc/ganesha/export.d/share-89b22ddf-5b60-4e44-8383-c751304b375c.conf.OxRw3e:10): Failed to initialize FSAL (Ceph)\nConfig File (/etc/ganesha/export.d/share-89b22ddf-5b60-4e44-8383-c751304b375c.conf.OxRw3e:10): 1 validation errors in block FSAL\nConfig File (/etc/ganesha/export.d/share-89b22ddf-5b60-4e44-8383-c751304b375c.conf.OxRw3e:10): Errors processing block (FSAL)\nConfig File (/etc/ganesha/export.d/share-89b22ddf-5b60-4e44-8383-c751304b375c.conf.OxRw3e:1): 1 validation errors in block EXPORT\nConfig File (/etc/ganesha/export.d/share-89b22ddf-5b60-4e44-8383-c751304b375c.conf.OxRw3e:1): Errors found in configuration block EXPORT\n\n'
2018-10-18 12:14:06.462 42 ERROR oslo_messaging.rpc.server Traceback (most recent call last):
2018-10-18 12:14:06.462 42 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/server.py", line 163, in _process_incoming
2018-10-18 12:14:06.462 42 ERROR oslo_messaging.rpc.server res = self.dispatcher.dispatch(message)
2018-10-18 12:14:06.462 42 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 220, in dispatch
2018-10-18 12:14:06.462 42 ERROR oslo_messaging.rpc.server return self._do_dispatch(endpoint, method, ctxt, args)
2018-10-18 12:14:06.462 42 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 190, in _do_dispatch
2018-10-18 12:14:06.462 42 ERROR oslo_messaging.rpc.server result = func(ctxt, **new_args)
2018-10-18 12:14:06.462 42 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/manila/share/manager.py", line 187, in wrapped
2018-10-18 12:14:06.462 42 ERROR oslo_messaging.rpc.server return f(self, *args, **kwargs)
2018-10-18 12:14:06.462 42 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/manila/utils.py", line 589, in wrapper
2018-10-18 12:14:06.462 42 ERROR oslo_messaging.rpc.server return func(self, *args, **kwargs)
2018-10-18 12:14:06.462 42 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/manila/share/manager.py", line 3353, in update_access
2018-10-18 12:14:06.462 42 ERROR oslo_messaging.rpc.server share_server=share_server)
2018-10-18 12:14:06.462 42 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/manila/share/access.py", line 283, in update_access_rules
2018-10-18 12:14:06.462 42 ERROR oslo_messaging.rpc.server share_server=share_server)
2018-10-18 12:14:06.462 42 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/manila/share/access.py", line 322, in _update_access_rules
2018-10-18 12:14:06.462 42 ERROR oslo_messaging.rpc.server share_server)
2018-10-18 12:14:06.462 42 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/manila/share/access.py", line 390, in _update_rules_through_share_driver
2018-10-18 12:14:06.462 42 ERROR oslo_messaging.rpc.server share_server=share_server
2018-10-18 12:14:06.462 42 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/manila/share/drivers/cephfs/driver.py", line 251, in update_access
2018-10-18 12:14:06.462 42 ERROR oslo_messaging.rpc.server share_server=share_server)
2018-10-18 12:14:06.462 42 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/manila/share/drivers/ganesha/__init__.py", line 282, in update_access
2018-10-18 12:14:06.462 42 ERROR oslo_messaging.rpc.server self.ganesha.add_export(share['name'], confdict)
2018-10-18 12:14:06.462 42 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/manila/share/drivers/ganesha/manager.py", line 491, in add_export
2018-10-18 12:14:06.462 42 ERROR oslo_messaging.rpc.server cmd=e.cmd)
2018-10-18 12:14:06.462 42 ERROR oslo_messaging.rpc.server GaneshaCommandFailure: Ganesha management command failed.
2018-10-18 12:14:06.462 42 ERROR oslo_messaging.rpc.server Command: dbus-send --print-reply --system --dest=org.ganesha.nfsd /org/ganesha/nfsd/ExportMgr org.ganesha.nfsd.exportmgr.AddExport string:/etc/ganesha/export.d/share-89b22ddf-5b60-4e44-8383-c751304b375c.conf.OxRw3e string:EXPORT(Export_Id=1002)
2018-10-18 12:14:06.462 42 ERROR oslo_messaging.rpc.server Exit code: 1
2018-10-18 12:14:06.462 42 ERROR oslo_messaging.rpc.server Stdout: u''
2018-10-18 12:14:06.462 42 ERROR oslo_messaging.rpc.server Stderr: u'Error org.freedesktop.DBus.Error.InvalidFileContent: 0 export entries in /etc/ganesha/export.d/share-89b22ddf-5b60-4e44-8383-c751304b375c.conf.OxRw3e added because (fsal load, invalid param value, block validation, unknown param) errors. Details:\nConfig File (/etc/ganesha/export.d/share-89b22ddf-5b60-4e44-8383-c751304b375c.conf.OxRw3e:3): Expected a client, got a file path name for (0.0.0.0/0)\nConfig File (/etc/ganesha/export.d/share-89b22ddf-5b60-4e44-8383-c751304b375c.conf.OxRw3e:2): 1 validation errors in block Client\nConfig File (/etc/ganesha/export.d/share-89b22ddf-5b60-4e44-8383-c751304b375c.conf.OxRw3e:2): Errors processing block (CLIENT)\nConfig File (/etc/ganesha/export.d/share-89b22ddf-5b60-4e44-8383-c751304b375c.conf.OxRw3e:10): Failed to initialize FSAL (Ceph)\nConfig File (/etc/ganesha/export.d/share-89b22ddf-5b60-4e44-8383-c751304b375c.conf.OxRw3e:10): 1 validation errors in block FSAL\nConfig File (/etc/ganesha/export.d/share-89b22ddf-5b60-4e44-8383-c751304b375c.conf.OxRw3e:10): Errors processing block (FSAL)\nConfig File (/etc/ganesha/export.d/share-89b22ddf-5b60-4e44-8383-c751304b375c.conf.OxRw3e:1): 1 validation errors in block EXPORT\nConfig File (/etc/ganesha/export.d/share-89b22ddf-5b60-4e44-8383-c751304b375c.conf.OxRw3e:1): Errors found in configuration block EXPORT\n\n'

Revision history for this message
Tom Barron (tpb) wrote :

Ganesha driver should translate '0.0.0.0/0' to '0.0.0.0' which the ganesha back end can understand and which has the desired result of allowing access to all IPs.

tags: added: cephfs driver nfs
Changed in manila:
importance: Undecided → Low
assignee: nobody → Tom Barron (tpb)
milestone: none → stein-2
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/614170

Changed in manila:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to manila (master)

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

commit a65c2b09746fe95d31c102d99c8e7674cddc82be
Author: Tom Barron <email address hidden>
Date: Tue Oct 30 06:21:23 2018 -0400

    Fix ganesha for 0.0.0.0/0 access

    Translate '0.0.0.0/0' to '0.0.0.0' when allowing IP
    access with the ganesha driver since the ganesha back end
    cannot handle the former expression and the latter has
    the desired effect of allowing access to all IPs.

    Closes-bug: #1800627

    Change-Id: Ica698b6a70a128522c2c2de76a69e59207fd60ac

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

Fix proposed to branch: stable/rocky
Review: https://review.openstack.org/621671

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/626865

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on manila (stable/queens)

Change abandoned by Tom Barron (<email address hidden>) on branch: stable/queens
Review: https://review.openstack.org/626865
Reason: stable/rocky hasn't merged yet

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

Reviewed: https://review.openstack.org/621671
Committed: https://git.openstack.org/cgit/openstack/manila/commit/?id=67f2f61395158008381229479377f67322fab11a
Submitter: Zuul
Branch: stable/rocky

commit 67f2f61395158008381229479377f67322fab11a
Author: Tom Barron <email address hidden>
Date: Tue Oct 30 06:21:23 2018 -0400

    Fix ganesha for 0.0.0.0/0 access

    Translate '0.0.0.0/0' to '0.0.0.0' when allowing IP
    access with the ganesha driver since the ganesha back end
    cannot handle the former expression and the latter has
    the desired effect of allowing access to all IPs.

    Closes-bug: #1800627

    Change-Id: Ica698b6a70a128522c2c2de76a69e59207fd60ac
    (cherry picked from commit a65c2b09746fe95d31c102d99c8e7674cddc82be)

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

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

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

Reviewed: https://review.openstack.org/626865
Committed: https://git.openstack.org/cgit/openstack/manila/commit/?id=40792c69a78b208ad74108f79d51d56fcc1f5e0e
Submitter: Zuul
Branch: stable/queens

commit 40792c69a78b208ad74108f79d51d56fcc1f5e0e
Author: Tom Barron <email address hidden>
Date: Tue Oct 30 06:21:23 2018 -0400

    Fix ganesha for 0.0.0.0/0 access

    Translate '0.0.0.0/0' to '0.0.0.0' when allowing IP
    access with the ganesha driver since the ganesha back end
    cannot handle the former expression and the latter has
    the desired effect of allowing access to all IPs.

    Depends-on: https://review.openstack.org/#/c/626879/
    Closes-bug: #1800627
    Change-Id: Ica698b6a70a128522c2c2de76a69e59207fd60ac
    (cherry picked from commit 67f2f61395158008381229479377f67322fab11a)
    (cherry picked from commit a65c2b09746fe95d31c102d99c8e7674cddc82be)

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

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

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

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

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.