From bc4875a5ebc097bbbad829ee5ce3e1a7cec81e69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Tue, 21 Jul 2020 08:57:59 +0200 Subject: [PATCH] ci: only apply cleanup policy on converged cluster MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There is no point of asking for a cleanup when the cluster is external, also the cleanup pod will never exist and the CI will fail waiting for it. Signed-off-by: Sébastien Han --- tests/framework/installer/ceph_installer.go | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/tests/framework/installer/ceph_installer.go b/tests/framework/installer/ceph_installer.go index 95fbad9a0..d4f13dc59 100644 --- a/tests/framework/installer/ceph_installer.go +++ b/tests/framework/installer/ceph_installer.go @@ -520,8 +520,11 @@ func (h *CephInstaller) UninstallRookFromMultipleNS(systemNamespace string, name for clusterNum, namespace := range namespaces { if h.cleanupHost { //Add cleanup policy to the ceph cluster - err = h.addCleanupPolicy(namespace) - assert.NoError(h.T(), err) + // Add cleanup policy to the ceph cluster but NOT the external one + if clusterNum == 0 { + err = h.addCleanupPolicy(namespace) + assert.NoError(h.T(), err) + } } if !h.T().Failed() { @@ -547,8 +550,11 @@ func (h *CephInstaller) UninstallRookFromMultipleNS(systemNamespace string, name checkError(h.T(), err, fmt.Sprintf("cannot remove cluster %s", namespace)) if h.cleanupHost { - err = h.waitForCleanupJobs(namespace) - assert.NoError(h.T(), err) + // The second cluster is external so the cleanup pod will never exist! + if clusterNum == 0 { + err = h.waitForCleanupJobs(namespace) + assert.NoError(h.T(), err) + } } roles := h.Manifests.GetClusterRoles(namespace, systemNamespace)