Skip to content

Conversation

@iliana
Copy link
Contributor

@iliana iliana commented Dec 19, 2025

Closes #9021.

Should probably also add and require the -w (destructive) flag... (or perhaps there's some way I can tell cockroach-sql to set up a read-only session?)
Not tested yet, had troubles with deploying to a racklette and I decided Friday afternoon is not the time to debug that.

Changes to oxidecomputer/cockroachdb (no source changes):
oxidecomputer/cockroach@80eed95
oxidecomputer/cockroach@367bca4

@iliana iliana requested a review from davepacheco December 19, 2025 23:23
Copy link
Collaborator

@davepacheco davepacheco left a comment

Choose a reason for hiding this comment

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

I'm very excited about this.

CockroachDB does have a default_transaction_read_only option. And it looks like you can pass --read-only to cockroach sql (and so presumably cockroach-sql):

      --read-only                    
                                      Set the session variable default_transaction_read_only to on.

But even if we do this for you, the user can just change it once you're in the SQL shell. I think what I'd suggest is to do both: require -w/--destructive in omdb and also pass --read-only when invoking cockroach-sql. I could be talked into not requiring the -w on omdb, on the argument that "if you set read-only off in the interactive shell, that's on you".

source.packages = [
"omicron-nexus.tar.gz",
"omicron-omdb.tar.gz",
"cockroachdb-sql.tar.gz",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why is this in the Nexus zone?

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.

ship cockroach-sql in the switch zone

3 participants