diff options
author | Ruby Loo <ruby.loo@intel.com> | 2017-11-02 17:07:33 -0400 |
---|---|---|
committer | Ruby Loo <ruby.loo@intel.com> | 2017-11-02 17:07:33 -0400 |
commit | 7b09d3e8dc3306d59940e7d8c92321fa2b2eb273 (patch) | |
tree | 5f5202fb9203b1af1a9a63e90d3d9a391a1e8dda | |
parent | 74d97be3ce30d79e3f9e4e5421edb12319cac33e (diff) | |
download | ironic-7b09d3e8dc3306d59940e7d8c92321fa2b2eb273.tar.gz |
Remove unused IronicObjectIndirectionAPI from ironic-api
Many moons ago, we thought that we would implement rolling upgrades
using a similar model to nova. This included adding an instance
of an IronicObjectIndirectionAPI to the ironic-api service. What
it was meant to do was for ironic-api to invoke it if it received
an IronicObject that it didn't know what to do with (because it
didn't recognize that object's version). That API would have
invoked the conductor service, asking it to generate a version
of that object which ironic-api would understood.
To use this mechanism, the assumption is that the conductor is
the gateway to the DB.
This mechanism doesn't work for ironic for a few reasons:
- ironic API reads (and occasionally) writes directly to the database.
We don't want to change it to get access to the DB via the
conductor all the time, since for e.g. we don't want to slow down
the conductor
- Nova's rolling upgrade process is to initially take down all their
conductor services (which handles their DB interactions) at the
same time, while their other services are still running. Unless
ironic changes to have a similar model, we cannot take down all
the conductor services at the same time if ironic is to provide
services during a rolling upgrade.
Thus, this patch removes the unused IronicObjectIndirectionAPI from
the ironic-api service. Note that the IronicObjectIndrectionAPI
class itself (in ironic/objects/indirection.py) was left, in case
things ever change in the future. (And because removing that would
involve touching most, if not all, of the files in the objects/
subdirectory.)
Change-Id: I1aa264a8619105939968c0b8128b358badf00210
Closes-Bug: #1586320
-rw-r--r-- | ironic/cmd/api.py | 6 | ||||
-rw-r--r-- | ironic/tests/base.py | 1 |
2 files changed, 0 insertions, 7 deletions
diff --git a/ironic/cmd/api.py b/ironic/cmd/api.py index 2b7a0ebf9..9cf373c94 100644 --- a/ironic/cmd/api.py +++ b/ironic/cmd/api.py @@ -25,8 +25,6 @@ from oslo_reports import guru_meditation_report as gmr from ironic.common import profiler from ironic.common import service as ironic_service from ironic.common import wsgi_service -from ironic.objects import base -from ironic.objects import indirection from ironic import version CONF = cfg.CONF @@ -38,10 +36,6 @@ def main(): gmr.TextGuruMeditation.setup_autorun(version) - # Enable object backporting via the conductor - base.IronicObject.indirection_api = ( - indirection.IronicObjectIndirectionAPI()) - profiler.setup('ironic_api', CONF.host) # Build and start the WSGI app diff --git a/ironic/tests/base.py b/ironic/tests/base.py index 7c553b826..7482d762e 100644 --- a/ironic/tests/base.py +++ b/ironic/tests/base.py @@ -89,7 +89,6 @@ class TestCase(oslo_test_base.BaseTestCase): # NOTE(danms): Make sure to reset us back to non-remote objects # for each test to avoid interactions. Also, backup the object # registry - objects_base.IronicObject.indirection_api = None self._base_test_obj_backup = copy.copy( objects_base.IronicObjectRegistry.obj_classes()) self.addCleanup(self._restore_obj_registry) |