Skip to content

Commit

Permalink
roachtest: backup-restore/small-ranges gather debug zip files
Browse files Browse the repository at this point in the history
Previously, if the backup-restore tests had workload errors before the
cluster was wiped then only debug zip data from after wiping the cluster
would be kept. This would make workload issues impossible to diagnose /
resolve if the problem was inside the CRDB code base, To address this,
this patch adds logic to take a debug zip before wiping the cluster.

Fixes: #134928

Release note: None
  • Loading branch information
fqazi committed Nov 28, 2024
1 parent 73d7a3f commit db82a7a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/cmd/roachtest/tests/backup_restore_roundtrip.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,11 @@ func backupRestoreRoundTrip(
m.ExpectDeaths(int32(n))
}

// Between each reset grab a debug zip from the cluster.
zipPath := fmt.Sprintf("debug-%d.zip", timeutil.Now().Unix())
if err := testUtils.cluster.FetchDebugZip(ctx, t.L(), zipPath); err != nil {
t.L().Printf("failed to fetch a debug zip: %v", err)
}
if err := testUtils.resetCluster(ctx, t.L(), clusterupgrade.CurrentVersion(), expectDeathsFn, []install.ClusterSettingOption{}); err != nil {
return err
}
Expand Down

0 comments on commit db82a7a

Please sign in to comment.