Skip to content

Conversation

@karencfv
Copy link
Contributor

This patch adds the sled agent address to the initial output when starting up a simulated omicron. I've done this in a similar manner as to how the DB address is displayed.

$ cargo xtask omicron-dev run-all
<...>
omicron-dev: setting up all services ... 
log file: /tmp/omicron-dev-omicron-dev.18697.0.log
note: configured to log to "/tmp/omicron-dev-omicron-dev.18697.0.log"
DB URL: postgresql://root@[::1]:64671/omicron?sslmode=disable
DB address: [::1]:64671
log file: /tmp/omicron-dev-omicron-dev.18697.2.log
note: configured to log to "/tmp/omicron-dev-omicron-dev.18697.2.log"
Sled agent address: [::1]:35925
omicron-dev: Adding disks to first sled agent
omicron-dev: services are running.
omicron-dev: nexus external API:     127.0.0.1:12220
omicron-dev: nexus internal API:     [::1]:12221
omicron-dev: nexus lockstep API:     [::1]:12232
omicron-dev: cockroachdb pid:        18706
omicron-dev: cockroachdb URL:        postgresql://root@[::1]:64671/omicron?sslmode=disable
omicron-dev: cockroachdb directory:  /tmp/.tmpdd1mDX
omicron-dev: clickhouse native addr: [::1]:53824
omicron-dev: clickhouse http addr:   [::1]:63310
omicron-dev: internal DNS HTTP:      http://[::1]:55005
omicron-dev: internal DNS:           [::1]:49384
omicron-dev: external DNS name:      oxide-dev.test
omicron-dev: external DNS HTTP:      http://[::1]:61727
omicron-dev: external DNS:           [::1]:48201
omicron-dev:   e.g. `dig @::1 -p 48201 test-suite-silo.sys.oxide-dev.test`
omicron-dev: management gateway:     http://[::1]:38919 (switch0)
omicron-dev: silo name:              test-suite-silo
omicron-dev: privileged user name:   test-privileged
omicron-dev: privileged password:    oxide

I've constantly found myself having to check omdb to get the sled agent address. It was a little annoying. I think sled agent is important enough to warrant showing it's address when the simulated omicron is started.

@karencfv karencfv requested a review from davepacheco December 18, 2025 03:50
@davepacheco
Copy link
Collaborator

Great idea to include this information! I feel like it's a little hard to miss where it is, though. There's a whole block of stuff like this that's printed by omicron-dev afterwards. That's in dev-tools/omicron-dev/src/main.rs, towards the bottom. I think it'd make sense to move it there. What do you think?

I don't know why the database information is printed the way it is. That seems worse (to me) than what we do for all the others.

@karencfv
Copy link
Contributor Author

karencfv commented Dec 18, 2025

That's in dev-tools/omicron-dev/src/main.rs, towards the bottom. I think it'd make sense to move it there. What do you think?

That's the first thing I tried 😅, but I couldn't bubble up the data without heavily modifying the code (would be the same for the DB information). In the interest of time, I decided to go on about this way. Not sure if it's worth it to restructure all of this so we can bubble up the data? 🤔

@davepacheco
Copy link
Collaborator

omicron-dev already prints out the same information about the database:

omicron-dev: cockroachdb URL:        postgresql://root@[::1]:64671/omicron?sslmode=disable

I feel like you should be able to get this in omicron-dev with something like this:

diff --git a/dev-tools/omicron-dev/src/main.rs b/dev-tools/omicron-dev/src/main.rs
index 7ba618758..5f6ef6f77 100644
--- a/dev-tools/omicron-dev/src/main.rs
+++ b/dev-tools/omicron-dev/src/main.rs
@@ -120,6 +120,10 @@ impl RunAllArgs {
             "omicron-dev: nexus lockstep API:     {:?}",
             cptestctx.server.get_http_server_lockstep_address(),
         );
+        println!(
+            "omicron-dev: sled agent API:         http://{:?}",
+            cptestctx.sled_agents[0].local_addr(),
+        );
         println!(
             "omicron-dev: cockroachdb pid:        {}",
             cptestctx.database.pid(),

(haven't tested this yet but I feel like the information is hanging off the cptestctx and that might be it)

@davepacheco
Copy link
Collaborator

With that change I get:

omicron-dev: setting up all services ... 
log file: /dangerzone/omicron_tmp/omicron-dev-omicron-dev.10195.0.log
note: configured to log to "/dangerzone/omicron_tmp/omicron-dev-omicron-dev.10195.0.log"
DB URL: postgresql://root@[::1]:53102/omicron?sslmode=disable
DB address: [::1]:53102
log file: /dangerzone/omicron_tmp/omicron-dev-omicron-dev.10195.2.log
note: configured to log to "/dangerzone/omicron_tmp/omicron-dev-omicron-dev.10195.2.log"
Sled agent address: [::1]:35410
omicron-dev: Adding disks to first sled agent
omicron-dev: services are running.
omicron-dev: nexus external API:     127.0.0.1:12220
omicron-dev: nexus internal API:     [::1]:12221
omicron-dev: nexus lockstep API:     [::1]:12232
omicron-dev: sled agent API:         http://[::1]:35410
omicron-dev: cockroachdb pid:        10215
omicron-dev: cockroachdb URL:        postgresql://root@[::1]:53102/omicron?sslmode=disable
omicron-dev: cockroachdb directory:  /dangerzone/omicron_tmp/.tmpgCxHzW
omicron-dev: clickhouse native addr: [::1]:48208
omicron-dev: clickhouse http addr:   [::1]:34629
omicron-dev: internal DNS HTTP:      http://[::1]:35953
omicron-dev: internal DNS:           [::1]:56549
omicron-dev: external DNS name:      oxide-dev.test
omicron-dev: external DNS HTTP:      http://[::1]:53091
omicron-dev: external DNS:           [::1]:46792
omicron-dev:   e.g. `dig @::1 -p 46792 test-suite-silo.sys.oxide-dev.test`
omicron-dev: management gateway:     http://[::1]:56390 (switch0)
omicron-dev: silo name:              test-suite-silo
omicron-dev: privileged user name:   test-privileged
omicron-dev: privileged password:    oxide

@karencfv
Copy link
Contributor Author

omg, I don't know how I didn't see that 🤦‍♀️ thanks for the help!

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.

2 participants