diff --git a/openapi/sled-agent.json b/openapi/sled-agent.json index 5d3fe21f20a..cfaf49594e7 100644 --- a/openapi/sled-agent.json +++ b/openapi/sled-agent.json @@ -238,13 +238,13 @@ ] }, "DatasetEnsureBody": { - "description": "Used to request a new partition kind exists within a zpool.\n\nMany partition types are associated with services that will be instantiated when the partition is detected.", + "description": "Used to request a new dataset kind exists within a zpool.\n\nMany dataset types are associated with services that will be instantiated when the dataset is detected.", "type": "object", "properties": { "address": { "type": "string" }, - "partition_kind": { + "dataset_kind": { "$ref": "#/components/schemas/DatasetKind" }, "zpool_uuid": { @@ -254,7 +254,7 @@ }, "required": [ "address", - "partition_kind", + "dataset_kind", "zpool_uuid" ] }, @@ -941,7 +941,7 @@ ] }, "ServiceEnsureBody": { - "description": "Used to request that the Sled initialize certain services on initialization.\n\nThis may be used to record that certain sleds are responsible for launching services which may not be associated with a partition, such as Nexus.", + "description": "Used to request that the Sled initialize certain services on initialization.\n\nThis may be used to record that certain sleds are responsible for launching services which may not be associated with a dataset, such as Nexus.", "type": "object", "properties": { "services": { diff --git a/sled-agent/src/http_entrypoints.rs b/sled-agent/src/http_entrypoints.rs index 11f6d9d2eb3..c097a85fcec 100644 --- a/sled-agent/src/http_entrypoints.rs +++ b/sled-agent/src/http_entrypoints.rs @@ -68,7 +68,7 @@ async fn filesystem_put( let body_args = body.into_inner(); sa.filesystem_ensure( body_args.zpool_uuid, - body_args.partition_kind, + body_args.dataset_kind, body_args.address, ) .await diff --git a/sled-agent/src/params.rs b/sled-agent/src/params.rs index 23c8f739a17..0ff062f00a8 100644 --- a/sled-agent/src/params.rs +++ b/sled-agent/src/params.rs @@ -193,21 +193,21 @@ impl std::fmt::Display for DatasetKind { } } -/// Used to request a new partition kind exists within a zpool. +/// Used to request a new dataset kind exists within a zpool. /// -/// Many partition types are associated with services that will be -/// instantiated when the partition is detected. +/// Many dataset types are associated with services that will be +/// instantiated when the dataset is detected. #[derive(Clone, Debug, Deserialize, Serialize, JsonSchema, PartialEq)] pub struct DatasetEnsureBody { // The name (and UUID) of the Zpool which we are inserting into. pub zpool_uuid: Uuid, // The type of the filesystem. - pub partition_kind: DatasetKind, + pub dataset_kind: DatasetKind, // The address on which the zone will listen for requests. pub address: SocketAddr, // NOTE: We could insert a UUID here, if we want that to be set by the // caller explicitly? Currently, the lack of a UUID implies that - // "at most one partition type" exists within a zpool. + // "at most one dataset type" exists within a zpool. // // It's unclear if this is actually necessary - making this change // would also require the RSS to query existing datasets before @@ -219,7 +219,7 @@ impl From for sled_agent_client::types::DatasetEnsureBody { fn from(p: DatasetEnsureBody) -> Self { Self { zpool_uuid: p.zpool_uuid, - partition_kind: p.partition_kind.into(), + dataset_kind: p.dataset_kind.into(), address: p.address.to_string(), } } @@ -247,7 +247,7 @@ impl From for sled_agent_client::types::ServiceRequest { /// Used to request that the Sled initialize certain services on initialization. /// /// This may be used to record that certain sleds are responsible for -/// launching services which may not be associated with a partition, such +/// launching services which may not be associated with a dataset, such /// as Nexus. #[derive(Clone, Debug, Deserialize, Serialize, JsonSchema, PartialEq)] pub struct ServiceEnsureBody { diff --git a/sled-agent/src/rack_setup/config.rs b/sled-agent/src/rack_setup/config.rs index 4d284cfed7b..3174777a00e 100644 --- a/sled-agent/src/rack_setup/config.rs +++ b/sled-agent/src/rack_setup/config.rs @@ -33,9 +33,9 @@ pub struct SledRequest { /// The Sled Agent address receiving these requests. pub sled_address: SocketAddr, - /// Partitions to be created. - #[serde(default, rename = "partition")] - pub partitions: Vec, + /// Datasets to be created. + #[serde(default, rename = "dataset")] + pub datasets: Vec, /// Services to be instantiated. #[serde(default, rename = "service")] diff --git a/sled-agent/src/rack_setup/service.rs b/sled-agent/src/rack_setup/service.rs index 470725b961d..90b194cafe6 100644 --- a/sled-agent/src/rack_setup/service.rs +++ b/sled-agent/src/rack_setup/service.rs @@ -105,16 +105,16 @@ impl ServiceInner { // TODO(https://github.com/oxidecomputer/omicron/issues/724): // We could potentially handle this case by deleting all - // partitions (in preparation for applying the new + // datasets (in preparation for applying the new // configuration), but at the moment it's an error. warn!( self.log, "Rack Setup Service Config was already applied, but has changed. - This means that you may have partitions set up on this sled, but they + This means that you may have datasets set up on this sled, but they may not match the ones requested by the supplied configuration.\n To re-initialize this sled: - Disable all Oxide services - - Delete all partitions within the attached zpool + - Delete all datasets within the attached zpool - Delete the configuration file ({}) - Restart the sled agent", rss_config_path.to_string_lossy() @@ -143,11 +143,11 @@ impl ServiceInner { self.log.new(o!("SledAgentClient" => request.sled_address)), ); - info!(self.log, "sending partition requests..."); - for partition in &request.partitions { + info!(self.log, "sending dataset requests..."); + for dataset in &request.datasets { let filesystem_put = || async { - info!(self.log, "creating new filesystem: {:?}", partition); - client.filesystem_put(&partition.clone().into()) + info!(self.log, "creating new filesystem: {:?}", dataset); + client.filesystem_put(&dataset.clone().into()) .await .map_err(BackoffError::transient)?; Ok::< @@ -172,7 +172,7 @@ impl ServiceInner { // Issue service initialization requests. // - // Note that this must happen *after* the partition initialization, + // Note that this must happen *after* the dataset initialization, // to ensure that CockroachDB has been initialized before Nexus // starts. futures::future::join_all( diff --git a/sled-agent/src/sled_agent.rs b/sled-agent/src/sled_agent.rs index c93074a844e..2ed62264ca6 100644 --- a/sled-agent/src/sled_agent.rs +++ b/sled-agent/src/sled_agent.rs @@ -68,7 +68,7 @@ impl From for omicron_common::api::external::Error { /// /// Contains both a connection to the Nexus, as well as managed instances. pub struct SledAgent { - // Component of Sled Agent responsible for storage and partition management. + // Component of Sled Agent responsible for storage and dataset management. storage: StorageManager, // Component of Sled Agent responsible for managing Propolis instances. @@ -182,11 +182,11 @@ impl SledAgent { pub async fn filesystem_ensure( &self, zpool_uuid: Uuid, - partition_kind: DatasetKind, + dataset_kind: DatasetKind, address: SocketAddr, ) -> Result<(), Error> { self.storage - .upsert_filesystem(zpool_uuid, partition_kind, address) + .upsert_filesystem(zpool_uuid, dataset_kind, address) .await?; Ok(()) } diff --git a/sled-agent/src/storage_manager.rs b/sled-agent/src/storage_manager.rs index 0b1cfc83ce7..97d3033c13f 100644 --- a/sled-agent/src/storage_manager.rs +++ b/sled-agent/src/storage_manager.rs @@ -513,7 +513,7 @@ impl StorageWorker { // If requested via the `do_format` parameter, may also initialize // these resources. // - // Returns the UUID attached to the underlying ZFS partition. + // Returns the UUID attached to the underlying ZFS dataset. // Returns (was_inserted, Uuid). async fn initialize_dataset_and_zone( &self, diff --git a/smf/sled-agent/config-rss.toml b/smf/sled-agent/config-rss.toml index c9fd9ff43dc..a2f2116940f 100644 --- a/smf/sled-agent/config-rss.toml +++ b/smf/sled-agent/config-rss.toml @@ -3,38 +3,44 @@ [[request]] sled_address = "[fd00:1de::]:12345" -[[request.partition]] +# TODO(https://github.com/oxidecomputer/omicron/issues/732): Nexus +# should allocate crucible datasets. +[[request.dataset]] zpool_uuid = "d462a7f7-b628-40fe-80ff-4e4189e2d62b" address = "[fd00:1de::9]:32345" -partition_kind.type = "crucible" +dataset_kind.type = "crucible" -[[request.partition]] +[[request.dataset]] zpool_uuid = "e4b4dc87-ab46-49fb-a4b4-d361ae214c03" address = "[fd00:1de::10]:32345" -partition_kind.type = "crucible" +dataset_kind.type = "crucible" -[[request.partition]] +[[request.dataset]] zpool_uuid = "f4b4dc87-ab46-49fb-a4b4-d361ae214c03" address = "[fd00:1de::11]:32345" -partition_kind.type = "crucible" +dataset_kind.type = "crucible" -[[request.partition]] +[[request.dataset]] zpool_uuid = "d462a7f7-b628-40fe-80ff-4e4189e2d62b" address = "[fd00:1de::5]:32221" -partition_kind.type = "cockroach_db" -partition_kind.all_addresses = [ +dataset_kind.type = "cockroach_db" +dataset_kind.all_addresses = [ "[fd00:1de::5]:32221", ] -[[request.partition]] +# TODO(https://github.com/oxidecomputer/omicron/issues/732): Nexus +# should allocate clickhouse datasets. +[[request.dataset]] zpool_uuid = "d462a7f7-b628-40fe-80ff-4e4189e2d62b" address = "[fd00:1de::8]:8123" -partition_kind.type = "clickhouse" +dataset_kind.type = "clickhouse" [[request.service]] name = "nexus" addresses = [ "[fd00:1de::7]:12220", "[fd00:1de::7]:12221" ] +# TODO(https://github.com/oxidecomputer/omicron/issues/732): Nexus +# should allocate Oximeter services. [[request.service]] name = "oximeter" addresses = [ "[fd00:1de::6]:12223" ]