Skip to content

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.

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

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.

Host phases. A Host moves from Enrolling to Provisioned. A release takes it back to Available. Failed and Maintenance are stops.EnrollingInspectingAvailableAssignedProvisioningProvisionedReachableVerifiedclaimBootedOSReadyFailedReleasingMaintenanceany phase, by annotationFalseclaim deletedwiped, free again
Host phases. The phase is a summary of the conditions.
  1. The Asset controller finds the BMC. The operator makes the Host. The phase is Enrolling.
  2. The BMC answers. The phase is Inspecting.
  3. The inventory is complete and the serial number agrees with the Asset. The phase is Available.
  4. A HostClaim binds the Host. The phase is Assigned.
  5. The install operation boots the machine. The phase is Provisioning.
  6. The node reports that it is ready. The phase is Provisioned.
  7. 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

A HostClaim binds a Host. A HostOperation, after approval, boots the machine through its BMC with virtual media.YouHostClaimPendingHostOperation-BMCRedfishHostAvailableMedia storeinstaller + configMachineoffbindsproposesapprovesRedfishmountspower cyclechecks in

Claim

You apply a HostClaim. The HostClaim controller binds a free Host to it.

kubectl apply -f claim.yaml
  1. Claim. You apply a HostClaim. The HostClaim controller binds a free Host to it.

    kubectl apply -f claim.yaml
  2. Propose. The controller proposes a HostOperation. The operation waits for approval. The machine does not change.

    pk-metal status
  3. Approve. You approve the operation. The HostOperation controller starts it.

    pk-metal approve install-node-01
  4. Boot. 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 → PowerCycle
  5. Check 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.

FieldTypeDescription
claimRefobjectClaimRef 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.
namerequiredstringThe name of the object.
namespacerequiredstringThe namespace of the object.
uidstringThe UID of the object. An object made again with the same name has a different UID.
osobjectOS 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.
nodeRefrequiredobjectNodeRef names the TalosNode (os.platform-kit.org) whose config this machine boots.
namerequiredstringThe name of the object.
FieldTypeDescription
blockedOnstringBlockedOn 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[]objectConditions are the truth — the only thing reconcilers branch on.
firmwareProposedobjectFirmwareProposed remembers the last firmware plan proposed for this machine, so the same plan is not proposed twice. Written by the firmware lane only.
operationrequiredstringOperation is the proposed HostOperation as namespace/name.
planHashrequiredstringPlanHash is the sha256 of the desired state the operation serves.
identityobjectHostIdentity 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.
serialstringSerial is the machine's serial number: the board serial on Supermicro, the system serial on Huawei and other vendors.
uuidstring
vendorstring
lastResetTimestring (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[]objectManagedBy lists the ways to reach the machine — usually one BMC.
endpointRefrequiredobjectEndpointRef names the ManagementEndpoint (the BMC).
namerequiredstringThe name of the object.
reachablerequiredbooleanReachable says whether this BMC answers.
systemIdrequiredstringSystemID is the Redfish ComputerSystem id behind that BMC.
phasestringPhase summarizes the conditions below for people and for kubectl columns. It is a summary, not the contract: automation should read conditions.EnrollingInspectingAvailableAssignedProvisioningProvisionedReleasingFailedMaintenance
systemFirmwareProposedobjectSystemFirmwareProposed is the system-firmware lane's plan memory, the same guard as firmwareProposed for the components a reset applies.
operationrequiredstringOperation is the proposed HostOperation as namespace/name.
planHashrequiredstringPlanHash is the sha256 of the desired state the operation serves.

Columns of kubectl get hosts (the columns marked wide show only with -o wide):

ColumnValue
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
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.

You do not write a Host. Read it with kubectl:

Terminal window
$ kubectl get hosts
NAME ASSET SERIAL VENDOR PHASE AGE
simhw2288v5000397 asset-07 SIMHW2288V5000397 Huawei Provisioned 3d
simhw2288v5000398 asset-08 SIMHW2288V5000398 Huawei Available 3d

kubectl get hosts -o wide adds the columns BLOCKED and CLAIM.

Use maintenance mode for hardware work, for example to replace a memory module.

  1. Find the name of the Host.

    Terminal window
    kubectl get hosts
  2. Set the annotation. Give the reason as the value.

    Terminal window
    kubectl annotate host simhw2288v5000398 metal.platform-kit.org/maintenance="replace DIMM B2"
  3. Make sure that the phase is Maintenance.

    Terminal window
    kubectl get host simhw2288v5000398
  4. Do the hardware work.

  5. 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.