diff options
author | Grzegorz Grasza <grzegorz.grasza@intel.com> | 2015-09-16 15:12:42 +0200 |
---|---|---|
committer | Jim Rollenhagen <jim@jimrollenhagen.com> | 2015-09-24 00:26:33 +0000 |
commit | db9ddd39d3f3d854d38e4b05655ebddd98f1a727 (patch) | |
tree | f5d327f0ffb81126ecf93fc152da5bc6add4dbb6 /ironic/objects/conductor.py | |
parent | cd32fa542193fc26b4ee77c7d004e056f1ce9bf8 (diff) | |
download | ironic-db9ddd39d3f3d854d38e4b05655ebddd98f1a727.tar.gz |
Implement indirection_api
During a rolling upgrade, ironic conductor and api services are running
with different versions. When an object is received in an incompatible
version, IncompatibleObjectVersion is raised. Implementation of the
indirection API allows the object to be backported to a supported version
by the conductor (conductor has to be the first service to be upgraded).
This change enables backporting of objects from Mitaka. This lays the
foundation to be able to do rolling upgrades from Liberty (or from this
patch onwards) to Mitaka. There may still be other issues that will need
fixing in Mitaka before we will be able to do a full rolling upgrade.
Enabling the indirection_api causes all object methods decorated with
the remotable or remotable_classmethod to do RPC from ironic-api to
ironic-conductor service. To keep the current behavior, I'm removing all
remotable decorators on object methods and thus not enabling object RPC
calls in this patch. These calls caused random timeouts on the CI gates
(probably due to a race in which Nova calls the ironic-api service before
ironic-conductor is up). RPC calls made via the indirection_api should
be enabled one-by-one, when the implications are fully understood.
Change-Id: Ia381348da93f95d764c83f3ec2a2ed5a1db5ad6d
Closes-Bug: 1493816
Depends-On: I81400305f166d62aa4612aab54602abb8178b64c
Diffstat (limited to 'ironic/objects/conductor.py')
-rw-r--r-- | ironic/objects/conductor.py | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/ironic/objects/conductor.py b/ironic/objects/conductor.py index eaf98447c..e0028e93a 100644 --- a/ironic/objects/conductor.py +++ b/ironic/objects/conductor.py @@ -42,7 +42,11 @@ class Conductor(base.IronicObject, object_base.VersionedObjectDictCompat): conductor.obj_reset_changes() return conductor - @object_base.remotable_classmethod + # NOTE(xek): We don't want to enable RPC on this call just yet. Remotable + # methods can be used in the future to replace current explicit RPC calls. + # Implications of calling new remote procedures should be thought through. + # @object_base.remotable_classmethod + @classmethod def get_by_hostname(cls, context, hostname): """Get a Conductor record by its hostname. @@ -58,7 +62,10 @@ class Conductor(base.IronicObject, object_base.VersionedObjectDictCompat): raise NotImplementedError( _('Cannot update a conductor record directly.')) - @object_base.remotable + # NOTE(xek): We don't want to enable RPC on this call just yet. Remotable + # methods can be used in the future to replace current explicit RPC calls. + # Implications of calling new remote procedures should be thought through. + # @object_base.remotable def refresh(self, context=None): """Loads and applies updates for this Conductor. @@ -77,7 +84,10 @@ class Conductor(base.IronicObject, object_base.VersionedObjectDictCompat): hostname=self.hostname) self.obj_refresh(current) - @object_base.remotable + # NOTE(xek): We don't want to enable RPC on this call just yet. Remotable + # methods can be used in the future to replace current explicit RPC calls. + # Implications of calling new remote procedures should be thought through. + # @object_base.remotable def touch(self, context): """Touch this conductor's DB record, marking it as up-to-date.""" self.dbapi.touch_conductor(self.hostname) |