diff --git a/pkg/operator/ceph/cluster/cleanup.go b/pkg/operator/ceph/cluster/cleanup.go index a1bc76254aae..bcf48adbf70f 100644 --- a/pkg/operator/ceph/cluster/cleanup.go +++ b/pkg/operator/ceph/cluster/cleanup.go @@ -123,10 +123,18 @@ func (c *ClusterController) cleanUpJobContainer(cluster *cephv1.CephCluster, mon }...) } + // Run a UID 0 since ceph-volume does not support running non-root + // See https://tracker.ceph.com/issues/53511 + // Also, it's hard to catch the ceph version since the cluster is being deleted so not + // implementing a version check and simply always run this as root + rootUserID := int64(0) + securityContext := osd.PrivilegedContext() + securityContext.RunAsUser = &rootUserID + return v1.Container{ Name: "host-cleanup", Image: c.rookImage, - SecurityContext: osd.PrivilegedContext(), + SecurityContext: securityContext, VolumeMounts: volumeMounts, Env: envVars, Args: []string{"ceph", "clean"},