nova-compute fails to start even if [placement]/region_name is set

Bug #1757273 reported by Matt Riedemann
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Zhenyu Zheng
Queens
Fix Committed
Medium
Eric Fried

Bug Description

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, as seen here:

http://logs.openstack.org/77/554577/1/check/tempest-full-py3/df52956/controller/logs/screen-n-cpu.txt.gz#_Mar_20_15_16_30_122538

Mar 20 15:16:30.122538 ubuntu-xenial-ovh-gra1-0003080089 nova-compute[19979]: ERROR oslo_service.service [None req-19eb4465-6304-40fe-bb23-4bc7ce96f03a None None] Error starting thread.: nova.exception.PlacementNotConfigured: This compute is not configured to talk to the placement service. Configure the [placement] section of nova.conf and restart the service.
Mar 20 15:16:30.122790 ubuntu-xenial-ovh-gra1-0003080089 nova-compute[19979]: ERROR oslo_service.service Traceback (most recent call last):
Mar 20 15:16:30.122925 ubuntu-xenial-ovh-gra1-0003080089 nova-compute[19979]: ERROR oslo_service.service File "/usr/local/lib/python3.5/dist-packages/oslo_service/service.py", line 729, in run_service
Mar 20 15:16:30.123087 ubuntu-xenial-ovh-gra1-0003080089 nova-compute[19979]: ERROR oslo_service.service service.start()
Mar 20 15:16:30.123219 ubuntu-xenial-ovh-gra1-0003080089 nova-compute[19979]: ERROR oslo_service.service File "/opt/stack/nova/nova/service.py", line 162, in start
Mar 20 15:16:30.123348 ubuntu-xenial-ovh-gra1-0003080089 nova-compute[19979]: ERROR oslo_service.service self.manager.init_host()
Mar 20 15:16:30.123484 ubuntu-xenial-ovh-gra1-0003080089 nova-compute[19979]: ERROR oslo_service.service File "/opt/stack/nova/nova/compute/manager.py", line 1135, in init_host
Mar 20 15:16:30.123628 ubuntu-xenial-ovh-gra1-0003080089 nova-compute[19979]: ERROR oslo_service.service raise exception.PlacementNotConfigured()
Mar 20 15:16:30.123749 ubuntu-xenial-ovh-gra1-0003080089 nova-compute[19979]: ERROR oslo_service.service nova.exception.PlacementNotConfigured: This compute is not configured to talk to the placement service. Configure the [placement] section of nova.conf and restart the service.
Mar 20 15:16:30.123870 ubuntu-xenial-ovh-gra1-0003080089 nova-compute[19979]: ERROR oslo_service.service

From the config:

Mar 20 15:16:30.044109 ubuntu-xenial-ovh-gra1-0003080089 nova-compute[19979]: DEBUG oslo_service.service [None req-19eb4465-6304-40fe-bb23-4bc7ce96f03a None None] placement.os_region_name = None {{(pid=19979) log_opt_values /usr/local/lib/python3.5/dist-packages/oslo_config/cfg.py:2898}}
Mar 20 15:16:30.044351 ubuntu-xenial-ovh-gra1-0003080089 nova-compute[19979]: DEBUG oslo_service.service [None req-19eb4465-6304-40fe-bb23-4bc7ce96f03a None None] placement.randomize_allocation_candidates = False {{(pid=19979) log_opt_values /usr/local/lib/python3.5/dist-packages/oslo_config/cfg.py:2898}}
Mar 20 15:16:30.044612 ubuntu-xenial-ovh-gra1-0003080089 nova-compute[19979]: DEBUG oslo_service.service [None req-19eb4465-6304-40fe-bb23-4bc7ce96f03a None None] placement.region_name = RegionOne {{(pid=19979) log_opt_values /usr/local/lib/python3.5/dist-packages/oslo_config/cfg.py:2898}}

And this is the code that fails:

https://github.com/openstack/nova/blob/3fd863d8bf2fa1fc09acd08d976689462cffd2e3/nova/compute/manager.py#L1134

That needs to be changed to:

if CONF.placement.os_region_name is None and CONF.placement.region_name is None:
   ...

Changed in nova:
assignee: nobody → Zhenyu Zheng (zhengzhenyu)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/554759

Changed in nova:
status: Triaged → In Progress
Changed in nova:
assignee: Zhenyu Zheng (zhengzhenyu) → Eric Fried (efried)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/554759
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=be9854b0fdff22a72a9699a0900e53e0595bd533
Submitter: Zuul
Branch: master

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

Changed in nova:
status: In Progress → Fix Released
Matt Riedemann (mriedem)
Changed in nova:
assignee: Eric Fried (efried) → Zhenyu Zheng (zhengzhenyu)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (stable/queens)

Reviewed: https://review.openstack.org/555901
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=505ba2a74a5496ce0975a3d512bd8cdeb4e7d55c
Submitter: Zuul
Branch: stable/queens

commit 505ba2a74a5496ce0975a3d512bd8cdeb4e7d55c
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
    (cherry picked from commit be9854b0fdff22a72a9699a0900e53e0595bd533)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 17.0.2

This issue was fixed in the openstack/nova 17.0.2 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 18.0.0.0b1

This issue was fixed in the openstack/nova 18.0.0.0b1 development milestone.

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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