Ask Your Question
4

How to configure Placement Service for Compute Node on Ocata

asked 2017-02-03 08:13:28 -0500

Karthik Prasad gravatar image

I'm trying to setup Multi Node Openstack Env by installing individual service with master branch(ocata). However when I try to setup compute node, compute service fails to start after configuration as per installation guide With Error Placement Section Not Configured in Nova.conf file., After going through Recent Newton docuement Placement Service was introduced in Newton, Which was upgraded in Ocata. However I don't find any documentation explaining how to configure Placement section in Nova.conf, Though there are doccuements explaining the placement REST API introduced in Newton. Please let me know if anybody has configured Ocata Placement Section.

Appreciate Any help, Thanks in Advance.

edit retag flag offensive close merge delete

Comments

Hi all,

I'm also facing the same issue but i was installed through devstack's latest master branch

Kindly give me some directions to resolve this issue

vishnu430 gravatar imagevishnu430 ( 2017-02-23 04:15:19 -0500 )edit

Hi, Still I got struck with this issue. Kindky share your views

Appreciate any help, Thanks in advance

vishnu430 gravatar imagevishnu430 ( 2017-02-23 23:56:40 -0500 )edit
2

@vishnu430 For devstack please add enable_service placement-api in local.conf

Karthik Prasad gravatar imageKarthik Prasad ( 2017-02-28 03:30:25 -0500 )edit

5 answers

Sort by ยป oldest newest most voted
7

answered 2017-02-10 03:26:23 -0500

Karthik Prasad gravatar image

updated 2017-02-28 03:32:06 -0500

For Future Reference

With ocata placement service is mandatory and placement service is part of nova that could be deployed independently. Here are the steps I followed.

  1. Install the placement package. [If you already had installed nova, I would suggest to take backup of nova.conf, as installation would override nova.conf, once installation is completed replace it with the backup.

    sudo apt install nova-placement-api
    
  2. Create user placement.

    openstack user create --domain default --password-prompt placement
    
  3. Add the user placement to project service with admin role

     openstack role add --project service --user placement admin
    
  4. Create a service catalog of type placement

    openstack service create --name placement --description "OpenStack Placement" placement
    
  5. Create endpoint

    openstack endpoint create --region RegionOne placement \
                      public http://<ip_of_placement_service_host>:8780
    openstack endpoint create --region RegionOne placement \
                      admin http://<ip_of_placement_service_host>:8780
    openstack endpoint create --region RegionOne placement \
                      internal http://<ip_of_placement_service_host>:8780
    

    NOTE: The Port is different one I had configured here, default port is not 8780, I dont remember right now, its better to check in /etc/apache2/sites-enabled/placement-api.conf placement configuration.

  6. Update /etc/nova/nova.conf with credentials in placement section

    os_region_name = RegionOne
    project_domain_name = Default
    project_name = service
    user_domain_name = Default
    password = placement
    username = mypassword
    auth_url = http://controller:35357/v3
    auth_type = password
    
  7. Update database configuration, since placement service is part of nova_api provide database connection details in placement_database section

    connection=mysql+pymysql://nova:<nova_password>@controller/nova_api
    
  8. Restart apache2 and nova services.


In case of devstack you can enable the placement service by adding enable_service placement-api

to local.conf

Configuration of Cells

Once I installed Placement, nova boot started failing again with same error, but this time the error message was related to cells. I'm not sure if cells is made mandatory in ocata. even though I tried to disable by explicitly setting enable=false in cells sections it still complained saying no cells to host mapping configured. I ended up configuring cells as well. Here are the steps I followed.

  1. Login to database and create nova_cell0 database and give permission similar to that of nova_api

      create database nova_cell0;
      GRANT ALL PRIVILEGES ON nova_cell0.* TO 'nova'@'%'  IDENTIFIED BY '<password>';
      GRANT ALL PRIVILEGES ON nova_cell0.* TO 'nova'@'localhost'  IDENTIFIED BY '<password>';
    
  2. Execute following commands.

       su -s /bin/sh -c "nova-manage cell_v2 map_cell0"  nova
       nova-manage db sync
       nova-manage cell_v2 create_cell
    
  3. Make sure all the hyperivisor(compute nodes) are connected and then execute bellow command.

       nova-manage cell_v2 discover_hosts
    

    For further information on cells installation please refer here

edit flag offensive delete link more

Comments

Hello,Is ther any step for Cenos,I have try these step on Centos 7 and get ERROR log
AH01630: client denied by server configuration: /usr/bin/nova-placement-api
event I add "Require all granted" to file 00-nova-placement-api.conf

hb.deng gravatar imagehb.deng ( 2017-02-26 04:25:28 -0500 )edit

Check with which user apache2 is running and change the ownership of the file to the user on which apache2 is running.

Karthik Prasad gravatar imageKarthik Prasad ( 2017-02-28 03:34:07 -0500 )edit

Thanks so much for this! I found this very helpful when testing Ocata to see if we would upgrade. :D

csuttles gravatar imagecsuttles ( 2017-03-02 15:33:38 -0500 )edit

Cells v2 (sic!) are mandatory in Ocata. The thing you can explicitly enable/disable are cells v1. v1 and v2 must not be confused. Also, placement may be/may have been a part of nova_api, but the general intention is to have its own placement db, see http://bit.ly/2mgVsrn

HumongousRainDrop gravatar imageHumongousRainDrop ( 2017-03-07 04:21:29 -0500 )edit

When I hear of access problems with Centos and RHEL, I immediately think SELinux. Perhaps this is what causes hb.deng's woes?

Bernd Bausch gravatar imageBernd Bausch ( 2017-03-08 20:16:38 -0500 )edit
3

answered 2017-02-03 08:36:29 -0500

updated 2017-02-07 03:12:56 -0500

Hi Karthik,

nova.conf need this part of code:

[placement]
auth_type = password
auth_url = http://controller:35357
username = placement
password = placement_password
user_domain_name = default
project_name = service
project_domain_name = default
os_region_name = regionOne

Also will need to configure placement wsgi in apache.

Create placement user and endpoint in port 8780 with service type "placement".

http://docs.openstack.org/developer/n...

Regards

edit flag offensive delete link more

Comments

Thank you for the answer, tested it worked

Karthik Prasad gravatar imageKarthik Prasad ( 2017-02-05 11:32:01 -0500 )edit

Hi After Launching I get "No authentication information found for placement API" I updated the configuration in /etc/nova/nova.conf both in controller as well as compute, because of which not able to launch VM as it returns "Filter RetryFilter returned 0 hosts"

Karthik Prasad gravatar imageKarthik Prasad ( 2017-02-06 03:37:15 -0500 )edit

Updated the question, forgot to say that an endpoint is needed.

Eduardo Gonzalez gravatar imageEduardo Gonzalez ( 2017-02-07 03:12:33 -0500 )edit

Hi Eduardo, thanks for your valuable inputs, The most important part installing placement-api was missing. I tried to create site using wsgi.py file present in placement-api which was failing modified the code, still it was failing, finally figured out there was nova-placement-api package.

Karthik Prasad gravatar imageKarthik Prasad ( 2017-02-10 03:29:58 -0500 )edit

Precisely what I needed! Thank you! BTW, the default endpoint port is 8778... ;-)

