BareMetalHostInventory¶
Available since Container Cloud 2.29.0 (Cluster release 16.4.0)
Note
Before update of the management cluster to Container Cloud 2.29.0
(Cluster release 16.4.0), instead of BareMetalHostInventory
, use the
BareMetalHost
object. For details, see BareMetalHost.
Caution
While the Cluster release of the management cluster is 16.4.0,
BareMetalHostInventory
operations are allowed to
m:kaas@management-admin
only. Once the management cluster is updated
to the Cluster release 16.4.1 (or later), this limitation will be lifted.
This section describes the BareMetalHostInventory
resource used in the
Mirantis Container Cloud API to monitor and manage the state of a bare metal
server. This includes inspecting the host hardware, firmware, operating system
provisioning, power control, and server deprovision.
The BareMetalHostInventory
object is created for each Machine
and
contains all information about machine hardware configuration.
Each BareMetalHostInventory
object is synchronized with an automatically
created BareMetalHost
object, which is used for internal purposes of
the Container Cloud private API.
Use the BareMetalHostInventory
object instead of BareMetalHost for
adding and modifying configuration of a bare metal server.
Caution
Any change in the BareMetalHost
object will be overwitten by
BareMetalHostInventory
.
For any existing BareMetalHost
object, a BareMetalHostInventory
object is created automatically during management cluster update to
Container Cloud 2.29.0 (Cluster release 16.4.0).
For demonstration purposes, the Container Cloud BareMetalHostInventory
custom resource (CR) can be split into the following major sections:
BareMetalHostInventory metadata¶
The BareMetalHostInventory
CR contains the following fields:
apiVersion
API version of the object that is
kaas.mirantis.com/v1alpha1
.
kind
Object type that is
BareMetalHostInventory
.
metadata
The metadata field contains the following subfields:
name
Name of the
BareMetalHostInventory
object.
namespace
Project in which the
BareMetalHostInventory
object was created.
annotations
host.dnsmasqs.metal3.io/address
Key that assigns a particular IP address to a bare metal host during PXE provisioning. For details, see Manually allocate IP addresses for bare metal hosts.
baremetalhost.metal3.io/detached
Key that pauses host management by the bare metal Operator for a manual IP address assignment.
Note
If the host provisioning has already started or completed, adding of this annotation deletes the information about the host from Ironic without triggering deprovisioning. The bare metal Operator recreates the host in Ironic once you remove the annotation. For details, see Metal3 documentation.
inspect.metal3.io/hardwaredetails-storage-sort-term
Optional. Key that defines sorting of the
bmh:status:storage[]
list during inspection of a bare metal host. Accepts multiple tags separated by a comma or semi-column with theASC/DESC
suffix for sorting direction. Example terms:sizeBytes DESC
,hctl ASC
,type ASC
,name DESC
.The default value is
hctl ASC, wwn ASC, by_id ASC, name ASC
.
labels
Labels used by the bare metal provider to find a matching
BareMetalHostInventory
object for machine deployment. For example:hostlabel.bm.kaas.mirantis.com/controlplane
hostlabel.bm.kaas.mirantis.com/worker
hostlabel.bm.kaas.mirantis.com/storage
Warning
Labels and annotations that are not documented in this API Reference are generated automatically by Container Cloud. Do not modify them using the Container Cloud API.
Configuration example:
apiVersion: kaas.mirantis.com/v1alpha1
kind: BareMetalHostInventory
metadata:
name: master-0
namespace: default
labels:
kaas.mirantis.com/baremetalhost-id: hw-master-0
annotations:
inspect.metal3.io/hardwaredetails-storage-sort-term: hctl ASC, wwn ASC, by_id ASC, name ASC
BareMetalHostInventory configuration¶
The spec
section for the BareMetalHostInventory
object defines the
required state of BareMetalHostInventory
. It contains the following fields:
bmc
Details for communication with the Baseboard Management Controller (
bmc
) module on a host. Contains the following subfields:address
URL for communicating with the BMC. URLs vary depending on the communication protocol and the BMC type. For example:
- IPMI
Default BMC type in the
ipmi://<host>:<port>
format. You can also use a plain<host>:<port>
format. A port is optional if using the default port 623.You can change the IPMI privilege level from the default
ADMINISTRATOR
toOPERATOR
with an optional URL parameterprivilegelevel
:ipmi://<host>:<port>?privilegelevel=OPERATOR
.
- Redfish
BMC type in the
redfish://
format. To disable TLS, you can use theredfish+http://
format. A host name or IP address and a path to the system ID are required for both formats. For example,redfish://myhost.example/redfish/v1/Systems/System.Embedded.1
orredfish://myhost.example/redfish/v1/Systems/1
.
bmhCredentialsName
Name of the
BareMetalHostCredentials
object.
disableCertificateVerification
Key that disables certificate validation. Boolean,
false
by default. Whentrue
, the validation is skipped.
bootMACAddress
MAC address for booting.
bootMode
Boot mode:
UEFI
if UEFI is enabled andlegacy
if disabled.
online
Defines whether the server must be online after provisioning is done.
Warning
Setting
online: false
to more than one bare metal host in a management cluster at a time can make the cluster non-operational.
Configuration example:
metadata:
name: master-0
spec:
bmc:
address: 192.168.33.106:623
bmhCredentialsName: 'master-0-bmc-credentials'
bootMACAddress: 0c:c4:7a:a8:d3:44
bootMode: legacy
online: true
BareMetalHostInventory status¶
The status
field of the BareMetalHostInventory
object defines the
current state of BareMetalHostInventory
. It contains the following fields:
errorMessage
Latest error message reported by the provisioning subsystem.
errorCount
Number of errors that the host has encountered since the last successful operation.
operationalStatus
Status of the host:
OK
Host is configured correctly and is manageable.
discovered
Host is only partially configured. For example, the
bmc
address is discovered but the login credentials are not.
error
Host has any type of error.
poweredOn
Host availability status that is powered on (
true
) or powered off (false
).
operationHistory
Key that contains information about performed operations.
Status example:
status:
errorCount: 0
errorMessage: ""
operationHistory:
deprovision:
end: null
start: null
inspect:
end: "2025-01-01T00:00:00Z"
start: "2025-01-01T00:00:00Z"
provision:
end: "2025-01-01T00:00:00Z"
start: "2025-01-01T00:00:00Z"
register:
end: "2025-01-01T00:00:00Z"
start: "2025-01-01T00:00:00Z"
operationalStatus: OK
poweredOn: true