From e52efdb8d4ed98129708d49cbbbbbcb083b02d6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Wed, 24 Jul 2019 17:47:43 +0200 Subject: [PATCH] ceph: mgr fix startup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Because the manager is running under the 'ceph' user the cephfs subvolume plugin can not create directories anymore. It fails with a permission denied because of the usage of the 'ceph' user, root is need here, hence the special startup line to go over this. Closes: https://github.com/ceph/ceph-csi/issues/486 Signed-off-by: Sébastien Han --- pkg/operator/ceph/cluster/mgr/spec.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/operator/ceph/cluster/mgr/spec.go b/pkg/operator/ceph/cluster/mgr/spec.go index 7c04f0086..7afa81e40 100644 --- a/pkg/operator/ceph/cluster/mgr/spec.go +++ b/pkg/operator/ceph/cluster/mgr/spec.go @@ -25,6 +25,7 @@ import ( rookcephv1 "github.com/rook/rook/pkg/apis/ceph.rook.io/v1" "github.com/rook/rook/pkg/daemon/ceph/client" "github.com/rook/rook/pkg/operator/ceph/cluster/mon" + "github.com/rook/rook/pkg/operator/ceph/config" "github.com/rook/rook/pkg/operator/ceph/config/keyring" opspec "github.com/rook/rook/pkg/operator/ceph/spec" cephver "github.com/rook/rook/pkg/operator/ceph/version" @@ -240,6 +241,10 @@ func (c *Cluster) makeMgrDaemonContainer(mgrConfig *mgrConfig) v1.Container { }, Args: append( opspec.DaemonFlags(c.clusterInfo, mgrConfig.DaemonID), + // for ceph-mgr cephfs + // see https://github.com/ceph/ceph-csi/issues/486 for more details + config.NewFlag("client-mount-uid", "0"), + config.NewFlag("client-mount-gid", "0"), "--foreground", ), Image: c.cephVersion.Image,