Skip to content

Commit 178c3c1

Browse files
authored
Do not create bundles of Omicron zones automatically (#9165)
- Remove automatic zone bundle creation for Omicron zones when the sled-agent config reconciler shuts down a zone. - Fixes #9164 in the simplest possible way. Does not actually remove the zone-bundle functionality entirely or automatic creation for Propolis zones. Bundles can still be made on-demand.
1 parent 5f7ab65 commit 178c3c1

File tree

3 files changed

+2
-47
lines changed

3 files changed

+2
-47
lines changed

sled-agent/config-reconciler/src/reconciler_task/zones.rs

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ use nexus_sled_agent_shared::inventory::OmicronZoneType;
2828
use ntp_admin_client::types::TimeSync;
2929
use omicron_common::address::Ipv6Subnet;
3030
use omicron_uuid_kinds::OmicronZoneUuid;
31-
use sled_agent_types::zone_bundle::ZoneBundleCause;
3231
use sled_agent_types::zone_images::MupdateOverrideReadError;
3332
use sled_agent_types::zone_images::OmicronZoneImageLocation;
3433
use sled_agent_types::zone_images::PreparedOmicronZone;
@@ -607,23 +606,6 @@ impl OmicronZone {
607606
match &self.state {
608607
ZoneState::Running { running_zone, location: _ } => {
609608
info!(log, "shutting down running zone");
610-
611-
// We only try once to create a zone bundle; if this fails we
612-
// move on to the rest of the shutdown process.
613-
if let Err(err) = sled_agent_facilities
614-
.zone_bundle_create(
615-
running_zone,
616-
ZoneBundleCause::UnexpectedZone,
617-
)
618-
.await
619-
{
620-
warn!(
621-
log,
622-
"Failed to take bundle of zone we're shutting down";
623-
InlineErrorChain::new(err.as_ref()),
624-
);
625-
}
626-
627609
self.resume_shutdown_from_untrack_metrics(
628610
sled_agent_facilities,
629611
zone_facilities,
@@ -1592,14 +1574,6 @@ mod tests {
15921574
) {
15931575
self.inner.lock().unwrap().removed_ddm_prefixes.insert(prefix);
15941576
}
1595-
1596-
async fn zone_bundle_create(
1597-
&self,
1598-
_zone: &RunningZone,
1599-
_cause: ZoneBundleCause,
1600-
) -> anyhow::Result<()> {
1601-
Ok(())
1602-
}
16031577
}
16041578

16051579
// All our tests operate on fake in-memory disks, so the mount config

sled-agent/config-reconciler/src/sled_agent_facilities.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ use illumos_utils::zpool::PathInPool;
1111
use omicron_common::address::Ipv6Subnet;
1212
use omicron_common::address::SLED_PREFIX;
1313
use omicron_uuid_kinds::MupdateOverrideUuid;
14-
use sled_agent_types::zone_bundle::ZoneBundleCause;
1514
use sled_agent_types::zone_images::PreparedOmicronZone;
1615
use sled_agent_types::zone_images::RemoveMupdateOverrideResult;
1716
use sled_agent_types::zone_images::ResolverStatus;
@@ -61,13 +60,6 @@ pub trait SledAgentFacilities: Send + Sync + 'static {
6160

6261
/// Instruct DDM to stop advertising a prefix.
6362
fn ddm_remove_internal_dns_prefix(&self, prefix: Ipv6Subnet<SLED_PREFIX>);
64-
65-
/// Create a zone bundle.
66-
fn zone_bundle_create(
67-
&self,
68-
zone: &RunningZone,
69-
cause: ZoneBundleCause,
70-
) -> impl Future<Output = anyhow::Result<()>> + Send;
7163
}
7264

7365
pub trait SledAgentArtifactStore: Send + Sync + 'static {

sled-agent/src/sled_agent.rs

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ use crate::services::{self, ServiceManager, UnderlayInfo};
2020
use crate::support_bundle::logs::SupportBundleLogs;
2121
use crate::support_bundle::storage::SupportBundleManager;
2222
use crate::vmm_reservoir::{ReservoirMode, VmmReservoirManager};
23+
use crate::zone_bundle;
2324
use crate::zone_bundle::BundleError;
24-
use crate::zone_bundle::{self, ZoneBundler};
2525
use anyhow::anyhow;
2626
use bootstore::schemes::v0 as bootstore;
2727
use camino::Utf8PathBuf;
@@ -67,7 +67,7 @@ use sled_agent_types::instance::{
6767
use sled_agent_types::sled::{BaseboardId, StartSledAgentRequest};
6868
use sled_agent_types::zone_bundle::{
6969
BundleUtilization, CleanupContext, CleanupCount, CleanupPeriod,
70-
PriorityOrder, StorageLimit, ZoneBundleCause, ZoneBundleMetadata,
70+
PriorityOrder, StorageLimit, ZoneBundleMetadata,
7171
};
7272
use sled_agent_types::zone_images::{
7373
PreparedOmicronZone, RemoveMupdateOverrideResult, ResolverStatus,
@@ -611,7 +611,6 @@ impl SledAgent {
611611
etherstub_vnic,
612612
service_manager: services.clone(),
613613
metrics_queue: metrics_manager.request_queue(),
614-
zone_bundler: long_running_task_handles.zone_bundler.clone(),
615614
},
616615
SledAgentArtifactStoreWrapper(Arc::clone(&artifact_store)),
617616
config_reconciler_spawn_token,
@@ -1294,7 +1293,6 @@ struct ReconcilerFacilities {
12941293
etherstub_vnic: EtherstubVnic,
12951294
service_manager: ServiceManager,
12961295
metrics_queue: MetricsRequestQueue,
1297-
zone_bundler: ZoneBundler,
12981296
}
12991297

13001298
impl SledAgentFacilities for ReconcilerFacilities {
@@ -1355,15 +1353,6 @@ impl SledAgentFacilities for ReconcilerFacilities {
13551353
.ddm_reconciler()
13561354
.remove_internal_dns_subnet(prefix);
13571355
}
1358-
1359-
async fn zone_bundle_create(
1360-
&self,
1361-
zone: &RunningZone,
1362-
cause: ZoneBundleCause,
1363-
) -> anyhow::Result<()> {
1364-
self.zone_bundler.create(zone, cause).await?;
1365-
Ok(())
1366-
}
13671356
}
13681357

13691358
// Workaround wrapper for orphan rules.

0 commit comments

Comments
 (0)