Bug 1826627 - [Ganesha+Selinux] Unexport of volume is failing for ganesha
Summary: [Ganesha+Selinux] Unexport of volume is failing for ganesha
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat Storage
Component: nfs-ganesha
Version: rhgs-3.5
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: ---
: RHGS 3.5.z Batch Update 2
Assignee: Kaleb KEITHLEY
QA Contact: Manisha Saini
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-04-22 07:27 UTC by Manisha Saini
Modified: 2020-06-16 09:13 UTC (History)
11 users (show)

Fixed In Version: nfs-ganesha-2.7.3-15
Doc Type: No Doc Update
Doc Text:
If this bug requires documentation, please select an appropriate Doc Type value.
Clone Of:
Environment:
Last Closed: 2020-06-16 05:52:41 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:2576 0 None None None 2020-06-16 05:52:48 UTC

Description Manisha Saini 2020-04-22 07:27:25 UTC
Description of problem:
=======================

Unexport of volume via ganesha is failing when selinux is set to ENFORCING mode


Following AVC's were observed in audit.log
-----------------------

# cat /var/log/audit/audit.log | grep AVC| grep ganesha
type=USER_AVC msg=audit(1587540130.884:35613): pid=1107 uid=81 auid=4294967295 ses=4294967295 subj=system_u:system_r:system_dbusd_t:s0-s0:c0.c1023 msg='avc:  denied  { send_msg } for msgtype=method_return dest=:1.2068 spid=2157465 tpid=2171464 scontext=system_u:system_r:ganesha_t:s0 tcontext=system_u:system_r:glusterd_t:s0 tclass=dbus permissive=0  exe="/usr/bin/dbus-daemon" sauid=81 hostname=? addr=? terminal=?'UID="dbus" AUID="unset" SAUID="dbus"
type=USER_AVC msg=audit(1587540155.916:35614): pid=1107 uid=81 auid=4294967295 ses=4294967295 subj=system_u:system_r:system_dbusd_t:s0-s0:c0.c1023 msg='avc:  denied  { send_msg } for msgtype=error error_name=org.freedesktop.DBus.Error.InvalidArgs dest=:1.2069 spid=2157465 tpid=2171702 scontext=system_u:system_r:ganesha_t:s0 tcontext=system_u:system_r:glusterd_t:s0 tclass=dbus permissive=0  exe="/usr/bin/dbus-daemon" sauid=81 hostname=? addr=? terminal=?'UID="dbus" AUID="unset" SAUID="dbus"

---------------------


ganesha logs

--------------------

22/04/2020 03:21:36 : epoch c6f40000 : dhcp35-21.lab.eng.blr.redhat.com : ganesha.nfsd-2157465[dbus_heartbeat] glusterfs_create_export :FSAL :EVENT :Volume ganesha exported at : '/'
22/04/2020 03:22:35 : epoch c6f40000 : dhcp35-21.lab.eng.blr.redhat.com : ganesha.nfsd-2157465[dbus_heartbeat] dbus_message_entrypoint :DBUS :MAJ :Method (RemoveExport) on (org.ganesha.nfsd.exportmgr) failed: name = (org.freedesktop.DBus.Error.InvalidArgs), message = (Cannot remove export with id 0)

---------------------

Version-Release number of selected component (if applicable):
============================================================

# rpm -qa | grep ganesha
nfs-ganesha-2.7.3-14.el8rhgs.x86_64
nfs-ganesha-debugsource-2.7.3-14.el8rhgs.x86_64
nfs-ganesha-gluster-2.7.3-14.el8rhgs.x86_64
nfs-ganesha-gluster-debuginfo-2.7.3-14.el8rhgs.x86_64
nfs-ganesha-debuginfo-2.7.3-14.el8rhgs.x86_64
glusterfs-ganesha-6.0-32.el8rhgs.x86_64
nfs-ganesha-selinux-2.7.3-14.el8rhgs.noarch



How reproducible:
================
2/2

Steps to Reproduce:
===================
1.Create 4 node ganesha cluster
2.Create a volume
3.Export the volume via ganesha. Export is successful
4.Unexport the volume via ganesha
#gluster v set <volname> ganesha.enable off

Actual results:
==============
Unexport of volume is failing via ganesha when selinux is set to ENFORCING.

# gluster v set ganesha ganesha.enable on
volume set: success

[root@dhcp35-21 ganesha]# showmount -e
Export list for dhcp35-21.lab.eng.blr.redhat.com:
/ganesha (everyone)



# cat /var/log/audit/audit.log | grep AVC | grep ganesha


# gluster v set ganesha ganesha.enable off
volume set: failed: Dynamic export addition/deletion failed. Please see log file for details



Expected results:
================
Unexport of volume should work


Additional info:

Comment 7 errata-xmlrpc 2020-06-16 05:52:41 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:2576


Note You need to log in before you can comment on or make changes to this bug.