Skip to content

Commit 63b51bf

Browse files
committed
Self assembling zones should set their own MTU
Bump crucible rev to pick up: - Self assembling zones must set their own MTU - fix build break caused by merging oxidecomputer#801 - Issue extent flushes in parallel - Add Logger Option to Volume construct method - Update Rust crate libc to 0.2.147 - Update Rust crate percent-encoding to 2.3 - Retry jobs until they succeed - Reorder select arms so pings can't be starved out - Treat a skipped IO like an error IO for ACK results. - Retry pantry requests - Remove panics and asserts in dummy tests - Update Rust crate csv to 1.2.2 - Update Rust crate reedline to 0.21.0 - Set open file resource limit to the max - Update Rust crate ringbuffer to 0.14 - DTrace meet cmon - Widen assert values to u128 to deal with u64::MAX - Change size_to_validate from usize to u64 - Turn on live-repair test in CI - Increase flush_timeout for some tests, collect cores - Update to latest dropshot Bump propolis rev to pick up: - Self assembling zones must set their own MTU - Bump crucible rev to latest - Make the propolis zone self-assembling - Flesh out more PIIX3-PM to suppress log gripes - Bump crucible rev to latest - Restructure PM-timer under PIIX3 device - Fix inventory handling for nested child entities - Centralize vmm-data interface into bhyve_api - Clean up PCI device classes - Update openssl dep to 0.10.55 - Allow propolis-standalone to use VMM reservoir - only allow one request to reboot to be enqueued at a time Nexus is currently setting the MTU inside self-assembling zones, but this goes against the idea that self-assembling zones perform their own configuration. Remove the code in `RunningZone::boot` that performs commands on self-assembling zones, and set the MTU of $DATALINK in the Clickhouse and CockroachDB method scripts. Fixes oxidecomputer#3512
1 parent 0325e96 commit 63b51bf

File tree

5 files changed

+71
-75
lines changed

5 files changed

+71
-75
lines changed

Cargo.toml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -151,10 +151,10 @@ cookie = "0.16"
151151
criterion = { version = "0.5.1", features = [ "async_tokio" ] }
152152
crossbeam = "0.8"
153153
crossterm = { version = "0.26.1", features = ["event-stream"] }
154-
crucible-agent-client = { git = "https://github.com/oxidecomputer/crucible", rev = "df7e274edf0a1df287770e9567b27676f3ae4cc5" }
155-
crucible-client-types = { git = "https://github.com/oxidecomputer/crucible", rev = "df7e274edf0a1df287770e9567b27676f3ae4cc5" }
156-
crucible-pantry-client = { git = "https://github.com/oxidecomputer/crucible", rev = "df7e274edf0a1df287770e9567b27676f3ae4cc5" }
157-
crucible-smf = { git = "https://github.com/oxidecomputer/crucible", rev = "df7e274edf0a1df287770e9567b27676f3ae4cc5" }
154+
crucible-agent-client = { git = "https://github.com/oxidecomputer/crucible", rev = "c574ff1232aa66eb60069795fe45f0c47f5da51d" }
155+
crucible-client-types = { git = "https://github.com/oxidecomputer/crucible", rev = "c574ff1232aa66eb60069795fe45f0c47f5da51d" }
156+
crucible-pantry-client = { git = "https://github.com/oxidecomputer/crucible", rev = "c574ff1232aa66eb60069795fe45f0c47f5da51d" }
157+
crucible-smf = { git = "https://github.com/oxidecomputer/crucible", rev = "c574ff1232aa66eb60069795fe45f0c47f5da51d" }
158158
curve25519-dalek = "3"
159159
datatest-stable = "0.1.3"
160160
display-error-chain = "0.1.1"
@@ -264,9 +264,9 @@ pretty-hex = "0.3.0"
264264
proc-macro2 = "1.0"
265265
progenitor = { git = "https://github.com/oxidecomputer/progenitor", branch = "main" }
266266
progenitor-client = { git = "https://github.com/oxidecomputer/progenitor", branch = "main" }
267-
bhyve_api = { git = "https://github.com/oxidecomputer/propolis", rev = "04a275736e9f3316de6bf2a4077d03acfa4e2cdf" }
268-
propolis-client = { git = "https://github.com/oxidecomputer/propolis", rev = "04a275736e9f3316de6bf2a4077d03acfa4e2cdf", features = [ "generated-migration" ] }
269-
propolis-server = { git = "https://github.com/oxidecomputer/propolis", rev = "04a275736e9f3316de6bf2a4077d03acfa4e2cdf", default-features = false, features = ["mock-only"] }
267+
bhyve_api = { git = "https://github.com/oxidecomputer/propolis", rev = "9e12522341048d7b8c38394f0ddeb18083685c2f" }
268+
propolis-client = { git = "https://github.com/oxidecomputer/propolis", rev = "9e12522341048d7b8c38394f0ddeb18083685c2f", features = [ "generated-migration" ] }
269+
propolis-server = { git = "https://github.com/oxidecomputer/propolis", rev = "9e12522341048d7b8c38394f0ddeb18083685c2f", default-features = false, features = ["mock-only"] }
270270
#propolis-server = { path = "../propolis/bin/propolis-server" }
271271
proptest = "1.2.0"
272272
quote = "1.0"

