Skip to content

Commit b10f5f9

Browse files
committed
feat(admin-cli): inspect a machine's MachineBootInterface across its lifecycle
We formalized boot-interface management around a single MachineBootInterface and now track it across the machine lifecycle, but that view lives in four stores -- the owned machine_interfaces rows, predicted_machine_interfaces, the explored_endpoints default, and the retained_boot_interfaces pairs we keep across a delete and re-ingest. There was no one place to see what each store believes a machine's boot interface is. Add `admin-cli machine boot-interfaces <machine-id>`: a read-only command that gathers all four stores for one machine and prints them together as an ASCII table, JSON, or YAML, alongside the effective boot interface the system would select (pick_boot_interface) and a flag for when the stores disagree. - New read-only GetMachineBootInterfaces Forge RPC + handler that gathers the four stores in one read transaction; the report messages include boot_interface_id explicitly (the existing MachineInterface message omits it). - A non-consuming, non-window-filtered retained_boot_interfaces read so the troubleshooting view surfaces stale records that the window-aware reads hide. - The machine boot-interfaces subcommand with the three renderers, the effective-pick summary, and the divergence flag. Tests cover the three renderers and api-core integration tests that seed all four stores and assert the per-store entries, the effective pick, and divergence. Signed-off-by: Chet Nichols III <chetn@nvidia.com>
1 parent 1312781 commit b10f5f9

14 files changed

Lines changed: 1078 additions & 1 deletion

File tree

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
/*
2+
* SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3+
* SPDX-License-Identifier: Apache-2.0
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
18+
use carbide_uuid::machine::MachineId;
19+
use clap::Parser;
20+
21+
#[derive(Parser, Debug)]
22+
#[command(after_long_help = "\
23+
EXAMPLES:
24+
25+
Show one machine's boot interfaces across every store:
26+
$ nico-admin-cli machine boot-interfaces 12345678-1234-5678-90ab-cdef01234567
27+
28+
As JSON or YAML (uses the global --output/--format flag):
29+
$ nico-admin-cli --output json machine boot-interfaces 12345678-1234-5678-90ab-cdef01234567
30+
$ nico-admin-cli --output yaml machine boot-interfaces 12345678-1234-5678-90ab-cdef01234567
31+
32+
")]
33+
pub struct Args {
34+
#[clap(help = "The machine ID whose boot interfaces to gather")]
35+
pub machine: MachineId,
36+
}

0 commit comments

Comments
 (0)