Skip to content

Commit d59e3a7

Browse files
committed
rebase
Created using jj-spr 0.1.0
2 parents 09a969b + 6d3d258 commit d59e3a7

37 files changed

+2325
-2491
lines changed

.github/buildomat/jobs/deploy.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#:
33
#: name = "helios / deploy"
44
#: variety = "basic"
5-
#: target = "lab-2.0-opte-0.37"
5+
#: target = "lab-2.0-opte-0.38"
66
#: output_rules = [
77
#: "%/var/svc/log/oxide-*.log*",
88
#: "%/zone/oxz_*/root/var/svc/log/oxide-*.log*",

Cargo.lock

Lines changed: 22 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -567,8 +567,8 @@ ntp-admin-api = { path = "ntp-admin/api" }
567567
ntp-admin-client = { path = "clients/ntp-admin-client" }
568568
ntp-admin-types = { path = "ntp-admin/types" }
569569
ntp-admin-types-versions = { path = "ntp-admin/types/versions" }
570-
mg-admin-client = { git = "https://github.com/oxidecomputer/maghemite", rev = "205b3ccf75b527ac7a565285fdcc0c78f4fcee95" }
571-
ddm-admin-client = { git = "https://github.com/oxidecomputer/maghemite", rev = "205b3ccf75b527ac7a565285fdcc0c78f4fcee95" }
570+
mg-admin-client = { git = "https://github.com/oxidecomputer/maghemite", rev = "396bb3c570be65f4e8c73ea3243f4af6561a823a" }
571+
ddm-admin-client = { git = "https://github.com/oxidecomputer/maghemite", rev = "396bb3c570be65f4e8c73ea3243f4af6561a823a" }
572572
multimap = "0.10.1"
573573
nexus-auth = { path = "nexus/auth" }
574574
nexus-background-task-interface = { path = "nexus/background-task-interface" }
@@ -627,7 +627,7 @@ omicron-workspace-hack = "0.1.0"
627627
omicron-zone-package = "0.12.2"
628628
oxide-client = { path = "clients/oxide-client" }
629629
oxide-tokio-rt = "0.1.2"
630-
oxide-vpc = { git = "https://github.com/oxidecomputer/opte", rev = "795a1e0aeefb7a2c6fe4139779fdf66930d09b80", features = [ "api", "std" ] }
630+
oxide-vpc = { git = "https://github.com/oxidecomputer/opte", rev = "4bd8a40c0f5c05de7bb29b5f592f2dc99b4fd1d7", features = [ "api", "std" ] }
631631
oxlog = { path = "dev-tools/oxlog" }
632632
oxnet = "0.1.4"
633633
once_cell = "1.21.3"
@@ -636,7 +636,7 @@ openapiv3 = "2.2.0"
636636
# must match samael's crate!
637637
openssl = "0.10"
638638
openssl-sys = "0.9"
639-
opte-ioctl = { git = "https://github.com/oxidecomputer/opte", rev = "795a1e0aeefb7a2c6fe4139779fdf66930d09b80" }
639+
opte-ioctl = { git = "https://github.com/oxidecomputer/opte", rev = "4bd8a40c0f5c05de7bb29b5f592f2dc99b4fd1d7" }
640640
oso = "0.27"
641641
owo-colors = "4.2.2"
642642
oximeter = { path = "oximeter/oximeter" }
@@ -698,7 +698,7 @@ rats-corim = { git = "https://github.com/oxidecomputer/rats-corim.git", rev = "f
698698
raw-cpuid = { git = "https://github.com/oxidecomputer/rust-cpuid.git", rev = "a4cf01df76f35430ff5d39dc2fe470bcb953503b" }
699699
rayon = "1.10"
700700
rcgen = "0.12.1"
701-
rdb-types = { git = "https://github.com/oxidecomputer/maghemite", rev = "205b3ccf75b527ac7a565285fdcc0c78f4fcee95" }
701+
rdb-types = { git = "https://github.com/oxidecomputer/maghemite", rev = "396bb3c570be65f4e8c73ea3243f4af6561a823a" }
702702
reconfigurator-cli = { path = "dev-tools/reconfigurator-cli" }
703703
reedline = "0.40.0"
704704
ref-cast = "1.0"
@@ -723,7 +723,7 @@ seq-macro = "0.3.6"
723723
serde = { version = "1.0", default-features = false, features = [ "derive", "rc" ] }
724724
serde_cbor = "0.11.2"
725725
serde_human_bytes = { git = "https://github.com/oxidecomputer/serde_human_bytes", branch = "main" }
726-
serde_json = "1.0.142"
726+
serde_json = "1.0.145"
727727
serde_tokenstream = "0.2"
728728
serde_urlencoded = "0.7.1"
729729
serde_with = { version = "3.14.0", default-features = false, features = ["alloc", "macros"] }

dev-tools/ls-apis/tests/api_dependencies.out

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ Downstairs Controller (debugging only) (client: dsc-client)
4646

4747
Management Gateway Service (client: gateway-client)
4848
consumed by: dpd (dendrite/dpd) via 1 path
49+
consumed by: mgd (maghemite/mgd) via 1 path
4950
consumed by: omicron-nexus (omicron/nexus) via 4 paths
5051
consumed by: omicron-sled-agent (omicron/sled-agent) via 1 path
5152
consumed by: wicketd (omicron/wicketd) via 3 paths

dev-tools/omdb/src/bin/omdb/db.rs

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,8 @@ use std::future::Future;
174174
use std::net::Ipv4Addr;
175175
use std::net::Ipv6Addr;
176176
use std::num::NonZeroU32;
177+
use std::os::unix::process::CommandExt;
178+
use std::process::Command;
177179
use std::str::FromStr;
178180
use std::sync::Arc;
179181
use tabled::Tabled;
@@ -352,6 +354,12 @@ pub struct DbFetchOptions {
352354
/// Subcommands that query or update the database
353355
#[derive(Debug, Subcommand, Clone)]
354356
enum DbCommands {
357+
/// Launch `cockroach-sql`
358+
///
359+
/// This launches with the session variable `default_transcation_read_only`
360+
/// to on. Because this variable can be disabled, it is required to use
361+
/// `--destructive` with this command.
362+
Sql,
355363
/// Print information about blueprints
356364
///
357365
/// Most blueprint information is available via `omdb nexus`, not `omdb db`.
@@ -1156,10 +1164,25 @@ impl DbArgs {
11561164
omdb: &Omdb,
11571165
log: &slog::Logger,
11581166
) -> Result<(), anyhow::Error> {
1167+
if let DbCommands::Sql = &self.command {
1168+
let _token = omdb.check_allow_destructive()?;
1169+
let url = self.db_url_opts.resolve_pg_url(omdb, log).await?;
1170+
let url = format!(
1171+
"postgresql://root@{}/omicron?sslmode=disable",
1172+
url.address()
1173+
);
1174+
let mut command =
1175+
Command::new("/opt/oxide/cockroachdb/bin/cockroach-sql");
1176+
let error = command.args(["--read-only", "--url", &url]).exec();
1177+
return Err(error)
1178+
.with_context(|| format!("failed to exec {command:?}"));
1179+
}
1180+
11591181
let fetch_opts = &self.fetch_opts;
11601182
self.db_url_opts.with_datastore(omdb, log, |opctx, datastore| {
11611183
async move {
11621184
match &self.command {
1185+
DbCommands::Sql => unreachable!(),
11631186
DbCommands::Blueprints(args) => {
11641187
cmd_db_blueprints(&opctx, &datastore, &fetch_opts, &args).await
11651188
}

dev-tools/omdb/tests/usage_errors.out

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ Query the control plane database (CockroachDB)
115115
Usage: omdb db [OPTIONS] <COMMAND>
116116

117117
Commands:
118+
sql Launch `cockroach-sql`
118119
blueprints Print information about blueprints
119120
db-metadata Commands for database metadata
120121
crucible-dataset Commands relevant to Crucible datasets
@@ -180,6 +181,7 @@ Query the control plane database (CockroachDB)
180181
Usage: omdb db [OPTIONS] <COMMAND>
181182

182183
Commands:
184+
sql Launch `cockroach-sql`
183185
blueprints Print information about blueprints
184186
db-metadata Commands for database metadata
185187
crucible-dataset Commands relevant to Crucible datasets

nexus-config/src/postgres_config.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ pub struct PostgresConfigWithUrl {
3030
}
3131

3232
impl PostgresConfigWithUrl {
33-
pub fn url(&self) -> String {
34-
self.url_raw.clone()
33+
pub fn url(&self) -> &str {
34+
&self.url_raw
3535
}
3636

3737
/// Accesses the first ip / port pair within the URL.

0 commit comments

Comments
 (0)