Use oslo-versioned-objects to help with dealing with upgrades

Registered by yuntongjin

The goal of this blueprint is to introduce versioned objects into Sahara.

An object is used to bundle data with methods that can operate on them. The plan is to represent the following concepts as objects:Cluster, NodeGroup, Instance, ClusterTemplate, NodeGroupTemplate, TemplatesRelation, DataSource, JobExecution, Job,
JobBinaryInternal, JobBinary, ClusterEvent, ClusterProvisionStep.

By using objects, the code will be insulated from the actual database schema, making it easier rolling upgrades. Objects can be used to pass data over RPC and allow lazy-loading of data directly from the database or over RPC.

Nova has come up with the idea of versioned objects, that Ironic has also now used. This has now been proposed as an oslo library: https://review.openstack.org/#/c/127532/
https://etherpad.openstack.org/p/kilo-crossproject-upgrades-and-versioning

There is work being done in Heat and Cinder which may be a good starting point for Glance (ideas, reliability):
https://blueprints.launchpad.net/heat/+spec/versioned-objects
https://blueprints.launchpad.net/cinder/+spec/cinder-objects

The idea of versioned objects is to create wrapper objects that are a layer above the db objects.

Blueprint information

Status:
Not started
Approver:
None
Priority:
Medium
Drafter:
yuntongjin
Direction:
Approved
Assignee:
Ken Chen
Definition:
Discussion
Series goal:
None
Implementation:
Unknown
Milestone target:
None

Related branches

Sprints

Whiteboard

Gerrit topic: https://review.openstack.org/#q,topic:bp/versioned-objects,n,z

Addressed by: https://review.openstack.org/167114
    Introduce objects into sahara. This enables objects to be passed over RPC and decouple the database implementation from SQLAlchemy.

Addressed by: https://review.openstack.org/173654
    Add Sample Versioned Objects for Node Group Template

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.