Skip to content

Omicron dev for simulating multiple racks (Just a Bunch of Racks / JBOR) - #9533

Open
internet-diglett wants to merge 104 commits into
mainfrom
omicron-dev-for-multi-rack
Open

internet-diglett wants to merge 104 commits into
mainfrom
omicron-dev-for-multi-rack

Conversation

@internet-diglett

@internet-diglett internet-diglett commented Dec 17, 2025 •

Copy link
Copy Markdown
Contributor

With customers managing large deployments of individual racks, it is useful to have a fast way to spin up multiple concurrent control planes with the related networking daemons for configuration validation. This also gives us an opportunity to address some of the issues noted in omicron#8999.

TODO


omicron-dev run-all --count 2

omicron-dev: setting up all services for rack 0...
log file: /tmp/omicron-dev-omicron-dev.22928.0.log
note: configured to log to "/tmp/omicron-dev-omicron-dev.22928.0.log"
DB URL: postgresql://root@[::1]:63179/omicron?sslmode=disable
DB address: [::1]:63179
log file: /tmp/omicron-dev-omicron-dev.22928.2.log
note: configured to log to "/tmp/omicron-dev-omicron-dev.22928.2.log"
log file: /tmp/omicron-dev-omicron-dev.22928.3.log
note: configured to log to "/tmp/omicron-dev-omicron-dev.22928.3.log"
omicron-dev: Adding disks to first sled agent
omicron-dev: services are running.
omicron-dev: nexus external API:     0.0.0.0:50783
omicron-dev: nexus internal API:     [::1]:62137
omicron-dev: nexus lockstep API:     [::1]:59039
omicron-dev: cockroachdb pid:        22932
omicron-dev: cockroachdb URL:        postgresql://root@[::1]:63179/omicron?sslmode=disable
omicron-dev: cockroachdb directory:  /tmp/.tmpNPsteW
omicron-dev: clickhouse native addr: [::1]:61077
omicron-dev: clickhouse http addr:   [::1]:35373
omicron-dev: internal DNS HTTP:      http://[::1]:40747
omicron-dev: internal DNS:           [::1]:61788
omicron-dev: external DNS name:      oxide-dev.test
omicron-dev: external DNS HTTP:      http://[::1]:56781
omicron-dev: external DNS:           [::1]:49265
omicron-dev:   e.g. `dig @::1 -p 49265 test-suite-silo.sys.oxide-dev.test`
omicron-dev: management gateway:     http://[::1]:45150 (switch0)
omicron-dev: management gateway:     http://[::1]:57447 (switch1)
omicron-dev: dendrite:               http://[::1]:55248 (switch0)
omicron-dev: dendrite:               http://[::1]:51576 (switch1)
omicron-dev: maghemite:              http://[::1]:63014 (switch1)
omicron-dev: maghemite:              http://[::1]:58518 (switch0)
omicron-dev: silo name:              test-suite-silo
omicron-dev: privileged user name:   test-privileged
omicron-dev: privileged password:    oxide

omicron-dev: setting up all services for rack 1...
log file: /tmp/omicron-dev-omicron-dev.22928.4.log
note: configured to log to "/tmp/omicron-dev-omicron-dev.22928.4.log"
DB URL: postgresql://root@[::1]:40139/omicron?sslmode=disable
DB address: [::1]:40139
log file: /tmp/omicron-dev-omicron-dev.22928.6.log
note: configured to log to "/tmp/omicron-dev-omicron-dev.22928.6.log"
log file: /tmp/omicron-dev-omicron-dev.22928.7.log
note: configured to log to "/tmp/omicron-dev-omicron-dev.22928.7.log"
omicron-dev: Adding disks to first sled agent
omicron-dev: services are running.
omicron-dev: nexus external API:     0.0.0.0:40270
omicron-dev: nexus internal API:     [::1]:60035
omicron-dev: nexus lockstep API:     [::1]:65510
omicron-dev: cockroachdb pid:        22953
omicron-dev: cockroachdb URL:        postgresql://root@[::1]:40139/omicron?sslmode=disable
omicron-dev: cockroachdb directory:  /tmp/.tmp3TytEo
omicron-dev: clickhouse native addr: [::1]:54822
omicron-dev: clickhouse http addr:   [::1]:43792
omicron-dev: internal DNS HTTP:      http://[::1]:48914
omicron-dev: internal DNS:           [::1]:52955
omicron-dev: external DNS name:      oxide-dev.test
omicron-dev: external DNS HTTP:      http://[::1]:38079
omicron-dev: external DNS:           [::1]:50079
omicron-dev:   e.g. `dig @::1 -p 50079 test-suite-silo.sys.oxide-dev.test`
omicron-dev: management gateway:     http://[::1]:36905 (switch0)
omicron-dev: management gateway:     http://[::1]:53044 (switch1)
omicron-dev: dendrite:               http://[::1]:44065 (switch0)
omicron-dev: dendrite:               http://[::1]:35877 (switch1)
omicron-dev: maghemite:              http://[::1]:55234 (switch0)
omicron-dev: maghemite:              http://[::1]:57158 (switch1)
omicron-dev: silo name:              test-suite-silo
omicron-dev: privileged user name:   test-privileged
omicron-dev: privileged password:    oxide