illumos-utils/src/running_zone.rs

Lines changed: 44 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -372,78 +372,60 @@ impl RunningZone {
372372
}
373373
})?;
374374

375-
// Pull the zone ID.
375+
// If the zone is self-assembling, then SMF service(s) inside the zone
376+
// will be creating the listen address for the zone's service(s),
377+
// setting the appropriate ifprop MTU, and so on. The idea behind
378+
// self-assembling zones is that once they boot there should be *no*
379+
// zlogin required.
380+
381+
// Use the zone ID in order to check if /var/svc/profile/site.xml
382+
// exists.
376383
let id = Zones::id(&zone.name)
377384
.await?
378385
.ok_or_else(|| BootError::NoZoneId { zone: zone.name.clone() })?;
379386
let site_profile_xml_exists =
380387
std::path::Path::new(&zone.site_profile_xml_path()).exists();
381-
let running_zone = RunningZone { id: Some(id), inner: zone };
382388

383-
// Make sure the control vnic has an IP MTU of 9000 inside the zone
384-
const CONTROL_VNIC_MTU: usize = 9000;
385-
let vnic = running_zone.inner.control_vnic.name().to_string();
386-
387-
// If the zone is self-assembling, then SMF service(s) inside the zone
388-
// will be creating the listen address for the zone's service(s). This
389-
// will create IP interfaces, and means that `create-if` here will fail
390-
// due to the interface already existing. Checking the output of
391-
// `show-if` is also problematic due to TOCTOU. Use the check for the
392-
// existence of site.xml, which means the zone is performing this
393-
// self-assembly, and skip create-if if so.
389+
let running_zone = RunningZone { id: Some(id), inner: zone };
394390

