This patch fixes a problem which prevented Ironic from honoring the
interval values configuration for the periodic tasks. Since the interval
values are passed to a decorator, the configuration options should be
evaluated prior to importing the module which contains the periodic tasks.
In our case this was not happening due to the chain of imports going
from ironic.cmd.conductor -> ironic.common.service -> ironic.api.app
-> ... -> ironic.conductor.manager. This caused the @periodic
decorators to be evaluated before the configuration options were loaded.
This patch breaks that chain of imports by separating the WSGIService
and RPCService classes into two separate files. The conductor uses the
RPCService, and since it is now in a separate file from WSGIService, it
no longer pulls in ironic.api.app, ..., and ironic.conductor.manager.
(ironic.api.app was being imported because WSGIService needed it.)
Reviewed: https:/ /review. openstack. org/369724 /git.openstack. org/cgit/ openstack/ ironic/ commit/ ?id=ec202c444ba 159797403407c77 1e24fbc2ddcd4f
Committed: https:/
Submitter: Jenkins
Branch: master
commit ec202c444ba1597 97403407c771e24 fbc2ddcd4f
Author: Ruby Loo <email address hidden>
Date: Tue Sep 13 17:46:27 2016 -0400
Separate WSGIService from RPCService
This patch fixes a problem which prevented Ironic from honoring the
interval values configuration for the periodic tasks. Since the interval
values are passed to a decorator, the configuration options should be
evaluated prior to importing the module which contains the periodic tasks.
In our case this was not happening due to the chain of imports going cmd.conductor -> ironic. common. service -> ironic.api.app conductor. manager. This caused the @periodic
from ironic.
-> ... -> ironic.
decorators to be evaluated before the configuration options were loaded.
This patch breaks that chain of imports by separating the WSGIService conductor. manager.
and RPCService classes into two separate files. The conductor uses the
RPCService, and since it is now in a separate file from WSGIService, it
no longer pulls in ironic.api.app, ..., and ironic.
(ironic.api.app was being imported because WSGIService needed it.)
Change-Id: Ie318e7bb2d2c2d 971a796ab8960be 33fccbd88f3
Closes-Bug: #1562258
Co-Authored-By: Lucas Alvares Gomes <email address hidden>