Skip to content

sql: rename MANAGETENANT to MANAGEVIRTUALCLUSTER#110932

Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom
knz:20230919-tenant-repl
Oct 25, 2023
Merged

sql: rename MANAGETENANT to MANAGEVIRTUALCLUSTER#110932
craig[bot] merged 1 commit intocockroachdb:masterfrom
knz:20230919-tenant-repl

Conversation

@knz
Copy link
Copy Markdown
Contributor

@knz knz commented Sep 19, 2023

Fixes #110927.
Epic: CRDB-29380

Release note (cluster virtualization): the privilege that controls access to CREATE VIRTUAL CLUSTER and other vcluster management syntax is now called MANAGEVIRTUALCLUSTER.

@knz knz requested review from a team as code owners September 19, 2023 20:21
@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

stevendanna
stevendanna previously approved these changes Sep 19, 2023
MODIFYSQLCLUSTERSETTING Kind = 28
REPLICATION Kind = 29
MANAGETENANT Kind = 30
MANAGEVIRTUALCLUSTER Kind = 30
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Not sure if this is just a display issue or an actual spacing issue.

@rafiss
Copy link
Copy Markdown
Collaborator

rafiss commented Sep 19, 2023

is this setting used by anyone currently? if so, there needs to be a migration to convert the name in the system.privileges table

@stevendanna
Copy link
Copy Markdown
Collaborator

stevendanna commented Sep 19, 2023

Uff. Good catch, I completely forgot that these are stored as strings in that table.

Theoretically this was included in the private preview in 23.1. By the letter of the law we are allowed to break that but we probably shouldn't.

@stevendanna stevendanna dismissed their stale review September 19, 2023 20:50

Migration required

@yuzefovich
Copy link
Copy Markdown
Member

For my own edification, where do we write privileges into the system table? On a somewhat quick search I only found a single UPDATE stmt in an existing migration. Do we use direct KV commands?

@rafiss
Copy link
Copy Markdown
Collaborator

rafiss commented Sep 20, 2023

it is through SQL, but just not that easy to grep for:

if _, err := params.p.InternalSQLTxn().ExecEx(
params.ctx,
`insert-system-privilege`,
params.p.txn,
sessiondata.RootUserSessionDataOverride,
upsertStmt,
user.Normalized(),
systemPrivilegeObject.GetPath(),
privList.SortedNames(),
grantOptionList.SortedNames(),
); err != nil {

@knz
Copy link
Copy Markdown
Contributor Author

knz commented Oct 3, 2023

@rafiss would the mechanism here #111653 work for you?

Copy link
Copy Markdown
Contributor Author

@knz knz left a comment

Choose a reason for hiding this comment

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

Thanks for the rebase!

Reviewed 11 of 11 files at r5, all commit messages.
Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @yuzefovich)

@yuzefovich yuzefovich added the backport-23.2.x PAST MAINTENANCE SUPPORT: 23.2 patch releases via ER request only label Oct 10, 2023
Release note (cluster virtualization): the privilege that
controls access to CREATE VIRTUAL CLUSTER and other vcluster
management syntax is now called MANAGEVIRTUALCLUSTER.
@yuzefovich yuzefovich force-pushed the 20230919-tenant-repl branch from 8fadba8 to 78077b7 Compare October 21, 2023 16:48
@yuzefovich yuzefovich removed the backport-23.2.x PAST MAINTENANCE SUPPORT: 23.2 patch releases via ER request only label Oct 21, 2023
@yuzefovich yuzefovich marked this pull request as ready for review October 21, 2023 16:49
Copy link
Copy Markdown
Member

@yuzefovich yuzefovich left a comment

Choose a reason for hiding this comment

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

RFAL @stevendanna @rafiss

Reviewed 8 of 8 files at r1, 4 of 11 files at r5, 41 of 41 files at r6, all commit messages.
Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @knz, @rafiss, and @stevendanna)

Copy link
Copy Markdown
Collaborator

@stevendanna stevendanna left a comment

Choose a reason for hiding this comment

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

Thanks for picking this up.

@yuzefovich
Copy link
Copy Markdown
Member

TFTR!

bors r+

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Oct 25, 2023

Build failed (retrying...):

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Oct 25, 2023

Build succeeded:

@craig craig bot merged commit f4d0c8b into cockroachdb:master Oct 25, 2023
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.

sql: rename the privilege MANAGETENANT

5 participants