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/ 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/

Change-Id: I1aa264a8619105939968c0b8128b358badf00210
Closes-Bug: #1586320
Ruby Loo 5 years ago
parent 74d97be3ce
commit 7b09d3e8dc

@ -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
@ -38,10 +36,6 @@ def main():
# Enable object backporting via the conductor
base.IronicObject.indirection_api = (
# Build and start the WSGI app

@ -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(