Kind · metal.platform-kit.org/v1alpha1
Host
A Host is one physical machine as the operator finds it through its BMC. The operator makes the Host and writes all of it. You read it to see the state of the machine.
At a glance
Section titled “At a glance”- Group and version
metal.platform-kit.org/v1alpha1- Scope
- Cluster. A Host has no namespace.
- Written by
- The operator. Do not write or edit a Host.
- Reconciled by
- Host controller
- Name
- The serial number of the machine, in lower case.
- Bound by
- A HostClaim, through
spec.claimRef. - Phases
- Enrolling, Inspecting, Available, Assigned, Provisioning, Provisioned, Releasing, Failed, Maintenance. Phases has the rule for each.
- Source
- host_types.go
How it connects
Section titled “How it connects”The Host controller writes the status of each Host. A HostClaim binds the Host, and a HostOperation changes it with actions such as PowerCycle. Use pk-metal status to see the phase, or mise run lab:up to make simulated Hosts in the lab. Phases and conditions explains the phase, and Rack to running node shows the full path. For hardware work, follow Put a host in maintenance. If the serial numbers do not agree, use Host in Mismatch. To learn by practice, start with Your first cluster in the lab. The operator reads the machine through Redfish.
Lifecycle
Section titled “Lifecycle”- The Asset controller finds the BMC. The operator makes the Host. The phase is Enrolling.
- The BMC answers. The phase is Inspecting.
- The inventory is complete and the serial number agrees with the Asset. The phase is Available.
- A HostClaim binds the Host. The phase is Assigned.
- The install operation boots the machine. The phase is Provisioning.
- The node reports that it is ready. The phase is Provisioned.
- You delete the claim. The operator wipes the disk and releases the Host. The phase is Releasing, then Available.
The steps below show the install from step 4 to step 6.
Install one machine
1 / 5
Claim
You apply a HostClaim. The HostClaim controller binds a free Host to it.
kubectl apply -f claim.yamlClaim. You apply a HostClaim. The HostClaim controller binds a free Host to it.
kubectl apply -f claim.yamlPropose. The controller proposes a HostOperation. The operation waits for approval. The machine does not change.
pk-metal statusApprove. You approve the operation. The HostOperation controller starts it.
pk-metal approve install-node-01Boot. The operation mounts the installer and the node configuration as virtual media. It sets a one-time boot device and power cycles the machine.
InsertMedia → SetBootOverride → PowerCycleCheck in. Talos starts from the disk and the node checks in. The operation ejects the media and succeeds. The Host is Provisioned.
AwaitCheckIn → EjectMedia
The operator writes the spec from the claim that binds the machine.
| Field | Type | Description |
|---|---|---|
claimRef | object | ClaimRef names the HostClaim that holds this machine. The first claim to set it wins; any other claim on the same machine waits (HostAlreadyClaimed). The UID pins the exact claim: a claim deleted and created again under the same name is a new claim. |
namerequired | string | The name of the object. |
namespacerequired | string | The namespace of the object. |
uid | string | The UID of the object. An object made again with the same name has a different UID. |
os | object | OS is the TalosNode this machine should run, copied from the claim and cleared when the claim is released. Until it is set, a bound machine is reserved and nothing is done to it. |
nodeRefrequired | object | NodeRef names the TalosNode (os.platform-kit.org) whose config this machine boots. |
namerequired | string | The name of the object. |
Status
Section titled “Status”| Field | Type | Description |
|---|---|---|
blockedOn | string | BlockedOn says why the host is not moving on (Approval(Provisioning), SerialMismatch, HostInMaintenance); a reason, not a phase, because it can happen in any phase. |
conditions | []object | Conditions are the truth — the only thing reconcilers branch on. |
firmwareProposed | object | FirmwareProposed remembers the last firmware plan proposed for this machine, so the same plan is not proposed twice. Written by the firmware lane only. |
operationrequired | string | Operation is the proposed HostOperation as namespace/name. |
planHashrequired | string | PlanHash is the sha256 of the desired state the operation serves. |
identity | object | HostIdentity identifies the machine, whichever BMC it is reached through: the same machine seen through two BMCs gets the same identity, and so one Host. Vendors put the serial number in different places (Huawei on the system, Supermicro on the board); the operator reads the right one for each. |
serial | string | Serial is the machine's serial number: the board serial on Supermicro, the system serial on Huawei and other vendors. |
uuid | string | |
vendor | string | |
lastResetTime | string (date-time) | LastResetTime is when the BMC last saw the machine reset. If it changes and no operation explains it, the Drifted condition shows it. Then a person reset the machine in a different way (ipmitool, the BMC web page, the power button). Not every BMC reports it (Huawei iBMC does not); drift is then not detected. |
managedBy | []object | ManagedBy lists the ways to reach the machine — usually one BMC. |
endpointRefrequired | object | EndpointRef names the ManagementEndpoint (the BMC). |
namerequired | string | The name of the object. |
reachablerequired | boolean | Reachable says whether this BMC answers. |
systemIdrequired | string | SystemID is the Redfish ComputerSystem id behind that BMC. |
phase | string | Phase summarizes the conditions below for people and for kubectl columns. It is a summary, not the contract: automation should read conditions.EnrollingInspectingAvailableAssignedProvisioningProvisionedReleasingFailedMaintenance |
systemFirmwareProposed | object | SystemFirmwareProposed is the system-firmware lane's plan memory, the same guard as firmwareProposed for the components a reset applies. |
operationrequired | string | Operation is the proposed HostOperation as namespace/name. |
planHashrequired | string | PlanHash is the sha256 of the desired state the operation serves. |
Columns of kubectl get hosts (the columns marked wide show only with -o wide):
| Column | Value |
|---|---|
NAME | .metadata.name |
ASSET | .metadata.labels.metal\.platform-kit\.org/asset |
SERIAL | .status.identity.serial |
VENDOR | .status.identity.vendor |
PHASE | .status.phase |
BLOCKEDwide | .status.blockedOn |
CLAIMwide | .spec.claimRef.name |
AGE | .metadata.creationTimestamp |
Conditions
Section titled “Conditions”| Condition | True means | Effect on the phase |
|---|---|---|
Reachable |
At least one BMC of the machine answers Redfish. | Inspecting when True and no inventory exists yet |
Inspected |
The operator has the hardware inventory. | Inspecting until True |
Verified |
The serial number from the BMC agrees with the Asset. | Stays in Inspecting when False. Sets blockedOn. |
Booted |
The machine started the installed system. | Failed when False |
OSReady |
The node reports that it is ready. | Provisioned when True. Failed when False. |
FirmwareConverged |
The BMC firmware is the version of the FirmwareProfile. Absent without a profile. | None |
SystemFirmwareConverged |
The system firmware is the version of the profiles. Absent without a profile. | None |
BiosConverged |
The BIOS settings agree with the BiosSettings of the machine. | None |
Drifted |
The machine reset and no operation caused it. | None. It is information. |
ApprovalPending |
A proposed operation waits for a person. | Sets blockedOn to Approval(<domain>) |
DiskWiped |
False: the disk can still hold an installed node. Absent in all other cases. | Sets blockedOn to the reason |
DeletionHeld |
Someone deleted the Host, but a claim holds the machine. The Host stays until the release. | None |
Maintenance |
A person set the maintenance annotation. | Maintenance |
Verified=False has priority for blockedOn, then ApprovalPending, then DiskWiped.
Conditions and reasons lists all conditions and reasons.
Example
Section titled “Example”You do not write a Host. Read it with kubectl:
$ kubectl get hostsNAME ASSET SERIAL VENDOR PHASE AGEsimhw2288v5000397 asset-07 SIMHW2288V5000397 Huawei Provisioned 3dsimhw2288v5000398 asset-08 SIMHW2288V5000398 Huawei Available 3dkubectl get hosts -o wide adds the columns BLOCKED and CLAIM.
Put a Host in maintenance
Section titled “Put a Host in maintenance”Use maintenance mode for hardware work, for example to replace a memory module.
-
Find the name of the Host.
Terminal window kubectl get hosts -
Set the annotation. Give the reason as the value.
Terminal window kubectl annotate host simhw2288v5000398 metal.platform-kit.org/maintenance="replace DIMM B2" -
Make sure that the phase is Maintenance.
Terminal window kubectl get host simhw2288v5000398 -
Do the hardware work.
-
Remove the annotation.
Terminal window kubectl annotate host simhw2288v5000398 metal.platform-kit.org/maintenance-
An operation that already runs continues to its end. The operator starts no new operation.