ThiagoCMC gravatar imageThiagoCMC ( 2017-02-10 23:41:00 -0500 )edit
0

answered 2017-03-08 05:02:49 -0500

Jared gravatar image

I encountered following problems, how could I fix the issue.

2017-03-08 18:58:41.789 20375 ERROR nova.scheduler.client.report [req-97db4cc6-0e76-4718-8fbd-8918ed7d2c1a - - - - -] Failed to create resource provider record in placement API for UUID 750fd413-a78a-4424-8fb8-caa5f986a3b4. Got 403: <html><head> <title>403 Forbidden</title> </head><body>

Forbidden

You don't have permission to access /resource_providers on this server.

</body></html> 2017-03-08 18:58:41.790 20375 WARNING nova.scheduler.client.report [req-97db4cc6-0e76-4718-8fbd-8918ed7d2c1a - - - - -] Unable to refresh my resource provider record

edit flag offensive delete link more

Comments

I fixed the problem by adding the following content to /etc/httpd/conf.d/00-nova-placement-api.conf. <directory usr="" local="" bin="" placement=""> Require all granted </directory>

And " /usr/local/bin/placement" is where nova-placement-api is located.

Jared gravatar imageJared ( 2017-03-08 20:33:54 -0500 )edit
0

answered 2017-06-03 05:32:07 -0500

After change os_region_name in placement section to RegionOne for all Controller and Compute in /etc/nova/nova.conf, the problem is successfully solved.

edit flag offensive delete link more
0

answered 2017-04-26 15:46:11 -0500

prakashrao gravatar image

updated 2017-04-26 16:00:40 -0500

i followed Ocata installation guide for ubuntu for a multi node environment-1 controller node and 2 compute nodes.Initially placement api check was failure but on changing placment endpoints to use http://controller:8778 instead of htttp://controller/placement i see that placement api check on controller node is now succesful.But check for resource providers is failing and i see "placement api not found error" on compute nodes.I have [placement] section on compute node but not sure why is this happening

Controller Node

    root@perfcontroller:~# nova-status upgrade check

