Browse Source

Enable oslo_config mutable configurations

This patch enables oslo_config mutable configuration for the Qinling
control plane processes. The configuration will be updated when the
parent process receives a HUP signal.
This completes the Rocky goal: Enable mutable configuration.

Change-Id: Ib4b007d0c1e0401ed652bdf7a90993200bbfb576
Story: 2001545
Task: 6400
changes/34/580134/1
Lingxian Kong 3 years ago
parent
commit
779bcf7607
3 changed files with 10 additions and 1 deletions
  1. +2
    -1
      qinling/cmd/api.py
  2. +2
    -0
      qinling/cmd/engine.py
  3. +6
    -0
      releasenotes/notes/enable-mutable-configuration-a0527660fa58532c.yaml

+ 2
- 1
qinling/cmd/api.py View File

@ -38,7 +38,8 @@ def main():
rpc.get_transport()
api_server = api_service.WSGIService()
launcher = service.launch(CONF, api_server, workers=api_server.workers)
launcher = service.launch(CONF, api_server, workers=api_server.workers,
restart_method='mutate')
launcher.wait()
except RuntimeError as excp:
sys.stderr.write("ERROR: %s\n" % excp)


+ 2
- 0
qinling/cmd/engine.py View File

@ -15,6 +15,7 @@
import sys
import cotyledon
from cotyledon import oslo_config_glue
from oslo_config import cfg
from oslo_log import log as logging
@ -39,6 +40,7 @@ def main():
eng_service.EngineService,
workers=1,
)
oslo_config_glue.setup(sm, CONF, reload_method="mutate")
sm.run()
except RuntimeError as excp:
sys.stderr.write("ERROR: %s\n" % excp)


+ 6
- 0
releasenotes/notes/enable-mutable-configuration-a0527660fa58532c.yaml View File

@ -0,0 +1,6 @@
---
features:
- |
Operators can now update the running configuration of the Qinling control
plane processes by sending the parent process a "HUP" signal.
Note: The configuration option must support mutation.

Loading…
Cancel
Save