-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
spec: move machine type, zone, local ssd defaults out of the TestSpec and the registry #111811
Conversation
25cf4cb
to
a34a352
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, thanks for doing this!
const ( | ||
// LocalSSDDefault is the default mode, when the test does not have any | ||
// preference. A local SSD may or may not be used, depending on --local-ssd | ||
// flag and machine type. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sigh, I wish this was simpler. "Default" could be metamorphic but currently it's defined by --local-ssd
. The interplay between all of these components (and which one prevails) is pretty arbitrary to me (for example, IMO typically command line flags exist to overrite settings in the code, but in this case, the flag itself is overwritten).
I'd be pretty confused, as a test author. It's hard to reason about when a test is or is not going to use local SSD.
In any case, nothing to change here as this is all existing behaviour; just a rant.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And then there is --roachprod-local-ssd
which actually does override. I agree, it's a mess. I'd be happy to implement if we decide on a desirable and coherent behavior.
We could make the Default
metamorphic unless the --local-ssd
(or --local-ssd=false
) flag is passed. But yes I'd want to separate those changes from this refactoring PR.
Epic: none Release note: None
…onfig This is much more logical and allows the removal of the parameter from the registry. Epic: none Release note: None
Remove the default zones from `ClusterSpec` (and the registry), and add it to `RoachprodClusterConfig`. Epic: none Release note: None
We change the boolean in the TestSpec to a tri-state (default, prefer on, disable). This way we can apply the default when creating the cluster. Epic: none Release note: None
a34a352
to
7abfd67
Compare
bors r+ |
Build succeeded: |
112078: roachtest: clean up command-line flags r=RaduBerinde a=RaduBerinde **This PR is only for the last commit. The rest are #111811** --- #### roachtest: clean up command-line flags The code around command-line flags is pretty messy: they're defined in many places; the name and description of a flag are far away from the variable; the variable names look like local variables and in many cases it's not obvious we're accessing a global. This commit moves all flags to a separate subpackage, `roachtestflags`, making all uses of global flags obvious. We also add a bit of infrastructure to allow defining all information about a flag right next to where the variable is declared. We also provide a `Changed()` function that determines if a flag value was changed (without the caller having to use the Command or even the flag name). There should be no functional changes (just some cosmetic improvements to the flag usage texts). Epic: none Release note: None 113245: kvserver: add metric and log when raft.Storage returns an error r=erikgrinaker a=sumeerbhola The raft.storage.error metric is incremented on an error, and the error is logged every 30s (across all replicas). This was motivated by a test cluster that slowed to a crawl because of deliberate data loss, but was hard to diagnose. The metric could be used for alerting, since we don't expect to see transient errors. Informs #113053 Epic: none Release note: None 113335: kvpb: delete ErrorDetail message r=nvanbenschoten a=nvanbenschoten This was unused, so delete it. The message has been unused since 0c12f6c. Epic: None Release note: None 113636: concurrency: recompute wait queues when locking requests drop out r=nvanbenschoten a=arulajmani First commit from #112732 ---- A locking request must actively wait in a lock's wait queues if: - it conflicts with any of the lock holders. - or it conflicts with a lower sequence numbered request already in the lock's wait queue. As a result, if a locking request exits a lock's wait queue without actually acquiring the lock, it may allow other locking requests to proceed. This patch recomputes wait queues whenever a locking request exits a lock's wait queues to detect such scenarios and unblock requests which were actively waiting previously not no longer need to. Fixes #111144 Release note: None Co-authored-by: Radu Berinde <[email protected]> Co-authored-by: sumeerbhola <[email protected]> Co-authored-by: Nathan VanBenschoten <[email protected]> Co-authored-by: Arul Ajmani <[email protected]>
This set of commits makes more progress towards #104029 and - more generally - not baking in any flag configuration into the registry itself.
spec: move RoachprodOpts args to separate struct
Epic: none
Release note: None
spec: move default machine type from ClusterSpec to RoachprodClusterConfig
This is much more logical and allows the removal of the parameter from
the registry.
Epic: none
Release note: None
spec: move default zones to RoachprodClusterConfig
Remove the default zones from
ClusterSpec
(and the registry), andadd it to
RoachprodClusterConfig
.Epic: none
Release note: None
spec: move local SSD preference to RoachprodClusterConfig
We change the boolean in the TestSpec to a tri-state (default, prefer
on, disable). This way we can apply the default when creating the
cluster.
Epic: none
Release note: None