From 596a3a2ee3685ed84b13758f7a9fd01c9864714e Mon Sep 17 00:00:00 2001 From: Andrei Matei Date: Fri, 24 May 2024 16:12:36 -0400 Subject: [PATCH] roachtest: don't inhibit cluster reuse on DNS deletion errors Before this patch, a failure to delete a cluster's DNS records resulted in roachtest refusing to reuse that cluster for other tests. In general, refusing to reuse a cluster that has not been completely wiped is a sane policy (on the argument that the next test running on that cluster might be impacted by the cluster's dirty state), but DNS records in particular don't matter. So, let's be more tolerant of such errors. For people outside of CRL, that DNS deletion seems to always fail (probably because no DNS record was created in the first place) -- so this patch helps me in particular. Epic: None Release note: None --- pkg/cmd/roachtest/cluster.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/cmd/roachtest/cluster.go b/pkg/cmd/roachtest/cluster.go index 9a354760a35a..e2f75c0277a2 100644 --- a/pkg/cmd/roachtest/cluster.go +++ b/pkg/cmd/roachtest/cluster.go @@ -2996,7 +2996,8 @@ func (c *clusterImpl) WipeForReuse( // Clear DNS records for the cluster. if err := c.DestroyDNS(ctx, l); err != nil { - return err + // Log and swallow the error. + l.PrintfCtx(ctx, "failed to destroy DNS records for cluster %s: %v", c.name, err) } // Overwrite the spec of the cluster with the one coming from the test. In // particular, this overwrites the reuse policy to reflect what the test