written by Zeljko Medic

Menum

OpenStack – Compute installation tutorial (CentOS) (Part 5/9)

After we are done with placement service install we will proceed to Compute service installation. Compute service is called nova, and this will be Train tutorial.

OpenStack Compute interacts with OpenStack Identity for authentication, OpenStack Placement for resource inventory tracking and selection, OpenStack Image service for disk and server images, and OpenStack Dashboard for the user and administrative interface.

GRANT ALL PRIVILEGES ON nova_api.* TO 'nova'@'localhost' \
IDENTIFIED BY 'NOVA_DBPASS';
GRANT ALL PRIVILEGES ON nova_api.* TO 'nova'@'%' \
IDENTIFIED BY 'NOVA_DBPASS';
GRANT ALL PRIVILEGES ON nova.* TO 'nova'@'localhost' \
IDENTIFIED BY 'NOVA_DBPASS';
GRANT ALL PRIVILEGES ON nova.* TO 'nova'@'%' \
IDENTIFIED BY 'NOVA_DBPASS';
GRANT ALL PRIVILEGES ON nova_cell0.* TO 'nova'@'localhost' \
IDENTIFIED BY 'NOVA_DBPASS';
GRANT ALL PRIVILEGES ON nova_cell0.* TO 'nova'@'%' \
IDENTIFIED BY 'NOVA_DBPASS';

Start

. admin-openrc
#or if you followed my previous tutorials you will enter
.admin-openrc.sh

!!! CAUTION There is a fault in the file – I originally just entered url on auth_uri value. That resulted in openstack-nova-api.service to fail. Change auth_uri to auth_url (change i into small L letter – I

Again as in previous parts, some values are missing in the keystone_authtoken. I added them at the bottom of keystone_authtoken part. Still not sure if this is the right way.

Back to the default part of the config. We need to enter ip address of the controller.

Service started after I changed auth_uri to auth_url in [keystone_authtoken] section of config file. I originally left it as auth_uri since I thought it is updated value, but in the end it is just incorrect. Issue was quickly resolved by looking into /var/log/nova/nova-api.log and correcting the problem.

Install and configure Compute Node

This part is done on the Compute Node of the LAB. A little bit of c/p from OpenStack documentation – The service supports several hypervisors to deploy instances or virtual machines (VMs). For simplicity, this configuration uses the Quick EMUlator (QEMU) hypervisor with the kernel-based VM (KVM) extension on compute nodes that support hardware acceleration for virtual machines. On legacy hardware, this configuration uses the generic QEMU hypervisor. You can follow these instructions with minor modifications to horizontally scale your environment with additional compute nodes.

I’m doing this part on VMware Fusion, so, before we dive into installation, make sure that under your VM settings, under Processors & Memory | expand Advanced options and “Enable hypervisor applications in this virtual machine”

If you are using virtualization on some other platform, make sure you enable nested virtualization.

Installation

sudo yum install openstack-nova-compute

Next step will be some editing again – /etc/nova/nova.conf, but this time on Compute node.

In case nova-compute service fails to start check /var/log/nova/nova-compute.log. If you get error 5672 is unreachable, open firewall port for 5672 on controller node (I covered that during installation part)

Add compute node to the cell database

This step is done on controller node.

. admin-openrc
or if you done previos parts with my tutorials
. admin-openrc.sh

We need to confirm that we have compute hosts in database

openstack compute service list --service nova-compute

Discover compute hosts

su -s /bin/sh -c "nova-manage cell_v2 discover_hosts --verbose" nova

When you add new compute nodes, you must run nova-manage cell_v2 discover_hosts on the controller node to register those new compute nodes. Alternatively, you can set an appropriate interval in /etc/nova/nova.conf:

[scheduler]
discover_hosts_in_cells_interval = 300

Verify Operation

We will do this from controller node

Again, first admin credentials

. admin-openrc
or if you done previos parts with my tutorials
. admin-openrc.sh

List service components to verify successful launch and registration of each process:

openstack compute service list

This is how it should look like, two internal controller components and one compute.

List API endpoints in the Identity service to verify connectivity with the Identity service:

openstack catalog list

List images in the Image service to verify connectivity with the Image service

openstack image list

I’m getting following – OK

If you have any problems with glance service, logs are at the /var/log/glance/api.log.

Check the cells and placement API are working successfully and that other necessary prerequisites are in place:

nova-status upgrade check

This command was not success at first. I got 403 error.

nova-status upgrade check forbidden (HTTP 403)

You can troubleshoot by visiting /var/log/placement/placement.log

This error is specific to CentOS / RHEL installations. Solution was part of tutorial for Queen release, but since then it disappeared from installation tutorials, but is still needed even on Train.

Also, make sure that in the /etc/placement/placement.conf under keystone_authtoken section your auth_url is named – auth_url, not auth_uri. auth_uri is wrong, and you will get error 500 after this one.