Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
fa5a7db
Allow packaging Omicron-branded Zone images
smklein Jan 31, 2022
53cb99f
Merge branch 'main' into package-zone
smklein Jan 31, 2022
1732c42
rev1 zone install to target, need handoff in bootstrap agent
smklein Jan 31, 2022
7716d1e
halfway through mucking up config params to sled agent
smklein Feb 3, 2022
08ee43f
Merge branch 'main' into package-zone
smklein Feb 3, 2022
e38da8d
Config compiles, at least
smklein Feb 3, 2022
72d74cd
Merge branch 'main' into package-zone
smklein Feb 3, 2022
e67dc74
Able to boot omicron-zone crdb. About to shift RSS interaction to boo…
smklein Feb 9, 2022
5814318
Sled agent exposing api to add fs
smklein Feb 10, 2022
41d23b7
Serializing 'how-to-launch-zone' info to storage
smklein Feb 10, 2022
bf1bfed
Plumb static addresses
smklein Feb 10, 2022
e80a6d2
Bootstrap agent doing init against sled agent; needs debugging for IP…
smklein Feb 11, 2022
a45f14a
Make ipv6 work by ensureing target zone calls 'ipadm create-addr -T a…
smklein Feb 14, 2022
a5b22fe
Comments, fix file extension
smklein Feb 14, 2022
272caf5
Merge branch 'main' into package-zone
smklein Feb 14, 2022
5b82060
Start propagating better errors on zone initialization, prep for refa…
smklein Feb 14, 2022
d952c52
Nexus awaiting crdb, caching rss-config results
smklein Feb 16, 2022
010e2ed
fmt
smklein Feb 16, 2022
56d50ab
Add CRDB manifest
smklein Feb 16, 2022
ad5b803
Use &, not --background for crdb
smklein Feb 16, 2022
0e08eba
Merge branch 'main' into package-zone
smklein Feb 16, 2022
37577bd
Add AddrObject type, try to fumble interface vs addrobj less
smklein Feb 16, 2022
76d3568
Starting to remove the 'base' zones
smklein Feb 17, 2022
ae23137
Add support for bundling rust binaries into zones
smklein Feb 18, 2022
5a2b8a7
Clean up path construction, refactor packaging code slightly
smklein Feb 18, 2022
fff723b
Document some future work w/comments
smklein Feb 18, 2022
1cb62ab
Refactoring zone management logic out of storage manager
smklein Feb 18, 2022
20da2c8
Added HTTP endpoint to sled agent to request local services
smklein Feb 21, 2022
de33c96
fmt
smklein Feb 21, 2022
d54184d
Calling services ensure from pseudo-RSS
smklein Feb 22, 2022
4f1e09c
Successfully launching Nexus within a zone, huzzah
smklein Feb 23, 2022
f7fcf6f
Clean up unused code
smklein Feb 24, 2022
bee6300
Clippy
smklein Feb 24, 2022
95cf444
openapi update (just a stray comment)
smklein Feb 24, 2022
b9f755d
Ensure necessary Ipv6 addresses exist in the GZ
smklein Feb 24, 2022
bdbbd8a
fmt
smklein Feb 24, 2022
a38a96f
Avoid the term 'partition' when 'dataset' is more accurate
smklein Feb 24, 2022
7a305b5
Fix tests, make clippy happy again, fmt
smklein Feb 24, 2022
c5923ef
Merge branch 'main' into package-zone
smklein Feb 25, 2022
1667537
Remove unused dep
smklein Feb 25, 2022
32e95d1
datasetkind touchups
smklein Feb 25, 2022
2be7e53
fmt
smklein Feb 25, 2022
89d40a2
Merge branch 'main' into package-zone
smklein Feb 25, 2022
3477020
Give nexus a non-localhost addr, better CRDB liveness check, change d…
smklein Feb 26, 2022
941b908
Use non-localhost address for Nexus. Necessary for usage in zones.
smklein Feb 26, 2022
933f0b7
Propolis is working again
smklein Feb 28, 2022
8d53959
Clean up zone management, fix (kill) tests
smklein Mar 1, 2022
bc4078f
clippy
smklein Mar 1, 2022
fa03130
Clickhouse launching within a zone
smklein Mar 1, 2022
6e3dc8a
Use the default config.xml file
smklein Mar 1, 2022
2c236de
no more warnings
smklein Mar 1, 2022
99fdb3c
Merge branch 'main' into package-zone
smklein Mar 1, 2022
86a746c
RSS: initialize partitions before services
smklein Mar 2, 2022
66a2150
nexus no longer awaiting crdb
smklein Mar 2, 2022
2f5bc58
Merge branch 'main' into package-zone
smklein Mar 2, 2022
907c9d1
Use packaging library, refactored into separate crate
smklein Mar 2, 2022
e382f10
fix up oximeter (addressing, dependencies)
smklein Mar 2, 2022
aa8829d
fmt
smklein Mar 2, 2022
180c427
Uprev omicron-package, fix borked Clickhouse addressing
smklein Mar 2, 2022
9ec63f6
Add the ability to use external packages, enable Crucible
smklein Mar 2, 2022
c94ac4e
partway to crucible working
smklein Mar 3, 2022
f192355
toml is throwing some goofy bullshit at me rn fr
smklein Mar 3, 2022
692068d
Appease Clippy
smklein Mar 3, 2022
724f777
Merge branch 'main' into package-zone
smklein Mar 4, 2022
15d80ab
Zpool names start with 'oxp_', are more strongly typed
smklein Mar 4, 2022
3c7f7f7
Merge branch 'main' into package-zone
smklein Mar 4, 2022
51b9ca1
clippy
smklein Mar 4, 2022
1f0c7ba
Leave examples alone
smklein Mar 4, 2022
908e51f
Consolidate 'DatasetKind' a bit
smklein Mar 5, 2022
05b9e7b
more 'leaving default addrs alone'
smklein Mar 5, 2022
bfc934a
Update readme
smklein Mar 5, 2022
278e287
misc comments, update README
smklein Mar 5, 2022
5d50081
clippy
smklein Mar 5, 2022
380e9a1
openapioops
smklein Mar 5, 2022
6ed7895
Merge branch 'main' into package-zone
smklein Mar 7, 2022
e3dcafa
Respond to james' review feedback
smklein Mar 7, 2022
e63d0d1
Merge branch 'main' into package-zone
smklein Mar 7, 2022
b9f5416
openapi
smklein Mar 7, 2022
0ebfac7
Merge branch 'main' into package-zone
smklein Mar 7, 2022
24cd0a8
fix up error propagation in the new progenitor world
smklein Mar 7, 2022
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
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ logs
out
tools/clickhouse*
tools/cockroach*
clickhouse/
cockroachdb/
/clickhouse/
/cockroachdb/
smf/nexus/root.json
59 changes: 59 additions & 0 deletions Cargo.lock

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

