Set hostname as engine_id
The engine_id used uuid will change every time when bilean-engine rebooting, it made enine can not load related jobs from db. This patch sets bilean-engine's hostname as engine_id. Change-Id: I2ae41bd3ec0924febf6a13efbd90fcccf9710d25
This commit is contained in:
parent
aabb1c7317
commit
292ee44854
@ -12,7 +12,7 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
import six
|
import six
|
||||||
import uuid
|
import socket
|
||||||
|
|
||||||
from oslo_log import log as logging
|
from oslo_log import log as logging
|
||||||
import oslo_messaging
|
import oslo_messaging
|
||||||
@ -67,9 +67,9 @@ class EngineService(service.Service):
|
|||||||
self.context = bilean_context.get_service_context()
|
self.context = bilean_context.get_service_context()
|
||||||
|
|
||||||
def start(self):
|
def start(self):
|
||||||
self.engine_id = str(uuid.uuid4())
|
self.engine_id = socket.gethostname()
|
||||||
|
|
||||||
LOG.info(_LI("initialise bilean users from keystone."))
|
LOG.info(_LI("Initialise bilean users from keystone."))
|
||||||
user_mod.User.init_users(self.context)
|
user_mod.User.init_users(self.context)
|
||||||
|
|
||||||
self.scheduler = scheduler.BileanScheduler(engine_id=self.engine_id,
|
self.scheduler = scheduler.BileanScheduler(engine_id=self.engine_id,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user