Related: #8999

@ahl

ahl commented Dec 18, 2025

Copy link
Copy Markdown
Contributor

Is this part of some plan for regional clusters we've figured out?

@internet-diglett internet-diglett changed the title Omicron dev for multi rack Omicron dev for managing multiple racks (Just a Bunch of Racks / JBOR) Dec 18, 2025
@internet-diglett

Copy link
Copy Markdown
Contributor Author

Is this part of some plan for regional clusters we've figured out?

Apologies for the confusion, this is primarily for allowing us to validate deployment configurations for multiple individual racks. I've updated the description accordingly.

@internet-diglett internet-diglett changed the title Omicron dev for managing multiple racks (Just a Bunch of Racks / JBOR) Omicron dev for simulating multiple racks (Just a Bunch of Racks / JBOR) Dec 18, 2025
@rcgoodfellow
rcgoodfellow self-requested a review January 2, 2026 17:33
@internet-diglett
internet-diglett marked this pull request as ready for review January 7, 2026 22:34
internet-diglett added a commit to oxidecomputer/maghemite that referenced this pull request Jan 8, 2026
This change is primarily a part of a larger effort to make the switch zone services location aware by having them communicate with their local MGS. This is also required to allow us to deploy some form of the daemon in our test context in omicron.

---
Related:
* oxidecomputer/omicron#8999
* oxidecomputer/omicron#9533

@rcgoodfellow rcgoodfellow left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks @internet-diglett. Comments follow

Comment thread common/src/address.rs
pub const TFPORTD_PORT: u16 = 12231;
pub const NEXUS_INTERNAL_PORT: u16 = 12221;
pub const NEXUS_LOCKSTEP_PORT: u16 = 12232;
pub const BGP_LISTEN_PORT: u16 = 1049;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is this because 179 requires privilege escalation so something higher than 1024 is used? A comment here would be good.

Comment thread dev-tools/omicron-dev/src/main.rs Outdated
eprintln!(
"omicron-dev: caught signal, shutting down and removing \
temporary directory"
temporary directory"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: extra space?

Comment thread dev-tools/omicron-dev/src/main.rs Outdated

for n in 0..self.peer_routers.0 {
let mgd_bgp_addr =
SocketAddr::new(Ipv4Addr::new(100, 64, 0, n + 1).into(), 1049);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Use BGP_LISTEN_PORT instead of 1049?

Comment thread dev-tools/omicron-dev/src/main.rs Outdated
);

let router = mg_api_types::bgp::config::Router {
asn: 65100 + u32::from(n),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

For those less familiar with BGP ASN numbers putting 65100 in a constant with a description would be helpful.

Comment thread dev-tools/omicron-dev/src/main.rs Outdated
.bind_address
.set_port(0);

config.deployment.dropshot_internal.bind_address.set_port(0);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Setting ports to zero here means auto assignment when these APIs come up?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Correct. Since we are starting up multiple control planes, we need to have different ports for each copy of the service.

Comment thread dev-tools/omicron-dev/src/main.rs Outdated
enum OmicronDevCmd {
/// Run a full simulated control plane
RunAll(RunAllArgs),
/// Run multiple simulated control planes

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Adding a note to the extended clap description that this command requires elevated privileges would be good. pfexec on illumos and probably sudo on linux if this is expected to work on linux.

extra_sled_agents: u16,
gateway_config_file: Utf8PathBuf,
mgd_bgp_loopback: Arc<Mutex<loopback_ip_mgr::LoopbackIpManager>>,
mgd_bgp_addrs: BTreeMap<SwitchSlot, Ipv4Addr>,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think BGP unnumbered on v6 link locals will be a pretty common use case here. Perhaps generalize to a case that can configure v4, regular v6 and link-local v6?

This branch has not been deployed

No deployments
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.

4 participants