Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clear XDE underlay when destroying virtual hardware #5602

Merged
merged 6 commits into from
May 31, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/buildomat/jobs/a4x2-deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#:
#: name = "a4x2-deploy"
#: variety = "basic"
#: target = "lab-2.0-opte-0.27"
#: target = "lab-2.0-opte-0.31"
#: output_rules = [
#: "/out/falcon/*.log",
#: "/out/falcon/*.err",
Expand Down
2 changes: 1 addition & 1 deletion .github/buildomat/jobs/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#:
#: name = "helios / deploy"
#: variety = "basic"
#: target = "lab-2.0-opte-0.28"
#: target = "lab-2.0-opte-0.31"
#: output_rules = [
#: "%/var/svc/log/oxide-sled-agent:default.log*",
#: "%/zone/oxz_*/root/var/svc/log/oxide-*.log*",
Expand Down
28 changes: 8 additions & 20 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -312,8 +312,8 @@ macaddr = { version = "1.0.1", features = ["serde_std"] }
maplit = "1.0.2"
mockall = "0.12"
newtype_derive = "0.1.6"
mg-admin-client = { git = "https://github.com/oxidecomputer/maghemite", rev = "025389ff39d594bf2b815377e2c1dc4dd23b1f96" }
ddm-admin-client = { git = "https://github.com/oxidecomputer/maghemite", rev = "025389ff39d594bf2b815377e2c1dc4dd23b1f96" }
mg-admin-client = { git = "https://github.com/oxidecomputer/maghemite", rev = "a557af774b2c3cfe1e9e4e27de9ad85de6a02a98" }
ddm-admin-client = { git = "https://github.com/oxidecomputer/maghemite", rev = "a557af774b2c3cfe1e9e4e27de9ad85de6a02a98" }
multimap = "0.10.0"
nexus-client = { path = "clients/nexus-client" }
nexus-config = { path = "nexus-config" }
Expand Down Expand Up @@ -347,14 +347,14 @@ omicron-sled-agent = { path = "sled-agent" }
omicron-test-utils = { path = "test-utils" }
omicron-zone-package = "0.11.0"
oxide-client = { path = "clients/oxide-client" }
oxide-vpc = { git = "https://github.com/oxidecomputer/opte", rev = "7ee353a470ea59529ee1b34729681da887aa88ce", features = [ "api", "std" ] }
oxide-vpc = { git = "https://github.com/oxidecomputer/opte", rev = "cf268a6383861f902b0c18afb7cfe35e42987504", features = [ "api", "std" ] }
once_cell = "1.19.0"
openapi-lint = { git = "https://github.com/oxidecomputer/openapi-lint", branch = "main" }
openapiv3 = "2.0.0"
# must match samael's crate!
openssl = "0.10"
openssl-sys = "0.9"
opte-ioctl = { git = "https://github.com/oxidecomputer/opte", rev = "7ee353a470ea59529ee1b34729681da887aa88ce" }
opte-ioctl = { git = "https://github.com/oxidecomputer/opte", rev = "cf268a6383861f902b0c18afb7cfe35e42987504" }
oso = "0.27"
owo-colors = "4.0.0"
oximeter = { path = "oximeter/oximeter" }
Expand Down
12 changes: 11 additions & 1 deletion dev-tools/xtask/src/virtual_hardware.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ const IPADM: &'static str = "/usr/sbin/ipadm";
const MODINFO: &'static str = "/usr/sbin/modinfo";
const MODUNLOAD: &'static str = "/usr/sbin/modunload";
const NETSTAT: &'static str = "/usr/bin/netstat";
const OPTEADM: &'static str = "/opt/oxide/opte/bin/opteadm";
const PFEXEC: &'static str = "/usr/bin/pfexec";
const PING: &'static str = "/usr/sbin/ping";
const SWAP: &'static str = "/usr/sbin/swap";
Expand Down Expand Up @@ -247,8 +248,17 @@ fn unload_xde_driver() -> Result<()> {
println!("xde driver already unloaded");
return Ok(());
};
println!("unloading xde driver");
println!("unloading xde driver:\na) clearing underlay...");
let mut cmd = Command::new(PFEXEC);
cmd.args([OPTEADM, "clear-xde-underlay"]);
if let Err(e) = execute(cmd) {
// This is explicitly non-fatal: the underlay is only set when
// sled-agent is running. We still need to be able to tear
// down the driver if we immediately call create->destroy.
println!("\tFailed or already unset: {e}");
}

