Ganesha manager service initialization fails if ganesha exports directory is empty

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

Bug Description

During initialization of the ganesha manager service the exports are reset i.e., ganesha export files are removed from the
ganesha exports directory. When no files are present in the ganesha exports directory (by default /etc/ganesha/export.d), the ganesha service initialization fails as follows,

TRACE manila.service File "/opt/stack/manila/manila/share/manager.py", line 78, in init_host
TRACE manila.service self.driver.do_setup(ctxt)
TRACE manila.service File "/opt/stack/manila/manila/share/drivers/glusterfs.py", line 204, in do_setup
TRACE manila.service self._setup_helpers()
TRACE manila.service File "/opt/stack/manila/manila/share/drivers/glusterfs.py", line 217, in _setup_helpers
TRACE manila.service helper.init_helper()
TRACE manila.service File "/opt/stack/manila/manila/share/drivers/ganesha/__init__.py", line 91, in init_helper
TRACE manila.service ganesha_service_name=self.configuration.ganesha_service_name)
TRACE manila.service File "/opt/stack/manila/manila/share/drivers/ganesha/manager.py", line 217, in __init__
TRACE manila.service self.reset_exports()
TRACE manila.service File "/opt/stack/manila/manila/share/drivers/ganesha/manager.py", line 343, in reset_exports
TRACE manila.service 'rm %s/*.conf' % pipes.quote(self.ganesha_export_dir))
TRACE manila.service File "/opt/stack/manila/manila/share/drivers/ganesha/manager.py", line 196, in _execute
TRACE manila.service cmd=e.cmd)
TRACE manila.service GaneshaCommandFailure: Ganesha management command failed.
TRACE manila.service Command: sudo manila-rootwrap /etc/manila/rootwrap.conf sh -c rm /etc/ganesha/export.d/*.conf
TRACE manila.service Exit code: 1
TRACE manila.service Stdout: u''
TRACE manila.service Stderr: u"rm: cannot remove '/etc/ganesha/export.d/*.conf': No such file or directory\n"

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

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

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

commit 80698a442045aebc2cffe3b6e29c9671e661508b
Author: Ramana Raja <email address hidden>
Date: Mon Feb 2 10:06:41 2015 +0530

    ganesha: fix resetting of exports

    When resetting exports, i.e., remove files present in the ganesha
    export directory, during manager service initalization, ignore if the
    directory is already empty. This allows ganesha manage service to
    initialize even if the ganesha export directory is empty.

    Change-Id: Iabe3f36d4f05b0fc451695b261a538b2e87be7a5
    Closes-Bug: #1416958

Changed in manila:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in manila:
milestone: none → kilo-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in manila:
milestone: kilo-2 → 2015.1.0
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.