service fails when deprecated 'os_region_name' is not configured in [placement]

Bug #1761150 reported by Annie Melen
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
New
Undecided
Unassigned

Bug Description

Hello!
I've encountered the bug when configuring nova-compute service on new node:
...
2018-04-04 14:55:42.082 41113 INFO nova.service [req-be886a45-032a-441b-8934-0d586d159edb - - - - -] Starting compute node (version 17.0.1)
2018-04-04 14:55:42.083 41113 ERROR oslo_service.service [req-be886a45-032a-441b-8934-0d586d159edb - - - - -] Error starting thread.: PlacementNotConfigured: This compute is not configured to talk to the placement service. Configure the [placement] section of nova.conf and restart the service.
2018-04-04 14:55:42.083 41113 ERROR oslo_service.service Traceback (most recent call last):
2018-04-04 14:55:42.083 41113 ERROR oslo_service.service File "/usr/lib/python2.7/dist-packages/oslo_service/service.py", line 729, in run_service
2018-04-04 14:55:42.083 41113 ERROR oslo_service.service service.start()
2018-04-04 14:55:42.083 41113 ERROR oslo_service.service File "/usr/lib/python2.7/dist-packages/nova/service.py", line 161, in start
2018-04-04 14:55:42.083 41113 ERROR oslo_service.service self.manager.init_host()
2018-04-04 14:55:42.083 41113 ERROR oslo_service.service File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 1137, in init_host
2018-04-04 14:55:42.083 41113 ERROR oslo_service.service raise exception.PlacementNotConfigured()
2018-04-04 14:55:42.083 41113 ERROR oslo_service.service PlacementNotConfigured: This compute is not configured to talk to the placement service. Configure the [placement] section of nova.conf and restart the service.
...

Steps to reproduce
------------------
1. Install and configure nova on controller node, make sure that all nova services are running correctly
2. Configure nova on compute node:
   follow Queens Series Release Notes (https://docs.openstack.org/releasenotes/nova/queens.html), in [placement] comment out deprecated 'os_region_name' and configure 'region_name'
3. Restart nova-compute service

Expected result
------------------
Nova-compute service started and running without errors

Actual result
------------------
Nova-compute service failed with PlacementNotConfigured error

Workaround
------------------
1. Comment out 'region_name' in [placement] and configure deprecated 'os_region_name':
   [placement]
   os_region_name = RegionOne
   auth_type = password
   auth_url =
   project_name = service
   project_domain_name = default
   username = placement
   user_domain_name = default
   password =
   #region_name = RegionOne
2. Restart nova-compute service, сheck your log
...
2018-04-04 15:08:59.684 41544 INFO nova.compute.resource_tracker [req-58502787-deca-4c5a-b4b9-8c9f59531720 - - - - -] Compute node record created for compute01-api:compute01.demo.infra.cloud.loc with uuid: d2d36c03-e597-4831-84f6-03c78f331354
2018-04-04 15:09:07.380 41544 INFO nova.scheduler.client.report [req-58502787-deca-4c5a-b4b9-8c9f59531720 - - - - -] [req-9a468e08-7eaa-4f91-a8d9-dca8bbad3b8f] Created resource provider record via placement API for resource provider with UUID d2d36c03-e597-4831-84f6-03c78f331354 and name compute01.demo.infra.cloud.loc.
2018-04-04 15:09:15.774 41544 INFO nova.compute.resource_tracker [req-58502787-deca-4c5a-b4b9-8c9f59531720 - - - - -] Final resource view: name=compute01.demo.infra.cloud.loc phys_ram=257004MB used_ram=512MB phys_disk=243174GB used_disk=0GB total_vcpus=48 used_vcpus=0 pci_stats=[]
...

My Environment
------------------
Ubuntu 16.04.4 LTS, 4.4.0-116-generic
Openstack Queens Release
Nova 17.0.1-0ubuntu1

Annie Melen (anniemelen)
description: updated
Revision history for this message
jichenjc (jichenjc) wrote :

should this fix your bug?

commit be9854b0fdff22a72a9699a0900e53e0595bd533
Author: Kevin_Zheng <email address hidden>
Date: Wed Mar 21 09:43:21 2018 +0800

    Change compute mgr placement check to region_name

    Change https://review.openstack.org/#/c/492247/ in queens deprecated the
    [placement]/os_region_name config option and you should be using
    'region_name' in that group now, and you'll get a deprecation warning if
    using 'os_region_name', but if you do that, nova-compute fails to start.

    This patch fix the bug by adding [placement]/region_name to the check.

    Change-Id: Iea7d5d0d6907adbcb236dc43b5af7469de2ba78b
    Closes-Bug: #1757273

Revision history for this message
jichenjc (jichenjc) wrote :
Revision history for this message
Annie Melen (anniemelen) wrote :

I haven't seen this bug before (https://bugs.launchpad.net/nova/+bug/1757273)... It seems exactly what I asked for, thanks!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.