Skip to content

roachprod: add sufficient tenant ids when creating v22.2 client certs#136319

Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom
DarrylWong:add-tenant-ids
Dec 2, 2024
Merged

roachprod: add sufficient tenant ids when creating v22.2 client certs#136319
craig[bot] merged 1 commit intocockroachdb:masterfrom
DarrylWong:add-tenant-ids

Conversation

@DarrylWong
Copy link
Copy Markdown
Contributor

In v22.2, tenant ids must be specified when creating client certs. Previously, only a select number tenant ids of were specified. Those ids were chosen to match the hardcoded ids used by the old multitenant roachprod framework.

Now that the new mt framework assigns ids sequentially, we see that creating tenants with ids not specified causes auth issues on clusters bootstrapped on 22.2. Since there should be no drawback to assigning more valid tenant ids than needed, we now add tenants 1 to 100. This should be more than enough for roachprod/roachtest.

Fixes: #133282
Epic: none
Relese note: none

@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

@DarrylWong DarrylWong added backport-24.1.x Flags PRs that need to be backported to 24.1. backport-24.2.x backport-24.3.x Flags PRs that need to be backported to 24.3 and removed backport-24.3.x Flags PRs that need to be backported to 24.3 labels Nov 27, 2024
@DarrylWong
Copy link
Copy Markdown
Contributor Author

Passing run of multitenant-upgrade on 24.3 (so the failing seed bootstraps on 22.2).

@DarrylWong DarrylWong marked this pull request as ready for review November 30, 2024 15:28
@DarrylWong DarrylWong requested a review from a team as a code owner November 30, 2024 15:28
@DarrylWong DarrylWong requested review from herkolategan and nameisbhaskar and removed request for a team November 30, 2024 15:28
TENANT_SCOPE_OPT=""
if [[ $VERSION = v22.2 ]]; then
TENANT_SCOPE_OPT="--tenant-scope 1,2,3,4,11,12,13,14"
TENANT_SCOPE_OPT="--tenant-scope $(echo {1..100} | tr ' ' ,)"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: I'd still enclose the delimiter in quotes for ease of (human) parsing; i.e., ','

In v22.2, tenant ids must be specified when creating client certs.
Previously, only a select number tenant ids of were specified. Those ids
were chosen to match the hardcoded ids used by the old multitenant
roachprod framework.

Now that the new mt framework assigns ids sequentially, we see that
creating tenants with ids not specified causes auth issues on clusters
bootstrapped on 22.2. Since there should be no drawback to assigning
more valid tenant ids than needed, we now add tenants 1 to 100. This
should be more than enough for roachprod/roachtest.

Fixes: cockroachdb#133282
Epic: none
Relese note: none
@DarrylWong
Copy link
Copy Markdown
Contributor Author

TFTRs

bors r=srosenberg, herkolategan

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Dec 2, 2024

@craig craig bot merged commit fcddae9 into cockroachdb:master Dec 2, 2024
@blathers-crl
Copy link
Copy Markdown

blathers-crl bot commented Dec 2, 2024

Based on the specified backports for this PR, I applied new labels to the following linked issue(s). Please adjust the labels as needed to match the branches actually affected by the issue(s), including adding any known older branches.


Issue #133282: branch-release-24.1, branch-release-24.2.


🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

@blathers-crl
Copy link
Copy Markdown

blathers-crl bot commented Dec 2, 2024

Encountered an error creating backports. Some common things that can go wrong:

  1. The backport branch might have already existed.
  2. There was a merge conflict.
  3. The backport branch contained merge commits.

You might need to create your backport manually using the backport tool.


error creating merge commit from 75758a6 to blathers/backport-release-24.1-136319: POST https://api.github.com/repos/cockroachdb/cockroach/merges: 409 Merge conflict []

you may need to manually resolve merge conflicts with the backport tool.

Backport to branch 24.1.x failed. See errors above.


🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-24.1.x Flags PRs that need to be backported to 24.1.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

roachtest: multitenant-upgrade failed

4 participants