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-23.2: roachprod: create admin user and backup schedule for virtual clusters #119540

Merged
merged 4 commits into from
Feb 23, 2024

Conversation

renatolabs
Copy link
Contributor

Backport 4/4 commits from #118851.

/cc @cockroachdb/release

Release justification: test only changes.


This commit updates roachprod start{-sql} and unifies the set of
steps performed on the cluster regardless of whether we are starting
the system tenant for the first time or creating a new tenant.

Specifically, tenants will also have an admin user configured and a
default backup schedule is created when --schedule-backups is passed.

Epic: none

Release note: None

This changes `DefaultStartOpts` to use `system` as
`VirtualClusterName`. This simplifies the starting logic slightly, as
it ensures that the field is always non-empty when starting
clusters. When using `roachprod start`, the field will correctly be
set to `system`; when using `roachprod start-sql`, the field will be
the name of the tenant being started.

Epic: none

Release note: None
We will soon create default backup schedules for tenants as they are
started as well. This flag will allow backup management to be
controlled the same way as they currently are for the system tenant.

Epic: none

Release note: None
This commit updates `roachprod start{-sql}` and unifies the set of
steps performed on the cluster regardless of whether we are starting
the system tenant for the first time or creating a new tenant.

Specifically, tenants will also have an admin user configured and a
default backup schedule is created when `--schedule-backups` is passed.

Epic: none

Release note: None
More concretly, build `StartOpts` based on roachtest's implementation
of `DefaultStartOpts`, which includes creating a default backup
schedule on start.

Epic: none

Release note: None
@renatolabs renatolabs requested a review from a team as a code owner February 22, 2024 21:21
@renatolabs renatolabs requested review from herkolategan and DarrylWong and removed request for a team February 22, 2024 21:21
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@renatolabs renatolabs changed the title roachprod: use system as default virtual cluster name release-23.2: roachprod: create admin user and backup schedule for virtual clusters Feb 22, 2024
// Use the same combination for username and password to allow
// people using the DB console to easily switch between tenants in
// the UI, if managing UA clusters.
const username = DefaultUser
Copy link
Contributor

Choose a reason for hiding this comment

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

It should be okay to stop using roach/system because I don't think any tests in 23.2 are using it in the first place. Does that sound right?

Copy link
Contributor Author

@renatolabs renatolabs Feb 23, 2024

Choose a reason for hiding this comment

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

Yes, that sounds right. As you're well aware, most tests are not be running in secure mode in these branches. Most of the ones that do use the root user; the few tests that don't use root typically use some other user created during the test itself.

This default admin user logic was created not that long ago, and initially had the intention of making it convenient for people creating roachprod clusters to immediately be able to login to the DB console (and, similarly, to log in on clusters after roachtest runs with --debug).

@renatolabs
Copy link
Contributor Author

renatolabs commented Feb 23, 2024

Started a sanity 0.1 run and a run of tenant tests.

@renatolabs
Copy link
Contributor Author

Both builds ran without errors. TFTR!

@renatolabs renatolabs merged commit db5687f into cockroachdb:release-23.2 Feb 23, 2024
5 of 6 checks passed
@renatolabs renatolabs deleted the backport23.2-118851 branch February 23, 2024 22:26
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