Configuring the Bare Metal Instance Management Node
Perform the following operations on the controller node.
- Add resource scheduling information.
- You can use resource classes to manage bare metal instance servers with different flavors. After the resource class of the management node is specified for the bare metal instance node, only the flavors that match the instance type can be scheduled.
1openstack --os-baremetal-api-version 1.21 baremetal node set ${BM_NAME} --resource-class $CLASS_NAME

CLASS_NAME can be customized.
- After the configuration is complete, you can run the following command to check the configuration:
1openstack baremetal --os-baremetal-api-version 1.31 node show ${BM_NAME} --fields name resource_class

If advanced scheduling is required, you can use the --property field to specify the capabilities property of the node, which is used together with ComputeCapabilitiesFilter in the Compute service.
1openstack baremetal node set $NODE_UUID --property capabilities=key1:val1,key2:val2
- You can use resource classes to manage bare metal instance servers with different flavors. After the resource class of the management node is specified for the bare metal instance node, only the flavors that match the instance type can be scheduled.
- Configure the matched hardware information.
1openstack baremetal node set ${BM_NAME} --property cpus=$CPU_COUNT --property memory_mb=$RAM_MB --property local_gb=$DISK_GB --property cpu_arch=$ARCH

The value of cpu_arch of a x86 server is x86_64, and the value of cpu_arch of an Arm server is aarch64.
After the configuration is complete, you can run the following command to check the configuration:
1openstack baremetal --os-baremetal-api-version 1.31 node show ${BM_NAME} --fields name properties

You can also use the hardware check function to collect hardware information.
- Verify the management node configuration.
1openstack baremetal --os-baremetal-api-version 1.11 node validate ${BM_NAME}

Ensure that the values of management and power are True.
If the verification fails, check the configuration based on the failure information. Some configurations fail because the driver does not support them.
When the BMS works with the Compute service, you do not need to manually configure the image-related configuration in instance_info on the management node. The Compute service automatically configures the image-related configuration before the instance is deployed. Therefore, you can ignore the deploy option error.
- Enable the management node to enter the management state.
If the values of management and power are True in 3, run the following command on the management node to enter the management state:
1openstack baremetal --os-baremetal-api-version 1.11 node manage ${BM_NAME}

You can run the following command to view the state:
1openstack baremetal --os-baremetal-api-version 1.31 node show ${BM_NAME} --fields name provision_state

- Optional: Check hardware and collect hardware information.
If the hardware check and driver configuration are complete, perform the following operations to collect hardware information:
- Enable the inspector-dnsmasq service.
1systemctl start openstack-ironic-inspector-dnsmasq
- Start check.
1openstack baremetal --os-baremetal-api-version 1.11 node inspect ${BM_NAME}

This command is invoked asynchronously and does not return the result immediately. You can run the following command to view the status of the management node:
1watch -d -n 1 "openstack baremetal node list"

The value of Provisioning State for the management node changes as follows: manageable -> inspecting wait -> manageable.
- After the check is complete, you can view the hardware information.
1openstack baremetal --os-baremetal-api-version 1.11 node show ${BM_NAME}
The properties of the management node contain information such as memory_mb, cpu_arch, local_gb and cpus.
- Stop the inspector-dnsmasq service.
1systemctl stop openstack-ironic-inspector-dnsmasq
- Enable the inspector-dnsmasq service.
- Optional: Configure console information.
Set the console interface.
1openstack --os-baremetal-api-version 1.31 baremetal node set ${BM_NAME} --console-interface ipmitool-socat
Set the console port.
1openstack baremetal node set ${BM_NAME} --driver-info ipmi_terminal_port=${port}
The value of port must be within the range specified by [serial_console]:port_range in the nova.conf file configured in Configuring the Serial Port Console.
Enable the console.
1openstack baremetal node console enable ${BM_NAME}
View the console information.
1openstack baremetal node console show ${BM_NAME}
- Enable the management node to enter the available state.
- Check the port.
1openstack baremetal --os-baremetal-api-version 1.31 port list --fields address pxe_enabled node_uuid

For each bare metal instance management node, there must be a port whose pxe_enabled status is True.
If the value of pxe_enabled is false, run the following command:
openstack baremetal --os-baremetal-api-version 1.31 port set ${port_uuid} --pxe-enable - Enable the management node to enter the available state.
1openstack baremetal --os-baremetal-api-version 1.11 node provide ${BM_NAME}

By default, the BMS is configured to automatically clean the data, and the node will be formatted.
- The clean operation is invoked asynchronously and does not return the result immediately. You can run the following command to view the status of the management node:
1watch -d -n 1 "openstack baremetal node list"



The value of Provisioning State for the configured management node changes as follows: .
- If the management node is in the clean wait state for a long time, run the following command to stop the clean state:
1openstack baremetal --os-baremetal-api-version 1.56 node abort ${BM_NAME}
The value of Provisioning State for the management node will change to clean fail. Run the following command to enter the management state again:
1openstack baremetal --os-baremetal-api-version 1.11 node manage ${BM_NAME}
If the management node is in the clean wait state for a long time, perform the following steps:
- If the value of Maintenance status for the management node is True, run the following command to cancel the maintenance status:
1openstack baremetal node maintenance unset ${BM_NAME}
- If the drive space is large and drive erasing takes a long time, you can disable drive erasing in the clean operation and clear only the metadata of the drive. Modify the /etc/ironic/ironic.conf configuration file on the BMS node as follows:
1 2
[deploy] erase_devices_priority = 0
- Log in to the bare metal instance node by using BMC or other methods and view the ironic-python-agent service logs to locate the cause.
- (Not recommended) Disable the automatic clean function by modifying the /etc/ironic/ironic.conf configuration file on the BMS node.
1 2
[conductor] automated_clean = true
After the automatic clean function is disabled, you can manually clean the data.
1openstack baremetal --os-baremetal-api-version 1.15 node clean ${BM_NAME} --clean-steps '[{"interface": "deploy", "step": "erase_devices_metadata"}]'
- Check the port.
- Enable the Nova node check function.
1nova-manage cell_v2 discover_hosts --by-service

You can run the following command to check whether the bare metal instance node is discovered by Nova.
1nova hypervisor-list