Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 0 additions & 26 deletions sled-agent/config-reconciler/src/reconciler_task/zones.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ use nexus_sled_agent_shared::inventory::OmicronZoneType;
use ntp_admin_client::types::TimeSync;
use omicron_common::address::Ipv6Subnet;
use omicron_uuid_kinds::OmicronZoneUuid;
use sled_agent_types::zone_bundle::ZoneBundleCause;
use sled_agent_types::zone_images::MupdateOverrideReadError;
use sled_agent_types::zone_images::OmicronZoneImageLocation;
use sled_agent_types::zone_images::PreparedOmicronZone;
Expand Down Expand Up @@ -607,23 +606,6 @@ impl OmicronZone {
match &self.state {
ZoneState::Running { running_zone, location: _ } => {
info!(log, "shutting down running zone");

// We only try once to create a zone bundle; if this fails we
// move on to the rest of the shutdown process.
if let Err(err) = sled_agent_facilities
.zone_bundle_create(
running_zone,
ZoneBundleCause::UnexpectedZone,
)
.await
{
warn!(
log,
"Failed to take bundle of zone we're shutting down";
InlineErrorChain::new(err.as_ref()),
);
}

self.resume_shutdown_from_untrack_metrics(
sled_agent_facilities,
zone_facilities,
Expand Down Expand Up @@ -1592,14 +1574,6 @@ mod tests {
) {
self.inner.lock().unwrap().removed_ddm_prefixes.insert(prefix);
}

async fn zone_bundle_create(
&self,
_zone: &RunningZone,
_cause: ZoneBundleCause,
) -> anyhow::Result<()> {
Ok(())
}
}

// All our tests operate on fake in-memory disks, so the mount config
Expand Down
8 changes: 0 additions & 8 deletions sled-agent/config-reconciler/src/sled_agent_facilities.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ use illumos_utils::zpool::PathInPool;
use omicron_common::address::Ipv6Subnet;
use omicron_common::address::SLED_PREFIX;
use omicron_uuid_kinds::MupdateOverrideUuid;
use sled_agent_types::zone_bundle::ZoneBundleCause;
use sled_agent_types::zone_images::PreparedOmicronZone;
use sled_agent_types::zone_images::RemoveMupdateOverrideResult;
use sled_agent_types::zone_images::ResolverStatus;
Expand Down Expand Up @@ -61,13 +60,6 @@ pub trait SledAgentFacilities: Send + Sync + 'static {

/// Instruct DDM to stop advertising a prefix.
fn ddm_remove_internal_dns_prefix(&self, prefix: Ipv6Subnet<SLED_PREFIX>);

/// Create a zone bundle.
fn zone_bundle_create(
&self,
zone: &RunningZone,
cause: ZoneBundleCause,
) -> impl Future<Output = anyhow::Result<()>> + Send;
}

pub trait SledAgentArtifactStore: Send + Sync + 'static {
Expand Down
15 changes: 2 additions & 13 deletions sled-agent/src/sled_agent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ use crate::services::{self, ServiceManager, UnderlayInfo};
use crate::support_bundle::logs::SupportBundleLogs;
use crate::support_bundle::storage::SupportBundleManager;
use crate::vmm_reservoir::{ReservoirMode, VmmReservoirManager};
use crate::zone_bundle;
use crate::zone_bundle::BundleError;
use crate::zone_bundle::{self, ZoneBundler};
use anyhow::anyhow;
use bootstore::schemes::v0 as bootstore;
use camino::Utf8PathBuf;
Expand Down Expand Up @@ -67,7 +67,7 @@ use sled_agent_types::instance::{
use sled_agent_types::sled::{BaseboardId, StartSledAgentRequest};
use sled_agent_types::zone_bundle::{
BundleUtilization, CleanupContext, CleanupCount, CleanupPeriod,
PriorityOrder, StorageLimit, ZoneBundleCause, ZoneBundleMetadata,
PriorityOrder, StorageLimit, ZoneBundleMetadata,
};
use sled_agent_types::zone_images::{
PreparedOmicronZone, RemoveMupdateOverrideResult, ResolverStatus,
Expand Down Expand Up @@ -611,7 +611,6 @@ impl SledAgent {
etherstub_vnic,
service_manager: services.clone(),
metrics_queue: metrics_manager.request_queue(),
zone_bundler: long_running_task_handles.zone_bundler.clone(),
},
SledAgentArtifactStoreWrapper(Arc::clone(&artifact_store)),
config_reconciler_spawn_token,
Expand Down Expand Up @@ -1294,7 +1293,6 @@ struct ReconcilerFacilities {
etherstub_vnic: EtherstubVnic,
service_manager: ServiceManager,
metrics_queue: MetricsRequestQueue,
zone_bundler: ZoneBundler,
}

impl SledAgentFacilities for ReconcilerFacilities {
Expand Down Expand Up @@ -1355,15 +1353,6 @@ impl SledAgentFacilities for ReconcilerFacilities {
.ddm_reconciler()
.remove_internal_dns_subnet(prefix);
}

async fn zone_bundle_create(
&self,
zone: &RunningZone,
cause: ZoneBundleCause,
) -> anyhow::Result<()> {
self.zone_bundler.create(zone, cause).await?;
Ok(())
}
}

// Workaround wrapper for orphan rules.
Expand Down
Loading