Ceph: Ceph CSI fails to start. #4934

Signed-off-by: Stefan Haas <shaas@suse.com>
This commit is contained in:
Stefan Haas committed 2020-03-02 16:27:59 +01:00
1 parent 96daf44873
commit 84cac45d2c
1 file changed
+4 -3
+4 -3
View File
@@ -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)