Skip to content

Commit 261b9cc

Browse files
authored
Stop deleting chelsio addresses during uninstall (#2953)
## Before this PR Running on rack2 and calling `omicron-package uninstall` would involve a fatal termination of the connection, as it would delete the `cxgbe0/ll` and `cxgbe1/ll` IP addresses necessary for contacting the sled. ## After this PR Those addresses are left alone. This is pretty useful for development, as it allows us to run `uninstall` to cleanly wipe a Gimlet, preparing it for future "clean installs".
1 parent 9f31e37 commit 261b9cc

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

sled-hardware/src/cleanup.rs

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
77
use anyhow::Error;
88
use futures::stream::{self, StreamExt, TryStreamExt};
9+
use illumos_utils::dladm::Dladm;
910
use illumos_utils::dladm::BOOTSTRAP_ETHERSTUB_NAME;
1011
use illumos_utils::dladm::BOOTSTRAP_ETHERSTUB_VNIC_NAME;
1112
use illumos_utils::dladm::UNDERLAY_ETHERSTUB_NAME;
1213
use illumos_utils::dladm::UNDERLAY_ETHERSTUB_VNIC_NAME;
13-
use illumos_utils::dladm::{Dladm, VnicSource};
1414
use illumos_utils::link::LinkKind;
1515
use illumos_utils::opte;
1616
use illumos_utils::zone::IPADM;
@@ -30,14 +30,6 @@ pub fn delete_bootstrap_addresses(log: &Logger) -> Result<(), Error> {
3030
delete_addresses_matching_prefixes(log, &[bootstrap_prefix])
3131
}
3232

33-
fn delete_chelsio_addresses(log: &Logger) -> Result<(), Error> {
34-
let prefixes = crate::underlay::find_chelsio_links()?
35-
.into_iter()
36-
.map(|link| format!("{}/", link.name()))
37-
.collect::<Vec<_>>();
38-
delete_addresses_matching_prefixes(log, &prefixes)
39-
}
40-
4133
fn delete_addresses_matching_prefixes(
4234
log: &Logger,
4335
prefixes: &[String],
@@ -112,7 +104,6 @@ pub async fn delete_omicron_vnics(log: &Logger) -> Result<(), Error> {
112104
pub async fn cleanup_networking_resources(log: &Logger) -> Result<(), Error> {
113105
delete_underlay_addresses(log)?;
114106
delete_bootstrap_addresses(log)?;
115-
delete_chelsio_addresses(log)?;
116107
delete_omicron_vnics(log).await?;
117108
delete_etherstub(log)?;
118109
opte::delete_all_xde_devices(log)?;

0 commit comments

Comments
 (0)