cockroachdb / cockroachdb/cockroach

roachtest: enforce at-most once remote command execution

Open
#143,845 2 comments 0 reactions 0 assignees View on GitHub
A-testeng-foundations branch-master C-bug T-testeng
Dominant language
Go
Stars
32.5k
Forks
4.1k
PR merge metrics
PR metrics pending

Description

Currently, roachtest uses `roachprod.Run` with `DefaultRunOptions` for remote command execution, e.g., running workload(s). The `DefaultRunOptions` include `DefaultRetryOpt`, which performs up to 2 retries; i.e., a specified command may be executed at most 3 times. Many commands are in fact _not_ idempotent. It's probably ok to retry a workload, but only if it fails _cleanly_. In some rare cases, it's possible to end up with _multiple_ concurrent instances, which could lead to corrupted metrics [1], and other unwanted side-effects. We should provide an implementation which enforces _at-most once_ execution, e.g., using systemd.unit, as well as audit existing roachtests.
The implementation might also be in support of the problem described in [2].

[1] https://github.com/cockroachdb/cockroach/issues/142513#issuecomment-2764936630
[2] https://github.com/cockroachdb/cockroach/issues/143455

Jira issue: CRDB-49075

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.