Skip to content

Commit 07d9ddd

Browse files
committed
Move sled-agent to V2 of the NTP admin client
This is the second half of the two-phase update to the client-side-versioned NTP admin client.
1 parent 892ea87 commit 07d9ddd

10 files changed

Lines changed: 6 additions & 103 deletions

File tree

Cargo.lock

Lines changed: 1 addition & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ members = [
2020
"clients/nexus-client",
2121
"clients/nexus-lockstep-client",
2222
"clients/ntp-admin-client",
23-
"clients/ntp-admin-v1-client",
2423
"clients/oxide-client",
2524
"clients/oximeter-client",
2625
"clients/repo-depot-client",
@@ -211,7 +210,6 @@ default-members = [
211210
"clients/nexus-client",
212211
"clients/nexus-lockstep-client",
213212
"clients/ntp-admin-client",
214-
"clients/ntp-admin-v1-client",
215213
"clients/oxide-client",
216214
"clients/oximeter-client",
217215
"clients/repo-depot-client",
@@ -620,7 +618,6 @@ maplit = "1.0.2"
620618
newtype_derive = "0.1.6"
621619
ntp-admin-api = { path = "ntp-admin/api" }
622620
ntp-admin-client = { path = "clients/ntp-admin-client" }
623-
ntp-admin-v1-client = { path = "clients/ntp-admin-v1-client" }
624621
ntp-admin-types = { path = "ntp-admin/types" }
625622
ntp-admin-types-versions = { path = "ntp-admin/types/versions" }
626623
mg-admin-client = { git = "https://github.com/oxidecomputer/maghemite", rev = "dc84a6ce494a9d004568b67e22add2285a04d887" }

clients/ntp-admin-v1-client/Cargo.toml

Lines changed: 0 additions & 20 deletions
This file was deleted.

clients/ntp-admin-v1-client/build.rs

Lines changed: 0 additions & 13 deletions
This file was deleted.

clients/ntp-admin-v1-client/src/lib.rs

Lines changed: 0 additions & 25 deletions
This file was deleted.

dev-tools/ls-apis/api-manifest.toml

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -255,20 +255,6 @@ This is the server running inside CockroachDB zones that performs \
255255
configuration and monitoring that requires the `cockroach` CLI.
256256
"""
257257

258-
[[apis]]
259-
client_package_name = "ntp-admin-v1-client"
260-
label = "NTP Admin version 1"
261-
server_package_name = "ntp-admin-api"
262-
versioned_how = "client"
263-
versioned_how_reason = """
264-
Sled Agent (within the Host OS deployment unit) calls into NTP, and is updated \
265-
before NTP. This requires that the NTP Admin API be client-side versioned.
266-
"""
267-
notes = """
268-
This is the server running inside NTP zones that performs \
269-
monitoring on 'chrony'.
270-
"""
271-
272258
[[apis]]
273259
client_package_name = "ntp-admin-client"
274260
label = "NTP Admin"

dev-tools/ls-apis/tests/api_check.out

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,6 @@ Client-managed API:
3737
NTP Admin (ntp-admin-client, exposed by omicron-ntp-admin)
3838
reason: Sled Agent (within the Host OS deployment unit) calls into NTP, and is updated before NTP. This requires that the NTP Admin API be client-side versioned.
3939

40-
NTP Admin version 1 (ntp-admin-v1-client, exposed by omicron-ntp-admin)
41-
reason: Sled Agent (within the Host OS deployment unit) calls into NTP, and is updated before NTP. This requires that the NTP Admin API be client-side versioned.
42-
4340
Crucible Repair (repair-client, exposed by crucible-downstairs)
4441
reason: depends on itself (i.e., instances call each other)
4542
Repo Depot API (repo-depot-client, exposed by omicron-sled-agent)

dev-tools/ls-apis/tests/api_dependencies.out

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,8 @@ Nexus Internal Lockstep API (client: nexus-lockstep-client)
8282

8383
NTP Admin (client: ntp-admin-client)
8484
consumed by: omicron-nexus (omicron/nexus) via 2 paths
85-
consumed by: sled-agent-rack-setup (omicron/sled-agent/rack-setup) via 1 path [embedded in omicron-sled-agent; rack-init only]
86-
87-
NTP Admin version 1 (client: ntp-admin-v1-client)
8885
consumed by: omicron-sled-agent (omicron/sled-agent) via 1 path
89-
consumed by: sled-agent-rack-setup (omicron/sled-agent/rack-setup) via 1 path [embedded in omicron-sled-agent; rack-init only]
86+
consumed by: sled-agent-rack-setup (omicron/sled-agent/rack-setup) via 2 paths [embedded in omicron-sled-agent; rack-init only]
9087

9188
External API (client: oxide-client)
9289

sled-agent/config-reconciler/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ installinator-common.workspace = true
2727
key-manager.workspace = true
2828
key-manager-types.workspace = true
2929
sled-agent-types-versions.workspace = true
30-
ntp-admin-v1-client.workspace = true
30+
ntp-admin-client.workspace = true
3131
omicron-common.workspace = true
3232
omicron-ledger.workspace = true
3333
omicron-uuid-kinds.workspace = true

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

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ use illumos_utils::zone::Api as _;
2626
use illumos_utils::zone::DeleteAddressError;
2727
use illumos_utils::zone::OmicronZoneConfigExt;
2828
use illumos_utils::zone::Zones;
29-
use ntp_admin_v1_client::types::TimeSync;
29+
use ntp_admin_client::types::TimeSync;
3030
use omicron_common::address::Ipv6Subnet;
3131
use omicron_uuid_kinds::OmicronZoneUuid;
3232
use sled_agent_types::inventory::ConfigReconcilerInventoryResult;
@@ -77,9 +77,7 @@ pub enum TimeSyncError {
7777
#[error("multiple running NTP zones - this should never happen!")]
7878
MultipleRunningNtpZones,
7979
#[error("failed to communicate with NTP admin server")]
80-
NtpAdmin(
81-
#[from] ntp_admin_v1_client::Error<ntp_admin_v1_client::types::Error>,
82-
),
80+
NtpAdmin(#[from] ntp_admin_client::Error<ntp_admin_client::types::Error>),
8381
#[error("failed to execute chronyc within NTP zone")]
8482
ExecuteChronyc(#[source] RunCommandError),
8583
#[error(
@@ -589,7 +587,7 @@ impl OmicronZones {
589587
return Err(TimeSyncError::MultipleRunningNtpZones);
590588
}
591589

592-
let client = ntp_admin_v1_client::Client::new(
590+
let client = ntp_admin_client::Client::new(
593591
&format!("http://{ntp_admin_address}"),
594592
log.clone(),
595593
);

0 commit comments

Comments
 (0)