From 7d115246430aac741542ab9987ae63104d537efd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Mon, 23 Dec 2019 09:59:04 +0100 Subject: [PATCH] ceph: add missing vol mount for encrypted osds MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit "ceph-volume activate" on encrypted osds needs a ceph.conf as well as connectivity to the mons. This commit adds that to that "activate-osd" init container. Closes: https://github.com/rook/rook/issues/4558 Signed-off-by: Sébastien Han --- pkg/operator/ceph/cluster/osd/spec.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/operator/ceph/cluster/osd/spec.go b/pkg/operator/ceph/cluster/osd/spec.go index 488961926..d56b59e5a 100644 --- a/pkg/operator/ceph/cluster/osd/spec.go +++ b/pkg/operator/ceph/cluster/osd/spec.go @@ -565,6 +565,8 @@ func (c *Cluster) getCopyBinariesContainer() (v1.Volume, *v1.Container) { func (c *Cluster) getActivateOSDInitContainer(osdID, osdUUID string, isFilestore bool, osdProps osdProperties) (v1.Volume, *v1.Container) { volume := v1.Volume{Name: activateOSDVolumeName, VolumeSource: v1.VolumeSource{EmptyDir: &v1.EmptyDirVolumeSource{}}} envVars := cephVolumeEnvVar() + envVars = append(envVars, v1.EnvVar{Name: "CEPH_ARGS", Value: "-m $(ROOK_CEPH_MON_HOST)"}) + osdStore := "--bluestore" if isFilestore { osdStore = "--filestore" @@ -576,6 +578,7 @@ func (c *Cluster) getActivateOSDInitContainer(osdID, osdUUID string, isFilestore volMounts := []v1.VolumeMount{ {Name: activateOSDVolumeName, MountPath: activateOSDMountPathID}, {Name: "devices", MountPath: "/dev"}, + {Name: k8sutil.ConfigOverrideName, ReadOnly: true, MountPath: opconfig.EtcCephDir}, } privileged := true