From 51ff5c81623f309ba3eb7b93dd4d70f271af1459 Mon Sep 17 00:00:00 2001 From: Guillaume Abrioux Date: Thu, 21 Nov 2019 16:23:12 +0100 Subject: [PATCH] nfs: run a dedicated dbus daemon for nfs-ganesha This runs a dedicated dbus daemon for nfs-ganesha in order to avoid using the host dbus socket so we don't have to launch nfs-ganesha with --privileged option. Related ceph-ansible PR: ceph/ceph-ansible#4760 Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1725254 Signed-off-by: Guillaume Abrioux (cherry picked from commit 9d78f73178d2e69b3972ea5aa62cf89188f7cad9) --- src/daemon/start_nfs.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/daemon/start_nfs.sh b/src/daemon/start_nfs.sh index f5898e8a6..7eb52e0e2 100755 --- a/src/daemon/start_nfs.sh +++ b/src/daemon/start_nfs.sh @@ -8,12 +8,19 @@ function start_rpc { } +function start_dbus { + mkdir -p /run/dbus + dbus-daemon --system +} + function start_nfs { get_config check_config # Init RPC start_rpc + # Start dbus daemon + start_dbus if [ ! -e "$RGW_KEYRING" ]; then @@ -33,6 +40,7 @@ function start_nfs { # create ganesha log directory since the package does not create it mkdir -p /var/log/ganesha/ + log "SUCCESS" # start ganesha, logging both to STDOUT and to the configured location exec /usr/bin/ganesha.nfsd "${GANESHA_OPTIONS[@]}" -F -L STDOUT "${GANESHA_EPOCH}"