Troubleshooting the Compute service

The OpenStack Compute service is one of the most significant services. It provides a hypervisor to run virtual machines.

By default, this service stores its log files for each in /var/log/nova. For example, nova-compute.log is the log for the nova-compute service. You can set the following options to format log strings for the nova.log module in the nova.conf file:

logging_context_format_string
logging_default_format_string
logging_debug_format_suffix # if debug logging is enabled

For enabling logging, include the logfile option in the nova.conf file to enable logging. Alternatively you can set use_syslog = 1 so that the nova daemon logs to syslog.

The first steps in ensuring that the Compute service is running fine is to check if all the required nova services are running:

# ps -aux | grep nova-
stack 907 0.0 0.0 92256 3680 ? Ss 04:28 0:00 nova-api-metauWSGI master
stack 919 0.0 0.1 92252 4192 ? Ss 04:28 0:00 nova-apiuWSGI master
stack 922 0.2 2.0 275992 83640 ? Ss 04:28 0:13 /usr/bin/python /usr/local/bin/nova-scheduler --config-file /etc/nova/nova.conf
stack 925 2.9 0.9 266076 40308 ? Ss 04:28 2:22 /usr/bin/python /usr/local/bin/nova-conductor --config-file /etc/nova/nova.conf
stack 946 2.9 1.1 266052 47872 ? Ss 04:28 2:21 /usr/bin/python /usr/local/bin/nova-conductor --config-file /etc/nova/nova_cell1.conf
stack 981 0.3 1.6 272192 65980 ? Ss 04:28 0:17 /usr/bin/python /usr/local/bin/nova-consoleauth --config-file /etc/nova/nova.conf
stack 1002 0.0 1.0 325360 40488 ? Ss 04:28 0:04 /usr/bin/python /usr/local/bin/nova-novncproxy --config-file /etc/nova/nova.conf --web /opt/stack/noVNC
stack 1038 0.7 3.0 1154820 124892 ? Ssl 04:28 0:37 /usr/bin/python /usr/local/bin/nova-compute --config-file /etc/nova/nova-cpu.conf
stack 1579 0.0 1.1 270212 45988 ? S 04:28 0:02 nova-api-metauWSGI worker 1
stack 1580 0.0 1.1 270212 45960 ? S 04:28 0:02 nova-api-metauWSGI worker 2
stack 1581 0.0 0.0 92256 1236 ? S 04:28 0:00 nova-api-metauWSGI http 1
stack 1584 0.3 3.8 480600 156228 ? Sl 04:28 0:14 nova-apiuWSGI worker 1
stack 1585 0.3 3.8 479224 154844 ? Sl 04:28 0:14 nova-apiuWSGI worker 2
stack 2746 0.7 2.7 286692 112396 ? S 04:29 0:34 /usr/bin/python /usr/local/bin/nova-conductor --config-file /etc/nova/nova_cell1.conf
root 2843 0.0 0.8 134940 35024 ? S 04:29 0:00 /usr/bin/python /usr/local/bin/privsep-helper --config-file /etc/nova/nova-cpu.conf --privsep_context vif_plug_ovs.privsep.vif_plug --privsep_sock_path /tmp/tmpF9F4c7/privsep.sock

This command should list the following processes:

  • nova-api
  • nova-scheduler
  • nova-conductor
  • nova-compute

If any of these essential services are not running, you can manually start them. For example, if the nova-api service is not running, you can start it by invoking the service start nova-api command or by manually starting it as follows:

# sudo -u nova nova-api --config-file=/etc/nova/nova.conf

If the preceding command fails, it will certainly provide a meaningful error message that will help in identifying the root cause.

For example, the command may fail with the following error : Address already in use. This indicates the port on which the nova-api service listens is already consumed by some other running process. To find out which process is using this port, run the following command:

# lsof -i 8774 

This command will print out the process that is using port 8774. Once you have made the necessary changes and freed up that port, you can attempt to start the nova-api service again by using the service start nova-api command.

If the command succeeds, you should now see the nova-api service running. You may confirm this by invoking:

# ps -aux | grep nova-api
stack 907 0.0 0.0 92256 3680 ? Ss 04:28 0:00 nova-api-metauWSGI master
stack 919 0.0 0.1 92252 4192 ? Ss 04:28 0:00 nova-apiuWSGI master
stack 1579 0.0 1.1 270212 45988 ? S 04:28 0:02 nova-api-metauWSGI worker 1
stack 1580 0.0 1.1 270212 45960 ? S 04:28 0:02 nova-api-metauWSGI worker 2
stack 1581 0.0 0.0 92256 1236 ? S 04:28 0:00 nova-api-metauWSGI http 1
stack 1584 0.3 3.8 480600 156228 ? Sl 04:28 0:15 nova-apiuWSGI worker 1
stack 1585 0.3 3.8 479224 154844 ? Sl 04:28 0:15 nova-apiuWSGI worker 2

A similar strategy should be used to troubleshoot the nova-scheduler service, the nova-conductor, and the nova-compute service.  In addition, if you encounter errors in the nova-scheduler.log that are related to connection to the message broker, you must also check the status of the RabbitMQ server.

We have already seen how to start and stop the RabbitMQ server in the previous sections:

# rabbitmqctl status

Let's discuss some common issues encountered with the Compute service.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.110.180