Machine-a-tron RMS Mock v2.3 New
Machine-a-tron RMS Mock v2.3 New
machine-a-tron hosts a mock of the Rack Management Service (RMS) gRPC API, so the NICo rack workflows that call RMS run against a simulated fleet with no RMS deployed: scale-up fabric configuration, switch certificates, power control, rack firmware upgrade, NVLink switch operating system (NVOS) image update, switch password rotation, and switch factory reset. This page covers what the mock serves, how to point NICo at it, and what it does not do. Refer to the crate README for the job model, and to RMS Configuration for the settings that make NICo call RMS in the first place.
What It Serves
The mock implements RackManager and RackManagerV2 with the librms
bindings NICo’s client uses. It is mounted on machine-a-tron’s bmc-mock HTTPS
listener, on the same port (service.bmcMock.port, default 1266) and with
the same certificate as the Redfish, control, and UFM mock routes. It is
always present, has no enable flag, and is called only when
nico-api.rms.apiUrl points at it. Placement, addresses, and power state come
from the same simulated devices that answer Redfish, so RMS and Redfish never
disagree about a device.
Every other RMS method returns gRPC UNIMPLEMENTED, which is what a real RMS
returns for a method it does not serve.
The mock matches the nodes a request names to simulated devices by address,
the Baseboard Management Controller (BMC) MAC first, and echoes each
node_id back without interpreting it. NICo sends its own row id, the
machine, switch, or power shelf id, once the device is ingested, and the
device’s BMC MAC before that. A node that matches no simulated device is a
per-node failure that names the node, and the rest of the batch proceeds.
Jobs advance each time they are polled rather than with time, and every job
reaches a terminal state. Jobs complete by default; the crate’s tests can set
an internal fault table that makes selected jobs fail.
Pointing NICo at It
Set nico-api.rms.apiUrl to the machine-a-tron bmc-mock Service and keep
nico-api.rms.enabled on. Use the cross-namespace name: nico-api runs in
its own namespace, and a bare Service name resolves against that namespace.
The Service is named <chart name>-<pod key>-bmc-mock, where the chart name is
nico-machine-a-tron unless nameOverride is set and the pod key is the pod
that hosts the devices (mat-0 in the chart defaults).
kubectl get svc -n <namespace> lists the Services that exist.
nico-api.rms.enforceTls can stay at its default: the listener is TLS only,
and its certificate is issued by the chart’s global.certificate.issuerRef,
the same issuer that signs the nico-api certificate, with the Service name
as its DNS name.
In controller mode with mat-k8s-controller.gateway.enabled: true, set
nico-api.rms.apiUrl to the protocol gateway Service instead:
https://<release>-mat-k8s-controller-gateway.<namespace>.svc.cluster.local:8443,
where 8443 is the default mat-k8s-controller.gateway.port. The gateway
forwards each request to the pod that simulates the rack it names, so the racks
of every pod are reachable through one endpoint. Its certificate comes from the
same global.certificate.issuerRef, so nico-api.rms.enforceTls can stay at
its default here as well. Refer to the
Protocol gateway
section of the chart README for the gateway settings, and to the
gateway README
for the RPCs it routes and how its job ids differ from the mock’s.
On a site that also runs a real RMS, pointing apiUrl at machine-a-tron
diverts every RMS-backed operation, for real racks as well as simulated ones,
to the mock. Use it only on simulation-only sites.
Limitations
- Job state is in memory and lost on restart.
GetJobStatusreturnsNOT_FOUNDfor an unknown job.GetConfigureSwitchCertificateJobStatus,GetFirmwareJobStatus, andGetSwitchSystemImageJobStatusanswerRETURN_CODE_FAILUREwithout a completion state. A restart during a reset therefore leaves NICo unable to infer whether that operation completed. - Terminal job records keep their actual outcomes and child lists. The
[rms_mock]settingmax_terminal_jobsdefaults to 100,000 in MAT (10,000 when embedding the standalone Rust mock). The settingmin_terminal_retention_secsdefaults to 3,600 seconds: records younger than that are protected above the count target, up to a hard ceiling of four times the target. Above that ceiling, records are evicted regardless of age and the mock logs one warning per instance. Older records are evicted in completion order while over the target. Zero retention permits immediate count-based eviction. - Firmware and NVOS image applies track jobs without installing images, so Redfish firmware inventory is unchanged. A successful password rotation updates the simulated NVOS account. Factory reset restores NVOS factory credentials and clears its fabric primary role once the job completes; it leaves BMC and power state unchanged. Either operation fails its job if the host callback rejects the effect.
- MAT snapshots devices at startup and graceful shutdown. A graceful restart preserves the current NVOS credentials; an unclean exit can restore credentials from the older startup snapshot. Job records are never persisted.
ListFirmwareObjectsreports object ids only, one by default. The[rms_mock]table of the machine-a-tron configuration can name others, and the chart exposes no setting for it.BatchGetFirmwareInventoryis not served, so NICo’s RMS power-shelf backend reports an error per shelf when it lists shelf firmware. The rack firmware upgrade does not use it.- Placement is reported for compute and switch trays only, and power shelves report none.
- A single pod’s mock serves only its own racks. In controller mode, the protocol gateway fronts every pod behind one Service. Refer to the Protocol gateway section of the chart README.
- Jobs carry no timestamps.