From 84cac45d2cfae2f614a846cb0343f8bfe58898fa Mon Sep 17 00:00:00 2001 From: Stefan Haas Date: Mon, 2 Mar 2020 16:27:59 +0100 Subject: [PATCH] Ceph: Ceph CSI fails to start. #4934 Signed-off-by: Stefan Haas --- pkg/operator/ceph/csi/spec.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkg/operator/ceph/csi/spec.go b/pkg/operator/ceph/csi/spec.go index c584e6628..7815d42df 100644 --- a/pkg/operator/ceph/csi/spec.go +++ b/pkg/operator/ceph/csi/spec.go @@ -477,7 +477,6 @@ func GetDeploymentOwnerReference(clientset kubernetes.Interface, namespace strin // ValidateCSIVersion checks if the configured ceph-csi image is supported func ValidateCSIVersion(clientset kubernetes.Interface, namespace, rookImage, serviceAccountName string) error { - var ownerRef metav1.OwnerReference timeout := 15 * time.Minute logger.Infof("detecting the ceph csi image version for image %q", CSIParam.CSIPluginImage) @@ -489,11 +488,13 @@ func ValidateCSIVersion(clientset kubernetes.Interface, namespace, rookImage, se if pod == nil || len(pod.GetOwnerReferences()) == 0 { return errors.New("empty owner reference in rook operator pod") } - ownerRef = pod.GetOwnerReferences()[0] + ownerRef := pod.GetOwnerReferences()[0].DeepCopy() + + *ownerRef.BlockOwnerDeletion = false versionReporter, err := cmdreporter.New( clientset, - &ownerRef, + ownerRef, detectCSIVersionName, detectCSIVersionName, namespace, []string{"cephcsi"}, []string{"--version"}, rookImage, CSIParam.CSIPluginImage)