Overcoming the Placement Service Hurdle in OpenStack: A Step-by-Step Solution

Overcoming the Placement Service Hurdle in OpenStack: A Step-by-Step Solution

When attempting to start the nova-compute service in an OpenStack installation, users often encounter the PlacementNotConfigured error, indicating that the compute node is not configured to communicate with the placement service. This issue arises from the lack of documentation on installing the openstack-nova-placement-api component. In this article, we will outline the necessary installation steps to resolve this problem.

Installation Steps

To rectify the situation, follow these steps:

  1. Install the Placement Service on the Control Node

    On the control node, install the openstack-nova-placement-api package using the following command:

    yum install openstack-nova-placement-api
    

    Next, create the placement service using the openstack service create command:

    openstack service create --name placement --description "OpenStack Placement" placement
    

    Create three endpoints for the placement service:

    openstack endpoint create --region RegionOne placement public http://<ip>:8778
    openstack endpoint create --region RegionOne placement admin http://<ip>:8778
    openstack endpoint create --region RegionOne placement internal http://<ip>:8778
    

    Finally, restart the httpd service to apply the changes:

    systemctl restart httpd
    
  2. Configure the Compute Node

    On the compute node, edit the /etc/nova/nova.conf file to include the placement service configuration. Specifically, add the following lines:

    [placement]
    auth_uri = http://controller:5000
    auth_url = http://controller:35357
    memcached_servers = controller:11211
    auth_type = password
    project_domain_name = default
    user_domain_name = default
    project_name = service
    username = nova
    password = *******
    os_region_name = RegionOne
    

    Restart the openstack-nova-compute service to apply the changes:

    systemctl restart openstack-nova-compute.service
    

By following these steps, you should be able to resolve the PlacementNotConfigured error and successfully start the nova-compute service in your OpenStack installation.