println!("b) unloading module...");
let mut cmd = Command::new(PFEXEC);
cmd.arg(MODUNLOAD);
cmd.arg("-i");
Expand Down
16 changes: 8 additions & 8 deletions package-manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -533,10 +533,10 @@ source.repo = "maghemite"
# `tools/maghemite_openapi_version`. Failing to do so will cause a failure when
# building `ddm-admin-client` (which will instruct you to update
# `tools/maghemite_openapi_version`).
source.commit = "025389ff39d594bf2b815377e2c1dc4dd23b1f96"
source.commit = "a557af774b2c3cfe1e9e4e27de9ad85de6a02a98"
# The SHA256 digest is automatically posted to:
# https://buildomat.eng.oxide.computer/public/file/oxidecomputer/maghemite/image/<commit>/maghemite.sha256.txt
source.sha256 = "f2ee54b6a654daa1c1f817440317e9b11c5ddc71249df261bb5cfa0e6057dc24"
# https://buildomat.eng.oxide.computer/public/file/oxidecomputer/maghemite/image/<commit>/mg-ddm-gz.sha256.txt
source.sha256 = "b7a88a985bb29c105fffa184c9826e3243e87d3063987b90b39e51abcd8b8526"
output.type = "tarball"

[package.mg-ddm]
Expand All @@ -549,10 +549,10 @@ source.repo = "maghemite"
# `tools/maghemite_openapi_version`. Failing to do so will cause a failure when
# building `ddm-admin-client` (which will instruct you to update
# `tools/maghemite_openapi_version`).
source.commit = "025389ff39d594bf2b815377e2c1dc4dd23b1f96"
source.commit = "a557af774b2c3cfe1e9e4e27de9ad85de6a02a98"
# The SHA256 digest is automatically posted to:
# https://buildomat.eng.oxide.computer/public/file/oxidecomputer/maghemite/image/<commit>/mg-ddm.sha256.txt
source.sha256 = "bb98815f759f38abee9f5aea0978cd33e66e75079cc8c171036be21bf9049c96"
source.sha256 = "8d0556bcf83360df653f72e885cf28e628601f17137d9475a234b1020c6366ba"
output.type = "zone"
output.intermediate_only = true

Expand All @@ -564,10 +564,10 @@ source.repo = "maghemite"
# `tools/maghemite_openapi_version`. Failing to do so will cause a failure when
# building `ddm-admin-client` (which will instruct you to update
# `tools/maghemite_openapi_version`).
source.commit = "025389ff39d594bf2b815377e2c1dc4dd23b1f96"
source.commit = "a557af774b2c3cfe1e9e4e27de9ad85de6a02a98"
# The SHA256 digest is automatically posted to:
# https://buildomat.eng.oxide.computer/public/file/oxidecomputer/maghemite/image/<commit>/mg-ddm.sha256.txt
source.sha256 = "e0907de39ca9f8ab45d40d361a1dbeed4bd8e9b157f8d3d8fe0a4bc259d933bd"
# https://buildomat.eng.oxide.computer/public/file/oxidecomputer/maghemite/image/<commit>/mgd.sha256.txt
source.sha256 = "91fb4c893240e6f781ab6c3d6f2af8c0e9378fd646d1e45233502e3a4d23cb1a"
output.type = "zone"
output.intermediate_only = true

Expand Down
2 changes: 1 addition & 1 deletion tools/maghemite_ddm_openapi_version
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
COMMIT="025389ff39d594bf2b815377e2c1dc4dd23b1f96"
COMMIT="a557af774b2c3cfe1e9e4e27de9ad85de6a02a98"
SHA2="004e873e4120aa26460271368485266b75b7f964e5ed4dbee8fb5db4519470d7"
4 changes: 2 additions & 2 deletions tools/maghemite_mg_openapi_version
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
COMMIT="025389ff39d594bf2b815377e2c1dc4dd23b1f96"
SHA2="a5d2f275c99152711dec1df58fd49d459d3fcb8fbfc7a7f48f432be248d74639"
COMMIT="a557af774b2c3cfe1e9e4e27de9ad85de6a02a98"
SHA2="fdb33ee7425923560534672264008ef8948d227afce948ab704de092ad72157c"
4 changes: 2 additions & 2 deletions tools/maghemite_mgd_checksums
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
CIDL_SHA256="e0907de39ca9f8ab45d40d361a1dbeed4bd8e9b157f8d3d8fe0a4bc259d933bd"
MGD_LINUX_SHA256="903413ddaab89594ed7518cb8f2f27793e96cd17ed2d6b3fe11657ec4375cb19"
CIDL_SHA256="91fb4c893240e6f781ab6c3d6f2af8c0e9378fd646d1e45233502e3a4d23cb1a"
MGD_LINUX_SHA256="111c111691bb42e5fde4d5a3d2a613ffc7e7e57c536866f4f00fb5afb60c6da4"
2 changes: 1 addition & 1 deletion tools/opte_version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.28.233
0.31.258