395391
if !site_profile_xml_exists {
396-
let args = vec![
397-
IPADM.to_string(),
398-
"create-if".to_string(),
399-
"-t".to_string(),
400-
vnic.clone(),
392+
// If the zone is not self-assembling, make sure the control vnic
393+
// has an IP MTU of 9000 inside the zone.
394+
const CONTROL_VNIC_MTU: usize = 9000;
395+
let vnic = running_zone.inner.control_vnic.name().to_string();
396+
397+
let commands = vec![
398+
vec![
399+
IPADM.to_string(),
400+
"create-if".to_string(),
401+
"-t".to_string(),
402+
vnic.clone(),
403+
],
404+
vec![
405+
IPADM.to_string(),
406+
"set-ifprop".to_string(),
407+
"-t".to_string(),
408+
"-p".to_string(),
409+
format!("mtu={}", CONTROL_VNIC_MTU),
410+
"-m".to_string(),
411+
"ipv4".to_string(),
412+
vnic.clone(),
413+
],
414+
vec![
415+
IPADM.to_string(),
416+
"set-ifprop".to_string(),
417+
"-t".to_string(),
418+
"-p".to_string(),
419+
format!("mtu={}", CONTROL_VNIC_MTU),
420+
"-m".to_string(),
421+
"ipv6".to_string(),
422+
vnic,
423+
],
401424
];
402425

403-
running_zone.run_cmd(args)?;
404-
} else {
405-
// If the zone is self-assembling, then it's possible that the IP
406-
// interface does not exist yet because it has not been brought up
407-
// by the software in the zone. Run `create-if` here, but eat the
408-
// error if there is one: this is safe unless the software that's
409-
// part of self-assembly inside the zone is also trying to run
410-
// `create-if` (instead of `create-addr`), and required for the
411-
// `set-ifprop` commands below to pass.
412-
let args = vec![
413-
IPADM.to_string(),
414-
"create-if".to_string(),
415-
"-t".to_string(),
416-
vnic.clone(),
417-
];
418-
419-
let _result = running_zone.run_cmd(args);
420-
}
421-
422-
let commands = vec![
423-
vec![
424-
IPADM.to_string(),
425-
"set-ifprop".to_string(),
426-
"-t".to_string(),
427-
"-p".to_string(),
428-
format!("mtu={}", CONTROL_VNIC_MTU),
429-
"-m".to_string(),
430-
"ipv4".to_string(),
431-
vnic.clone(),
432-
],
433-
vec![
434-
IPADM.to_string(),
435-
"set-ifprop".to_string(),
436-
"-t".to_string(),
437-
"-p".to_string(),
438-
format!("mtu={}", CONTROL_VNIC_MTU),
439-
"-m".to_string(),
440-
"ipv6".to_string(),
441-
vnic,
442-
],
443-
];
444-
445-
for args in &commands {
446-
running_zone.run_cmd(args)?;
426+
for args in &commands {
427+
running_zone.run_cmd(args)?;
428+
}
447429
}
448430

449431
Ok(running_zone)

package-manifest.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -241,21 +241,21 @@ only_for_targets.image = "standard"
241241
# 3. Use source.type = "manual" instead of "prebuilt"
242242
source.type = "prebuilt"
243243
source.repo = "crucible"
244-
source.commit = "df7e274edf0a1df287770e9567b27676f3ae4cc5"
244+
source.commit = "c574ff1232aa66eb60069795fe45f0c47f5da51d"
245245
# The SHA256 digest is automatically posted to:
246246
# https://buildomat.eng.oxide.computer/public/file/oxidecomputer/crucible/image/<commit>/crucible.sha256.txt
247-
source.sha256 = "c1a7996dfdded9476d5a595f16fcd07e902bb02f2ec0858bb3625f9b2195a919"
247+
source.sha256 = "72363fbbfde15689bdbafee53e415ca994903644a9fdbb33ca0bc72d65927f0f"
248248
output.type = "zone"
249249

250250
[package.crucible-pantry]
251251
service_name = "crucible_pantry"
252252
only_for_targets.image = "standard"
253253
source.type = "prebuilt"
254254
source.repo = "crucible"
255-
source.commit = "df7e274edf0a1df287770e9567b27676f3ae4cc5"
255+
source.commit = "c574ff1232aa66eb60069795fe45f0c47f5da51d"
256256
# The SHA256 digest is automatically posted to:
257257
# https://buildomat.eng.oxide.computer/public/file/oxidecomputer/crucible/image/<commit>/crucible-pantry.sha256.txt
258-
source.sha256 = "23611f3770a797b829c340e6dba25a4898678ece79db8534e06f76e438214e4c"
258+
source.sha256 = "4645454e3af72ee68bc3916042f78deaac44a8c07bb6c1a1e5766b83f5326e07"
259259
output.type = "zone"
260260

261261
# Refer to
@@ -266,10 +266,10 @@ service_name = "propolis-server"
266266
only_for_targets.image = "standard"
267267
source.type = "prebuilt"
268268
source.repo = "propolis"
269-
source.commit = "21ac8a9f5005f96caa384e3de0bd38283fc0188f"
269+
source.commit = "9e12522341048d7b8c38394f0ddeb18083685c2f"
270270
# The SHA256 digest is automatically posted to:
271271
# https://buildomat.eng.oxide.computer/public/file/oxidecomputer/propolis/image/<commit>/propolis-server.sha256.txt
272-
source.sha256 = "2a7b4bfa6d2b13714f68ec0095419218257ab584e763faac1d34baf38c8b09de"
272+
source.sha256 = "084df2cf5866a17b5467dccdaddef5088cc021a1ee0eb3bea99472bcf67ea7fa"
273273
output.type = "zone"
274274

275275
[package.maghemite]

smf/clickhouse/method_script.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,13 @@ if [[ $DATALINK == unknown ]] || [[ $GATEWAY == unknown ]]; then
1717
exit "$SMF_EXIT_ERR_CONFIG"
1818
fi
1919

20+
# TODO remove when https://github.com/oxidecomputer/stlouis/issues/435 is addressed
21+
ipadm delete-if "$DATALINK" || true
22+
ipadm create-if -t "$DATALINK"
23+
24+
ipadm set-ifprop -t -p mtu=9000 -m ipv4 "$DATALINK"
25+
ipadm set-ifprop -t -p mtu=9000 -m ipv6 "$DATALINK"
26+
2027
ipadm show-addr "$DATALINK/ll" || ipadm create-addr -t -T addrconf "$DATALINK/ll"
2128
ipadm show-addr "$DATALINK/omicron6" || ipadm create-addr -t -T static -a "$LISTEN_ADDR" "$DATALINK/omicron6"
2229
route get -inet6 default -inet6 "$GATEWAY" || route add -inet6 default -inet6 "$GATEWAY"

smf/cockroachdb/method_script.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,13 @@ if [[ $DATALINK == unknown ]] || [[ $GATEWAY == unknown ]]; then
1717
exit "$SMF_EXIT_ERR_CONFIG"
1818
fi
1919

20+
# TODO remove when https://github.com/oxidecomputer/stlouis/issues/435 is addressed
21+
ipadm delete-if "$DATALINK" || true
22+
ipadm create-if -t "$DATALINK"
23+
24+
ipadm set-ifprop -t -p mtu=9000 -m ipv4 "$DATALINK"
25+
ipadm set-ifprop -t -p mtu=9000 -m ipv6 "$DATALINK"
26+
2027
ipadm show-addr "$DATALINK/ll" || ipadm create-addr -t -T addrconf "$DATALINK/ll"
2128
ipadm show-addr "$DATALINK/omicron6" || ipadm create-addr -t -T static -a "$LISTEN_ADDR" "$DATALINK/omicron6"
2229
route get -inet6 default -inet6 "$GATEWAY" || route add -inet6 default -inet6 "$GATEWAY"

0 commit comments

Comments
 (0)