roachprod: Make multiple set [provider]-zones always geo-distribute nodes#43748
Conversation
|
Looks like these changes conflict with some other flag-handling changes that just landed. |
06a7278 to
f2ef78e
Compare
|
Ha. Such luck! I've done the update. It's RFAL. |
ajwerner
left a comment
There was a problem hiding this comment.
If I read this change correctly it's going to massively change the behavior of roachprod for users which don't specify zones. Most users never specify any zones. There is an inbuilt assumption (perhaps bad) that if you don't specify geo you're going to get a cluster in us-east2 and if you do it's going to span us-west, us-east and eu-west (for AWS and equivalent for GCP).
Reviewable status:
complete! 0 of 0 LGTMs obtained (waiting on @bobvawter and @kenliu)
|
This PR doesn't change how --geo is applied when no zones are specified on the command line. It seems the PR and commit descriptions need to be more extensive in describing the new behavior. Here are the combinations for how it works:
I'll make the description updates. Your question does bring up for me though that it would be good to communicate the change before I merge. Also, are there any automated tasks that would need to be updated based on the new implementation? Or anything I should check? |
ajwerner
left a comment
There was a problem hiding this comment.
Check for uses of create in https://github.com/cockroachdb/cockroach/tree/master/pkg/cmd/roachtest
Reviewable status:
complete! 0 of 0 LGTMs obtained (waiting on @bobvawter and @kenliu)
ajwerner
left a comment
There was a problem hiding this comment.
Seems like it should be alright. I think the thing I missed was that you're defaulting the zones to []string{}
Reviewable status:
complete! 0 of 0 LGTMs obtained (waiting on @bobvawter and @kenliu)
bobvawter
left a comment
There was a problem hiding this comment.
Some nits:
- The default value of
nilis idiomatic for providing an empty slice value.cap(nil)==len(nil) == 0 - You can have the commit automatically close the issue when merged if you use
Fixes: #12345. There are also a number of synonyms: https://help.github.com/en/github/managing-your-work-on-github/closing-issues-using-keywords - It would be nice to add a table to the roachprod readme showing the interplay of the various geo vs. zones options and where a user can expect nodes to be provisioned.
Changes to tools are usually announced with a note to the eng@ mailing list and the #engineering channel.
Reviewed 4 of 4 files at r1.
Reviewable status:complete! 0 of 0 LGTMs obtained (waiting on @kenliu)
…odes Before: if multiple zones were set for a provider and --geo wasn't set, all hosts would be started in just one zone in one region. Why change? Because if multiple zones are set, the intention is that they be used. Now, --geo and --[provider]-zones work as follows for gcloud, aws and azure: 1. when geo and zones are not set, nodes are all placed in one of the default zones 2. when geo is set but zones aren't, nodes are spread evenly across the default zones 3. when zones are set, nodes are spread evenly across the specified zones Fixes cockroachdb#38542. Release note: None
f2ef78e to
d24e40e
Compare
|
This is RFAL. I've updated to use |
bobvawter
left a comment
There was a problem hiding this comment.
Reviewed 4 of 4 files at r2.
Reviewable status:complete! 1 of 0 LGTMs obtained (waiting on @kenliu)
|
bors r+ |
43748: roachprod: Make multiple set [provider]-zones always geo-distribute nodes r=jlinder a=jlinder Before: if multiple zones were set for a provider and --geo wasn't set, all hosts would be started in just one zone in one region. Why change? Because if multiple zones are set, the intention is that they be used. Now, --geo and --[provider]-zones work as follows for gcloud, aws and azure: 1. when geo and zones are not set, nodes are all placed in one of the default zones 2. when geo is set but zones aren't, nodes are spread evenly across the default zones 3. when zones are set, nodes are spread evenly across the specified zones Fixes #38542. Release note: None Co-authored-by: James H. Linder <jamesl@cockroachlabs.com>
Build succeeded |
Before: all zones specified either in the clusterSpec or via the --zones flag were added to the roachprod command without regard to whether --geo was set. Why change? Because the way roachprod handled --geo and --[provider]-zones changed. See cockroachdb#43748 . Now: 1. if geo is not set and zones are set (via CLI flag or in the clusterSpec), only the first zone will be passed to roachprod. 2. if geo is set and zones are set (via CLI flag or in the clusterSpec), all zones will be passed to roachprod. Fixes cockroachdb#43898 Release note: None
Before: all zones specified either in the clusterSpec or via the --zones flag were added to the roachprod command without regard to whether --geo was set. Why change? Because the way roachprod handled --geo and --[provider]-zones changed. See cockroachdb#43748 . Now: 1. if geo is not set and zones are set (via CLI flag or in the clusterSpec), only the first zone will be passed to roachprod. 2. if geo is set and zones are set (via CLI flag or in the clusterSpec), all zones will be passed to roachprod. Fixes cockroachdb#43898 Release note: None
43975: roachtest: only pass one zone if geo isn't set r=jlinder a=jlinder Before: all zones specified either in the clusterSpec or via the --zones flag were added to the roachprod command without regard to whether --geo was set. Why change? Because the way roachprod handled --geo and --[provider]-zones changed. See #43748 . Now: 1. if geo is not set and zones are set (via CLI flag or in the clusterSpec), only the first zone will be passed to roachprod. 2. if geo is set and zones are set (via CLI flag or in the clusterSpec), all zones will be passed to roachprod. Fixes #43898 Release note: None Co-authored-by: James H. Linder <jamesl@cockroachlabs.com>
Before: if multiple zones were set for a provider and --geo wasn't set, all hosts
would be started in just one zone in one region.
Why change? Because if multiple zones are set, the intention is that they be
used.
Now, --geo and --[provider]-zones work as follows for gcloud, aws and azure:
Fixes #38542.
Release note: None