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 protected]> 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 -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to OpenStack Compute (nova). https://bugs.launchpad.net/bugs/1757273 Title: nova-compute fails to start even if [placement]/region_name is set Status in OpenStack Compute (nova): Fix Released Status in OpenStack Compute (nova) queens series: Confirmed 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: ... To manage notifications about this bug go to: https://bugs.launchpad.net/nova/+bug/1757273/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : [email protected] Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp

