diff options
author | Dan Smith <dansmith@redhat.com> | 2022-11-02 09:34:35 -0700 |
---|---|---|
committer | Dan Smith <dansmith@redhat.com> | 2023-01-20 07:22:02 -0800 |
commit | cf111d10013eedca0f377d84307e7e41181b7200 (patch) | |
tree | 6ab1320dc291e1a2736f0fd0c230adaec6f74904 /nova/service.py | |
parent | 3b33b0938ea4f5b00537298bc7fcb531fb9ec811 (diff) | |
download | nova-cf111d10013eedca0f377d84307e7e41181b7200.tar.gz |
Pass service ref to init_host(), if exists
This just adds the service ref to init_host() so that we can pass it
(if it exists) at startup. On the first run, this will be None, so
we know that we don't have an existing service record and thus do not
need to do any migration.
Related to blueprint stable-compute-uuid
Change-Id: I1491c9b234ef0c262b5ed01d4c138eba8dedff77
Diffstat (limited to 'nova/service.py')
-rw-r--r-- | nova/service.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/nova/service.py b/nova/service.py index 2c10224926..bd3b49ae66 100644 --- a/nova/service.py +++ b/nova/service.py @@ -156,11 +156,11 @@ class Service(service.Service): LOG.info('Starting %(topic)s node (version %(version)s)', {'topic': self.topic, 'version': verstr}) self.basic_config_check() - self.manager.init_host() - self.model_disconnected = False ctxt = context.get_admin_context() self.service_ref = objects.Service.get_by_host_and_binary( ctxt, self.host, self.binary) + self.manager.init_host(self.service_ref) + self.model_disconnected = False if self.service_ref: _update_service_ref(self.service_ref) |