+-------------------------------------------------------------------+ | Upgrade Check Results | +-------------------------------------------------------------------+ | Check: Cells v2 | | Result: Success | | Details: None | +-------------------------------------------------------------------+ | Check: Placement API | | Result: Success | | Details: None | +-------------------------------------------------------------------+ | Check: Resource Providers | | Result: Warning | | Details: There are no compute resource providers in the Placement | | service but there are 2 compute nodes in the deployment. | | This means no compute nodes are reporting into the | | Placement service and need to be upgraded and/or fixed. | | See | | http://docs.openstack.org/developer/nova/placement.html (http://docs.openstack.org/developer/n...) | | for more details. | +-------------------------------------------------------------------+

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Compute Node nova-compute.log

17-04-26 13:11:06.795 17293 INFO nova.servicegroup.drivers.db [-] Recovered from being unable to report status. 2017-04-26 13:11:06.796 17293 WARNING oslo.service.loopingcall [-] Function 'nova.servicegroup.drivers.db.DbDriver._report_state' run outlasted interval by 128.03 sec 2017-04-26 13:11:06.799 17293 INFO oslo.messaging._drivers.impl_rabbit [-] [9665c296-5693-4532-8d54-faa55db265a8] Reconnected to AMQP server on perfcontroller:5672 via [amqp] client with port 35770. 2017-04-26 13:11:06.906 17293 INFO nova.compute.manager [req-7e8b5070-f389-4637-b906-305e5a6cb8d0 - - - - -] Bandwidth usage not supported by hypervisor. 2017-04-26 13:11:11.389 17293 WARNING nova.scheduler.client.report [req-7e8b5070-f389-4637-b906-305e5a6cb8d0 - - - - -] The placement API endpoint not found. Placement is optional in Newton, but required in Ocata. Please enable the placement service before upgrading. 2017-04-26 13:11:11.390 17293 WARNING nova.scheduler.client.report [req-7e8b5070-f389-4637-b906-305e5a6cb8d0 - - - - -] Unable to refresh my resource provider record 2017-04-26 13:11:11.443 17293 INFO nova.compute.resource_tracker [req-7e8b5070-f389-4637-b906-305e5a6cb8d0 - - - - -] Final resource view: name=perfcompute2 phys_ram=128826MB used_ram=512MB phys_disk=789GB used_disk=0GB total_vcpus=32 used_vcpus=0 pci_stats=[] 2017-04-26 13:12:06.997 17293 WARNING nova.scheduler.client.report [req-7e8b5070-f389-4637-b906-305e5a6cb8d0 - - - - -] Unable to refresh my resource provider record 2017-04-26 13:12:07.077 17293 INFO nova.compute.resource_tracker [req-7e8b5070-f389-4637-b906-305e5a6cb8d0 - - - - -] Final resource view: name=perfcompute2 phys_ram=128826MB used_ram=512MB phys_disk=789GB used_disk=0GB total_vcpus=32 used_vcpus=0 pci_stats=[] 2017-04-26 13:13:05.354 17293 INFO oslo_messaging._drivers.amqpdriver [-] No calling threads waiting for msg_id : 89b267fb704849c99a74570d0ecb2366 2017-04-26 13:13:05.385 17293 INFO oslo_messaging._drivers.amqpdriver [-] No calling threads waiting for msg_id : b99ef61861694e3c9d9dfe9962962a33 2017-04-26 13:13:09.029 17293 WARNING nova.scheduler.client.report [req-7e8b5070-f389-4637-b906-305e5a6cb8d0 - - - - -] Unable to refresh my resource provider record 2017-04-26 13:13:09.106 17293 INFO nova.compute.resource_tracker [req-7e8b5070-f389-4637-b906-305e5a6cb8d0 - - - - -] Final resource view: name=perfcompute2 phys_ram=128826MB used_ram=512MB phys_disk=789GB used_disk=0GB total_vcpus=32 used_vcpus=0 pci_stats=[]

nov.conf from compute node

[placement]
os_region_name = RegionOne
project_domain_name = Default
project_name = service
user_domain_name = Default
auth_url = http://perfcontroller:35357/v3
auth_type = password
username = placement
 password = Welcome123

These are the errors i see ... (more)

edit flag offensive delete link more

Comments

Try this...check nova.conf in compute node, if os_region_name = openstack is enables, disable it by adding hash #os_region_name = openstack

Then restart NOVA service: service nova-compute restart,

Validate again: nova-status upgrade check

Rajab gravatar imageRajab ( 2017-07-16 06:50:40 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

4 followers

Stats

Asked: 2017-02-03 08:13:28 -0500

Seen: 23,506 times

Last updated: Apr 26 '17