-
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
roachprod,roachtest: clean up references to raid and multiple stores #82427
roachprod,roachtest: clean up references to raid and multiple stores #82427
Conversation
Currently, roachprod has flags for enabling multiple stores on nodes in a cluster, defaulting to `false`. If more than one storage device is present on a node, the devices are combined into a RAID0 (striped) volume. The terms "using multiple disks" and "using multiple stores" are also used interchangeably. Roachtest has its own cluster spec option, `RAID0(enabled)` for enabling RAID0, passing through the `UseMultipleDisks` parameter to roachprod. The former is the negation of the latter (i.e. RAID0 implies _not_ using multiple disks, using multiple disks implies _not_ using RAID0, etc.) The combination of "using multiple disks", "using multiple stores" and "using RAID0" can result in some cognitive overhead. Simplify things by adopting the "using multiple stores" parlance. Replace the `RAID0` roachtest cluster spec option with the `MultipleStores` option, updating existing call-sites with the negation (i.e. `RAID0(true)` becomes `MultipleStores(false)`, etc.). Allow AWS roachtests to enable / disable multiple stores. Previously, this functionality was limited to GCP clusters. Touches cockroachdb#82423. Release note: None.
@@ -64,7 +64,7 @@ type ClusterSpec struct { | |||
// MakeClusterSpec makes a ClusterSpec. | |||
func MakeClusterSpec(cloud string, instanceType string, nodeCount int, opts ...Option) ClusterSpec { | |||
spec := ClusterSpec{Cloud: cloud, InstanceType: instanceType, NodeCount: nodeCount} | |||
defaultOpts := []Option{CPU(4), nodeLifetimeOption(12 * time.Hour), ReuseAny()} | |||
defaultOpts := []Option{CPU(4), nodeLifetimeOption(12 * time.Hour), ReuseAny(), MultipleStores(true)} |
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.
The existing default (changed in #72803) is to use multiple stores on GCP. This didn't apply for AWS, as one can't use spec.SSD
with AWS clusters (yet). This just makes it consistent across clouds.
@@ -128,13 +130,7 @@ func getGCEOpts( | |||
opts.Zones = zones | |||
} | |||
opts.SSDCount = localSSDCount | |||
if localSSD && localSSDCount > 0 { |
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.
I think this change makes it simpler to understand - multiple stores / single store no matter whether the disks are SSDs or PDs. The same applies to AWS.
Confirmed that with this spec:
I'm getting
i.e. the EBS volume is data1. This is what I wanted. I need to check if I need the AvoidSSD and SSD(0) options as well. This status quo is still a bit odd. I want that test to only have EBS. I don't want the local SSD. But, it's there, despite my attempts to not have it. I think this is how it's going to be - |
I wonder if it's time to extend the spec. to support any combination of persistent drives and local SSDs, optionally using RAID0. Roughly, this would look something like this,
Disks with the same |
@tbg - You're getting the extra disk because we use instances with disks, explicitly, by default (here), calculated from the number of CPUs one requests - note the
This patch isn't addressing that, nor the default instance type thing mentioned above, as it would probably require an audit of existing tests to see if we'd be pulling the rug on anyone that relies on it. I learned the hard way in #72803. Note that that PR actually changed some default behavior for roachtests on GCE (defaulting to multiple stores). That said, I agree with you that we probably shouldn't stripe by default. That's all handled here (AWS) and here (GCP), fwiw. @srosenberg - I agree we probably need to think about extending the spec. I didn't really want to bite off more than I wanted to chew on for this change. My intention with this patch was cosmetic - do away with the Perhaps another way of handling this could be to use If we'd prefer to go with the larger rework to extend the spec, which would most likely obsolete this patch, I'm happy to decline this in favor of that. |
Right but I can't since this is a roachtest that is cloud agnostic. Or rather, I can, but it seems ugly. |
Un-requesting review since this PR is stalled - happy to re-engage when pinged. |
Going to close out for now. The "right fix" likely requires a restructuring of some existing specs. Ideally the conversation here would inform such a fix, in addition to what's mentioned in #82423 already. |
TFTRs! |
Currently, roachprod has flags for enabling multiple stores on nodes in
a cluster, defaulting to
false
. If more than one storage device ispresent on a node, the devices are combined into a RAID0 (striped)
volume. The terms "using multiple disks" and "using multiple stores" are
also used interchangeably.
Roachtest has its own cluster spec option,
RAID0(enabled)
for enablingRAID0, passing through the
UseMultipleDisks
parameter to roachprod.The former is the negation of the latter (i.e. RAID0 implies not using
multiple disks, using multiple disks implies not using RAID0, etc.)
The combination of "using multiple disks", "using multiple stores" and
"using RAID0" can result in some cognitive overhead. Simplify things by
adopting the "using multiple stores" parlance.
Replace the
RAID0
roachtest cluster spec option with theMultipleStores
option, updating existing call-sites with the negation(i.e.
RAID0(true)
becomesMultipleStores(false)
, etc.).Allow AWS roachtests to enable / disable multiple stores. Previously,
this functionality was limited to GCP clusters.
Touches #82423.
Release note: None.