Rate This Document
Findability
Accuracy
Completeness
Readability

Configuring the Bare Metal Instance Management Node

Perform the following operations on the controller node.

  1. Add resource scheduling information.
    1. 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.
      1
      openstack --os-baremetal-api-version 1.21 baremetal node set ${BM_NAME} --resource-class $CLASS_NAME
      

      CLASS_NAME can be customized.

    2. After the configuration is complete, you can run the following command to check the configuration:
      1
      openstack 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.

      1
      openstack baremetal node set $NODE_UUID --property capabilities=key1:val1,key2:val2
      
  2. Configure the matched hardware information.
    1
    openstack 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:

    1
    openstack 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.

  3. Verify the management node configuration.
    1
    openstack 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.

  4. 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:

    1
    openstack baremetal --os-baremetal-api-version 1.11 node manage  ${BM_NAME}
    

    You can run the following command to view the state:

    1
    openstack baremetal --os-baremetal-api-version 1.31 node show ${BM_NAME} --fields name provision_state
    

  5. Optional: Check hardware and collect hardware information.

    If the hardware check and driver configuration are complete, perform the following operations to collect hardware information:

    1. Enable the inspector-dnsmasq service.
      1
      systemctl start openstack-ironic-inspector-dnsmasq
      
    2. Start check.
      1
      openstack 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:

      1
      watch -d -n 1 "openstack baremetal node list"
      

      The value of Provisioning State for the management node changes as follows: manageable -> inspecting wait -> manageable.

    3. After the check is complete, you can view the hardware information.
      1
      openstack 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.

    4. Stop the inspector-dnsmasq service.
      1
      systemctl stop openstack-ironic-inspector-dnsmasq
      
  6. Optional: Configure console information.

    Set the console interface.

    1
    openstack --os-baremetal-api-version 1.31 baremetal node set ${BM_NAME} --console-interface ipmitool-socat
    

    Set the console port.

    1
    openstack 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.

    1
    openstack baremetal node console enable ${BM_NAME}
    

    View the console information.

    1
    openstack baremetal node console show ${BM_NAME}
    
  7. Enable the management node to enter the available state.
    1. Check the port.
      1
      openstack 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
    2. Enable the management node to enter the available state.
      1
      openstack 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.

    3. 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:
      1
      watch -d -n 1 "openstack baremetal node list"
      

      The value of Provisioning State for the configured management node changes as follows: manageable -> cleaning -> clean wait -> available.

    4. If the management node is in the clean wait state for a long time, run the following command to stop the clean state:
      1
      openstack 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:

      1
      openstack 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:

    1. If the value of Maintenance status for the management node is True, run the following command to cancel the maintenance status:
      1
      openstack baremetal node maintenance unset ${BM_NAME}
      
    2. 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
      
    3. 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.
    4. (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.

      1
      openstack baremetal --os-baremetal-api-version 1.15 node clean ${BM_NAME} --clean-steps '[{"interface": "deploy", "step": "erase_devices_metadata"}]'
      
  8. Enable the Nova node check function.
    1
    nova-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.

    1
    nova hypervisor-list