summaryrefslogtreecommitdiff
path: root/nova/service.py
diff options
context:
space:
mode:
authorBalazs Gibizer <balazs.gibizer@est.tech>2020-11-13 11:47:51 +0100
committerBalazs Gibizer <balazs.gibizer@est.tech>2020-11-13 18:02:00 +0100
commit433bee58bc8d7d65edb6a0805021e51972e6bed6 (patch)
tree6f8f7a1af5071eac4ca992af4028f8c171aa3d3e /nova/service.py
parenteb279e9a5676f4142cce4700c3097ecc14161895 (diff)
downloadnova-433bee58bc8d7d65edb6a0805021e51972e6bed6.tar.gz
Restore retrying the RPC connection to conductor
Before Ie15ec8299ae52ae8f5334d591ed3944e9585cf71 if the compute was started before the conductor then the compute retried the connection until the conductor was up. The Ie15ec8299ae52ae8f5334d591ed3944e9585cf71 break this behavior as the service version check runs before this RPC retry mechanism and therefore the compute simply fails to start without a retry if no conductor is started. This patch moves the service version check after the RPC connection retry mechanism. Change-Id: Iad0ba1a02868eebc2f43b1ac843fcc5096cd5c47 Closes-Bug: #1904181
Diffstat (limited to 'nova/service.py')
-rw-r--r--nova/service.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/nova/service.py b/nova/service.py
index 5ce1c99cf2..e2e8acaaee 100644
--- a/nova/service.py
+++ b/nova/service.py
@@ -249,14 +249,20 @@ class Service(service.Service):
debugger.init()
- utils.raise_if_old_compute()
-
service_obj = cls(host, binary, topic, manager,
report_interval=report_interval,
periodic_enable=periodic_enable,
periodic_fuzzy_delay=periodic_fuzzy_delay,
periodic_interval_max=periodic_interval_max)
+ # NOTE(gibi): This have to be after the service object creation as
+ # that is the point where we can safely use the RPC to the conductor.
+ # E.g. the Service.__init__ actually waits for the conductor to start
+ # up before it allows the service to be created. The
+ # raise_if_old_compute() depends on the RPC to be up and does not
+ # implement its own retry mechanism to connect to the conductor.
+ utils.raise_if_old_compute()
+
return service_obj
def kill(self):