Skip to content

Commit 20ea8e1

Browse files
committed
roachest: ensure reader tenant accepts connections before restart
Previously, the roachtest would restart the tenant before the tenant could accept connections, which means the tenant could still be bootstrapping. Restarting the tenant service during bootstrap could lead to sadness, as outlined in #154356. Informs #154356 Informs #154311 Informs #153131 Release note: none
1 parent 92b4af4 commit 20ea8e1

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

pkg/cmd/roachtest/tests/cluster_to_cluster.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1051,6 +1051,16 @@ func (rd *replicationDriver) maybeRestartReaderTenantService(ctx context.Context
10511051
return nil
10521052
})
10531053

1054+
// Now wait for the reader tenant to be accepting connections
1055+
readerTenantConn := rd.c.Conn(ctx, rd.t.L(), rd.setup.dst.gatewayNodes[0],
1056+
option.VirtualClusterName(readerTenantName),
1057+
option.DBName("system"),
1058+
option.User("root"),
1059+
option.AuthMode(install.AuthRootCert))
1060+
1061+
defer readerTenantConn.Close()
1062+
testutils.SucceedsSoon(rd.t, func() error { return readerTenantConn.Ping() })
1063+
10541064
rd.t.Status("restarting reader tenant service")
10551065

10561066
// Stop the reader tenant service

0 commit comments

Comments
 (0)