Comment 14 for bug 1562258

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ironic (master)

Reviewed: https://review.openstack.org/369724
Committed: https://git.openstack.org/cgit/openstack/ironic/commit/?id=ec202c444ba159797403407c771e24fbc2ddcd4f
Submitter: Jenkins
Branch: master

commit ec202c444ba159797403407c771e24fbc2ddcd4f
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
    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.)

    Change-Id: Ie318e7bb2d2c2d971a796ab8960be33fccbd88f3
    Closes-Bug: #1562258
    Co-Authored-By: Lucas Alvares Gomes <email address hidden>