Skip to content
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

release-21.2: roachtest: fix multitenant-upgrade #71692

Merged
merged 1 commit into from
Oct 21, 2021

Conversation

blathers-crl[bot]
Copy link

@blathers-crl blathers-crl bot commented Oct 19, 2021

Backport 1/1 commits from #71604 on behalf of @tbg.

Fixes #71269.

/cc @cockroachdb/release


In #71040 we added disk spilling for tenants which added the following
call to the mt start-sql code path:

https://github.com/cockroachdb/cockroach/blob/af5a5a5065ce80c5e6568b4b422bf5c3a179e173/pkg/cli/mt_start_sql.go#L90-L89

The defaults for the store match that of a regular CockroachDB node, and
the tenant will thus attempt to clean up temp dirs for cockroach-data
if no store is specified:

cockroach/pkg/cli/start.go

Lines 223 to 227 in 6999e5f

recordPath := filepath.Join(spec.Path, server.TempDirsRecordFilename)
if err := storage.CleanupTempDirs(recordPath); err != nil {
return base.TempStorageConfig{}, errors.Wrap(err,
"could not cleanup temporary directories from record file")
}

In the multitenant-upgrade roachtest, as it happens there was actually
a cockroach host instance running under cockroach-data, and so the
tenant would fail to try to remove its (locked) temp dirs.

Fix that by passing the --store flag to the tenants in this test. This
is mildly annoying since the predecessor version doesn't understand it
and so the test has to figure out when it is legal to pass it. Anyway,
it is done now.

I will point out that it isn't the greatest choice to have tenants
default to cockroach-data as the resulting interaction with a CRDB
server results in an unfortunate UX. I filed #71603 to that effect.

Closes #69920

Release note: None


Release justification:

In #71040 we added disk spilling for tenants which added the following
call to the `mt start-sql` code path:

https://github.com/cockroachdb/cockroach/blob/af5a5a5065ce80c5e6568b4b422bf5c3a179e173/pkg/cli/mt_start_sql.go#L90-L89

The defaults for the store match that of a regular CockroachDB node, and
the tenant will thus attempt to clean up temp dirs for `cockroach-data`
if no store is specified:

https://github.com/cockroachdb/cockroach/blob/6999e5fded43f59eb5839dc8b943fd1e2a33a3fd/pkg/cli/start.go#L223-L227

In the `multitenant-upgrade` roachtest, as it happens there was actually
a cockroach host instance running under `cockroach-data`, and so the
tenant would fail to try to remove its (locked) temp dirs.

Fix that by passing the `--store` flag to the tenants in this test. This
is mildly annoying since the predecessor version doesn't understand it
and so the test has to figure out when it is legal to pass it. Anyway,
it is done now.

I will point out that it isn't the greatest choice to have tenants
default to `cockroach-data` as the resulting interaction with a CRDB
server results in an unfortunate UX. I filed #71603 to that effect.

Release note: None
@blathers-crl blathers-crl bot force-pushed the blathers/backport-release-21.2-71604 branch from 3f12396 to 465113b Compare October 19, 2021 08:53
@blathers-crl blathers-crl bot requested a review from jaylim-crl October 19, 2021 08:53
@blathers-crl
Copy link
Author

blathers-crl bot commented Oct 19, 2021

Thanks for opening a backport.

Please check the backport criteria before merging:

  • Patches should only be created for serious issues.
  • Patches should not break backwards-compatibility.
  • Patches should change as little code as possible.
  • Patches should not change on-disk formats or node communication protocols.
  • Patches should not add new functionality.
  • Patches must not add, edit, or otherwise modify cluster versions; or add version gates.
If some of the basic criteria cannot be satisfied, ensure that the exceptional criteria are satisfied within.
  • There is a high priority need for the functionality that cannot wait until the next release and is difficult to address in another way.
  • The new functionality is additive-only and only runs for clusters which have specifically “opted in” to it (e.g. by a cluster setting).
  • New code is protected by a conditional check that is trivial to verify and ensures that it only runs for opt-in clusters.
  • The PM and TL on the team that owns the changed code have signed off that the change obeys the above rules.

Add a brief release justification to the body of your PR to justify this backport.

Some other things to consider:

  • What did we do to ensure that a user that doesn’t know & care about this backport, has no idea that it happened?
  • Will this work in a cluster of mixed patch versions? Did we test that?
  • If a user upgrades a patch version, uses this feature, and then downgrades, what happens?

@cockroach-teamcity
Copy link
Member

This change is Reviewable

@jaylim-crl jaylim-crl requested a review from tbg October 20, 2021 00:46
Copy link
Collaborator

@jaylim-crl jaylim-crl left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 2 of 2 files at r1, all commit messages.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @tbg)

@tbg
Copy link
Member

tbg commented Oct 20, 2021

Not sure what the rules for merging are these days, but going to keep this open until we've released.

@tbg
Copy link
Member

tbg commented Oct 20, 2021

Hmm actually merging this would give us coverage of the upgrade process, so I should ask to merge this.

@tbg
Copy link
Member

tbg commented Oct 21, 2021

Got approval from Isaac.

@tbg tbg merged commit 39cb5a0 into release-21.2 Oct 21, 2021
@tbg tbg deleted the blathers/backport-release-21.2-71604 branch October 21, 2021 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants