Mirantis Container Cloud (MCC) becomes part of Mirantis OpenStack for Kubernetes (MOSK)!
Starting with MOSK 25.2, the MOSK documentation set covers all product layers, including MOSK management (formerly Container Cloud). This means everything you need is in one place. Some legacy names may remain in the code and documentation and will be updated in future releases. The separate Container Cloud documentation site will be retired, so please update your bookmarks for continued easy access to the latest content.
BareMetalHostInventory resource¶
Available since MOSK management 2.29.0
Note
Before update of the management cluster to 2.29.0 (Cluster release
16.4.0), instead of BareMetalHostInventory, use the BareMetalHost
object. For details, see BareMetalHost resource.
Caution
While the Cluster release of the management cluster is 16.4.0,
BareMetalHostInventory operations are allowed to
m:kaas@management-admin only. This limitation is lifted once the
management cluster is updated to the Cluster release 16.4.1 or later.
This section describes the BareMetalHostInventory resource used in
MOSK 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
private API.
Use the BareMetalHostInventory object instead of BareMetalHost resource 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
MOSK management 2.29.0.
For demonstration purposes, the BareMetalHostInventory custom resource (CR)
is split into the following major sections:
BareMetalHostInventory metadata¶
The BareMetalHostInventory CR contains the following fields:
apiVersionAPI version of the object that is
kaas.mirantis.com/v1alpha1.
kindObject type that is
BareMetalHostInventory.
metadataThe metadata field contains the following subfields:
nameName of the
BareMetalHostInventoryobject.
namespaceProject in which the
BareMetalHostInventoryobject was created.
annotationshost.dnsmasqs.metal3.io/addressKey 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/detachedKey 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, addition 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-termOptional. 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/DESCsuffix 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.
labelsLabels used by the bare metal provider to find a matching
BareMetalHostInventoryobject for machine deployment. For example:hostlabel.bm.kaas.mirantis.com/controlplanehostlabel.bm.kaas.mirantis.com/workerhostlabel.bm.kaas.mirantis.com/storage
Warning
Labels and annotations that are not documented in this API Reference are generated automatically. Do not modify them using the 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:
bmcDetails for communication with the Baseboard Management Controller (
bmc) module on a host. Contains the following subfields:addressURL 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
ADMINISTRATORtoOPERATORwith 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.1orredfish://myhost.example/redfish/v1/Systems/1.
bmhCredentialsNameName of the
BareMetalHostCredentialsobject.
disableCertificateVerificationKey that disables certificate validation. Boolean,
falseby default. Whentrue, the validation is skipped.
bootMACAddressMAC address for booting.
bootModeBoot mode:
UEFIif UEFI is enabled andlegacyif disabled.
onlineDefines whether the server must be online after provisioning is done.
Warning
Setting
online: falseto 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:
errorMessageLatest error message reported by the provisioning subsystem.
errorCountNumber of errors that the host has encountered since the last successful operation.
operationalStatusStatus of the host:
OKHost is configured correctly and is manageable.
discoveredHost is only partially configured. For example, the
bmcaddress is discovered but the login credentials are not.
errorHost has any type of error.
poweredOnHost availability status that is powered on (
true) or powered off (false).
operationHistoryKey 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