Checking OpenStack Compute services

Now that we have OpenStack Compute installed, we need to ensure what we have configured is what we expect. OpenStack Compute provides tools to check various parts of our environment. We’ll also use common system commands to check whether the other underlying services that support our OpenStack Compute environment are running as expected.

Getting ready

Log in to the OpenStack controller node. If you used Vagrant to create this node, log in to it using the following command:

vagrant ssh controller

How to do it...

To check whether the OpenStack Compute services are running, we invoke the nova-manage tool and ask it various questions of the environment as follows:

  1. To check whether the OpenStack Compute hosts are running OK, use the following command:
    sudo nova-manage service list
    

    You will see the following output:

    How to do it...

    The :-) icons are indicative that everything is fine.

  2. If you see XXX where the :-) icon should be, then you have a problem.
    How to do it...

    If you do see XXX, then the answer will be in the logs at /var/log/nova/.

    Tip

    If you get intermittent XXX and :-) icons for a service, first check whether the clocks are in sync.

  3. Glance doesn’t have a tool to check, so we can use some system commands instead:
    ps -ef | grep glance
    netstat -ant | grep 9292.*LISTEN
    

    These should return process information for Glance to show it is running and 9292 is the default port that should be open in the LISTEN mode on your server ready for use.

  4. Other services that you should check are as follows:
    • Check rabbitmq with the following command:
      sudo rabbitmqctl status
      
    • Here is an example output from rabbitmqctl when everything is running OK:
      How to do it...
    • You can check NTP with the following command:
      ntpq -p
      
    • It should return output about contacting NTP servers, as shown here:
      How to do it...
    • You can check the MySQL database server with the following command:
      MYSQL_ROOT_PASS=openstack
      mysqladmin –uroot –p{$MYSQL_ROOT_PASS} status
      
    • This will return some basic statistics about MySQL, if it is running:
    How to do it...

How it works...

We have used some basic commands that communicate with OpenStack Compute and other services to show they are running. This elementary level of troubleshooting ensures you have the system running as expected:

  • sudo nova-manage service list: This lists Nova services and their respective statuses
  • ps -ef | grep glance: This lists the running Glance services
  • netstat -ant | grep 9292.*LISTEN: This allows you to check whether the glance daemon is listening on the network
  • sudo rabbitmqctl status: This allows you to validate that the rabbitMQ services are running
  • ntpq -p: This confirms whether NTP is functional and connecting to the configured remote servers
  • mysqladmin -uroot -p{$MYSQL_ROOT_PASS} status: This returns basic information about the MySQL process
..................Content has been hidden....................

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