commit 7732f0e6f3691025a06f2abfc5a57c71d83e5e72
Author: Matt Riedemann <email address hidden>
Date: Wed Aug 7 12:23:15 2019 -0400
Add useful error log when _determine_version_cap raises DBNotAllowed
Change Icddbe4760eaff30e4e13c1e8d3d5d3f489dac3c4 was intended for the
API service to check all cells for the minimum nova-compute service
version when [upgrade_levels]/compute=auto.
That worked in the gate with devstack because we don't configure
nova-compute with access to the database and run nova-compute with
a separate nova-cpu.conf so even if nova-compute is on the same
host as the nova-api service, they aren't using the same config
file (nova-api runs with nova.conf which has access to the API DB
obviously).
The problem is when nova-compute is configured with
[upgrade_levels]/compute=auto and an [api_database]/connection,
there are flows that can try to hit the API database directly
because of the _determine_version_cap method. For example, the
_sync_power_states periodic task trying to stop an instance,
or even simple inter-compute communication over RPC like during
a resize.
This change simply catches the DBNotAllowed exception, logs a more
useful error message, and re-raises the exception. In addition,
the config help for the [api_database] group and "configuration"
option specifically are updated to mention they should not be set
on the nova-compute service.
Change-Id: Iac2911a7a305a9d14bc6dadb364998f3ecb9ce42
Related-Bug: #1807044
Closes-Bug: #1839360
(cherry picked from commit 7d7d58509d5e60ec19c6310931dc62eeff033595)
(cherry picked from commit bd03723a0c1a16d67433658fb486a84bb1bddf02)
Reviewed: https:/ /review. opendev. org/679449 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=7732f0e6f36 91025a06f2abfc5 a57c71d83e5e72
Committed: https:/
Submitter: Zuul
Branch: stable/rocky
commit 7732f0e6f369102 5a06f2abfc5a57c 71d83e5e72
Author: Matt Riedemann <email address hidden>
Date: Wed Aug 7 12:23:15 2019 -0400
Add useful error log when _determine_ version_ cap raises DBNotAllowed
Change Icddbe4760eaff3 0e4e13c1e8d3d5d 3f489dac3c4 was intended for the levels] /compute= auto.
API service to check all cells for the minimum nova-compute service
version when [upgrade_
That worked in the gate with devstack because we don't configure
nova-compute with access to the database and run nova-compute with
a separate nova-cpu.conf so even if nova-compute is on the same
host as the nova-api service, they aren't using the same config
file (nova-api runs with nova.conf which has access to the API DB
obviously).
The problem is when nova-compute is configured with levels] /compute= auto and an [api_database] /connection, version_ cap method. For example, the power_states periodic task trying to stop an instance,
[upgrade_
there are flows that can try to hit the API database directly
because of the _determine_
_sync_
or even simple inter-compute communication over RPC like during
a resize.
This change simply catches the DBNotAllowed exception, logs a more
useful error message, and re-raises the exception. In addition,
the config help for the [api_database] group and "configuration"
option specifically are updated to mention they should not be set
on the nova-compute service.
Change-Id: Iac2911a7a305a9 d14bc6dadb36499 8f3ecb9ce42 c19c6310931dc62 eeff033595) 67433658fb486a8 4bb1bddf02)
Related-Bug: #1807044
Closes-Bug: #1839360
(cherry picked from commit 7d7d58509d5e60e
(cherry picked from commit bd03723a0c1a16d