12 changes: 11 additions & 1 deletion README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,14 @@ in a format which lets them be transferred to a Helios machine.
This tool acts on a `package-manifest.toml` file which describes the packages to be
bundled in the build.

Configuration files are used to select IP addresses, and to manage Zpools
utilized by the Sled Agent. These configuration files are located within
`smf/`, and likely need to be modified to use addresses and zpools which match
your hardware. Much of this configuration will be automated in the future
(e.g., IP addresses will be inferred and posted to a DNS system, Zpools will
automatically be detected on discovered disks), but for now it remains
hard-coded.

[source,text]
----
$ cargo build
Expand Down Expand Up @@ -481,8 +489,10 @@ initialize other service as part of its setup sequence anyway.
----
# List all services:
$ svcs
# View zones managed by Omicron (prefixed with "oxz_"):
$ zoneadm list -cv
# View logs for a service:
$ tail -f $(svcs -L nexus)
$ pfexec tail -f $(pfexec svcs -z oxz_nexus -L nexus)
----

To uninstall all Omicron services from a machine, the following may be
Expand Down
67 changes: 67 additions & 0 deletions common/src/api/internal/sled_agent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,3 +108,70 @@ pub struct InstanceRuntimeStateRequested {
pub run_state: InstanceStateRequested,
pub migration_params: Option<InstanceRuntimeStateMigrateParams>,
}

/// The type of a dataset, and an auxiliary information necessary
/// to successfully launch a zone managing the associated data.
#[derive(Clone, Debug, Deserialize, Serialize, JsonSchema, PartialEq)]
#[serde(tag = "type", rename_all = "snake_case")]
pub enum DatasetKind {
CockroachDb {
/// The addresses of all nodes within the cluster.
all_addresses: Vec<SocketAddr>,
},
Crucible,
Clickhouse,
}

impl std::fmt::Display for DatasetKind {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
use DatasetKind::*;
let s = match self {
Crucible => "crucible",
CockroachDb { .. } => "cockroach",
Clickhouse => "clickhouse",
};
write!(f, "{}", s)
}
}

/// Used to request a new partition kind exists within a zpool.
///
/// Many partition types are associated with services that will be
/// instantiated when the partition 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,
// 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.
//
// It's unclear if this is actually necessary - making this change
// would also require the RSS to query existing datasets before
// requesting new ones (after all, we generally wouldn't want to
// create two CRDB datasets with different UUIDs on the same zpool).
}

#[derive(
Clone, Debug, Deserialize, Serialize, JsonSchema, PartialEq, Eq, Hash,
)]
pub struct ServiceRequest {
// The name of the service to be created.
pub name: String,
// The addresses on which the service should listen for requests.
pub addresses: Vec<SocketAddr>,
}

/// 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
/// as Nexus.
#[derive(Clone, Debug, Deserialize, Serialize, JsonSchema, PartialEq)]
pub struct ServiceEnsureBody {
pub services: Vec<ServiceRequest>,
}
1 change: 0 additions & 1 deletion common/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ pub mod api;
pub mod backoff;
pub mod cmd;
pub mod config;
pub mod packaging;

#[macro_export]
macro_rules! generate_logging_api {
Expand Down
29 changes: 0 additions & 29 deletions common/src/packaging.rs

This file was deleted.

13 changes: 13 additions & 0 deletions nexus-client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,19 @@ impl From<types::InstanceState>
}
}

impl From<omicron_common::api::internal::sled_agent::DatasetKind>
for types::DatasetKind
{
fn from(d: omicron_common::api::internal::sled_agent::DatasetKind) -> Self {
use omicron_common::api::internal::sled_agent::DatasetKind::*;
match d {
CockroachDb { .. } => types::DatasetKind::Cockroach,
Crucible { .. } => types::DatasetKind::Crucible,
Clickhouse { .. } => types::DatasetKind::Clickhouse,
}
}
}

impl From<omicron_common::api::internal::nexus::InstanceRuntimeState>
for types::InstanceRuntimeState
{
Expand Down
Loading