Chapter 4. Troubleshoot Bare Metal Provisioning
The following sections contain information and steps that may be useful for diagnosing issues in a Bare Metal Provisioning setup.
Bare Metal Provisioning with inspection uses four services: openstack-ironic-api, openstack-ironic-conductor, openstack-ironic-inspector, and openstack-ironic-inspector-dnsmasq. Logs for most OpenStack components can be found in the /var/log directory.
4.1. Troubleshoot PXE Boot Errors Copy linkLink copied to clipboard!
Permission Denied Errors
If you are getting a permission denied error on the console of your Bare Metal Provisioning node, make sure you applied the appropriate SELinux content to the /httpboot
and /tftpboot
directories as follows:
semanage fcontext -a -t httpd_sys_content_t "/httpboot(/.*)?" semanage fcontext -a -t tftpdir_t "/tftpboot(/.*)?"
# semanage fcontext -a -t httpd_sys_content_t "/httpboot(/.*)?"
# semanage fcontext -a -t tftpdir_t "/tftpboot(/.*)?"
Boot Process Freezes at /pxelinux.cfg/XX-XX-XX-XX-XX-XX
On the console of your node, if it looks like you are getting an IP address and then the process stops as shown below:
This indicates that you might be using the wrong PXE boot template in your ironic.conf
file.
grep ^pxe_config_template ironic.conf
# grep ^pxe_config_template ironic.conf
pxe_config_template=$pybasedir/drivers/modules/ipxe_config.template
The default template is pxe_config.template
, so it is easy to miss the i to turn this into ipxe_config.template
.
4.2. Troubleshoot Login Errors After the Bare Metal Node Boots Copy linkLink copied to clipboard!
When you try to log in at the login prompt on the console of the node with the root
password that you set in the configurations steps, but are not able to, it indicates you are not booted in to the deployed image. You are probably stuck in the deploy-kernel/deploy-ramdisk
image and the system has yet to get the correct image.
To fix this issue, verify the PXE Boot Configuration file in the /httpboot/pxelinux.cfg/MAC_ADDRESS
on the Compute or Bare Metal Provisioning node and ensure that all the IP addresses listed in this file correspond to IP addresses on the Bare Metal Provisioning Network.
The only network the Bare Metal Provisioning node knows about is the Bare Metal Provisioning Network. If one of the endpoints is not on the network, the endpoint will not be able to reach the Bare Metal Provisioning node as a part of the boot process.
For example, the kernel line in your file is as follows:
kernel http://192.168.200.2:8088/5a6cdbe3-2c90-4a90-b3c6-85b449b30512/deploy_kernel selinux=0 disk=cciss/c0d0,sda,hda,vda iscsi_target_iqn=iqn.2008-10.org.openstack:5a6cdbe3-2c90-4a90-b3c6-85b449b30512 deployment_id=5a6cdbe3-2c90-4a90-b3c6-85b449b30512 deployment_key=VWDYDVVEFCQJNOSTO9R67HKUXUGP77CK ironic_api_url=http://192.168.200.2:6385 troubleshoot=0 text nofb nomodeset vga=normal boot_option=netboot ip=${ip}:${next-server}:${gateway}:${netmask} BOOTIF=${mac} ipa-api-url=http://192.168.200.2:6385 ipa-driver-name=pxe_ssh boot_mode=bios initrd=deploy_ramdisk coreos.configdrive=0 || goto deploy
kernel http://192.168.200.2:8088/5a6cdbe3-2c90-4a90-b3c6-85b449b30512/deploy_kernel selinux=0 disk=cciss/c0d0,sda,hda,vda iscsi_target_iqn=iqn.2008-10.org.openstack:5a6cdbe3-2c90-4a90-b3c6-85b449b30512 deployment_id=5a6cdbe3-2c90-4a90-b3c6-85b449b30512 deployment_key=VWDYDVVEFCQJNOSTO9R67HKUXUGP77CK ironic_api_url=http://192.168.200.2:6385 troubleshoot=0 text nofb nomodeset vga=normal boot_option=netboot ip=${ip}:${next-server}:${gateway}:${netmask} BOOTIF=${mac} ipa-api-url=http://192.168.200.2:6385 ipa-driver-name=pxe_ssh boot_mode=bios initrd=deploy_ramdisk coreos.configdrive=0 || goto deploy
Value in the above example kernel line | Corresponding information |
---|---|
http://192.168.200.2:8088 |
Parameter |
5a6cdbe3-2c90-4a90-b3c6-85b449b30512 |
UUID of the baremetal node in |
deploy_kernel |
This is the deploy kernel image in the Image service that is copied down as |
http://192.168.200.2:6385 |
Parameter |
pxe_ssh | The IPMI Driver in use by the Bare Metal Provisioning service for this node. |
deploy_ramdisk |
This is the deploy ramdisk image in the Image service that is copied down as |
If any of these values do not correspond between the /httpboot/pxelinux.cfg/MAC_ADDRESS
and the ironic.conf
file, you need to update them in the ironic.conf
file and restart the Bare Metal Provisioning service and then re-deploy the Bare Metal Provisioning node.
4.3. Troubleshoot the Bare Metal Provisioning Service Not Getting the Right Hostname Copy linkLink copied to clipboard!
If your Bare Metal Provisioning system is not getting the right hostname, it means that cloud-init
is failing. To fix this, connect the Bare Metal Provisioning subnet to a router in the OpenStack Networking service. The requests to the meta-data agent should now be routed correctly.
4.4. Troubleshoot Invalid OpenStack Identity Service Credentials When Executing Bare Metal Provisioning Commands Copy linkLink copied to clipboard!
If you are having trouble authenticating to the Identity service, check the identity_uri
parameter in the ironic.conf
file and make sure you remove the /v2.0
from the keystone
AdminURL. For example, identity_uri
should be set to http://IP:PORT
.
4.5. Troubleshoot Hardware Enrollment Copy linkLink copied to clipboard!
Issues with enrolled hardware can be caused by incorrect node registration details. Ensure that property names and values have been entered correctly. Incorrect or mistyped property names will be successfully added to the node’s details, but will be ignored.
Update a node’s details. This example updates the amount of memory the node is registered to use to 2 GB:
ironic node-update NODE_UUID replace properties/memory_mb=2048
# ironic node-update NODE_UUID replace properties/memory_mb=2048
4.6. Troubleshoot No Valid Host Errors Copy linkLink copied to clipboard!
If the Compute scheduler cannot find a suitable Bare Metal Provisioning node on which to boot an instance, a NoValidHost
error can be seen in /var/log/nova/nova-conductor.log or immediately upon launch failure in the dashboard. This is usually caused by a mismatch between the resources Compute expects and the resources the Bare Metal Provisioning node provides.
Check the hypervisor resources that are available:
nova hypervisor-stats
# nova hypervisor-stats
Copy to Clipboard Copied! Toggle word wrap Toggle overflow The resources reported here should match the resources that the Bare Metal Provisioning nodes provide.
Check that Compute recognizes the Bare Metal Provisioning nodes as hypervisors:
nova hypervisor-list
# nova hypervisor-list
Copy to Clipboard Copied! Toggle word wrap Toggle overflow The nodes, identified by UUID, should appear in the list.
Check the details for a Bare Metal Provisioning node:
ironic node-list ironic node-show NODE_UUID
# ironic node-list # ironic node-show NODE_UUID
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Verify that the node’s details match those reported by Compute.
Check that the selected flavor does not exceed the available resources of the Bare Metal Provisioning nodes:
nova flavor-show FLAVOR_NAME
nova flavor-show FLAVOR_NAME
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Check the output of ironic node-list to ensure that Bare Metal Provisioning nodes are not in maintenance mode. Remove maintenance mode if necessary:
ironic node-set-maintenance NODE_UUID off
# ironic node-set-maintenance NODE_UUID off
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Check the output of ironic node-list to ensure that Bare Metal Provisioning nodes are in an
available
state. Move the node toavailable
if necessary:ironic node-set-provision-state NODE_UUID provide
# ironic node-set-provision-state NODE_UUID provide
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
4.7. Troubleshoot Hardware Inspection Copy linkLink copied to clipboard!
Hardware inspection can fail on Bare Metal Provisioning nodes in the available
provision state.
Check the provision state for all nodes:
ironic node-list
# ironic node-list
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Move a node from
available
tomanageable
before starting inspection:ironic node-set-provision-state NODE_UUID manage
# ironic node-set-provision-state NODE_UUID manage
Copy to Clipboard Copied! Toggle word wrap Toggle overflow