Page MenuHomePhabricator

Expand conftool to support multiple objects via a schema definition.
Closed, ResolvedPublic


In its current incarnation, conftool only supports two object types:

  • nodes, describing single applications in a service pool
  • service, describing the corresponding service

What we want is to extend its behaviour so that any generic object type can be added programmaticaly, via a schema file.

Schema files should allow to add objects with different characteristics, and also allow the same syncronization mechanism that we use now: define which objects are present from yaml files, and - for specific objects - also the content of objects themselves.

The objects in the schema will have the following format:

   path: <base-path>
   tags: [tag1, tag2]
     field1: { type: string, default: <field1-default-value> }

So we need to define the base path on the kvstore for an object class, the tags needed to describe the object itself, and a schema with a dict of fields, their type and default value.

As far as types are concerned, I think we can limit ourselves to a series of simple ones, namely:

  • integer
  • string
  • boolean
  • list
  • dictionary/hash

relationships between such objects can be described as dependencies: for example, nodes depend on a corresponding service being defined. Those can be listed as well., and will determine the order of syncronization between the on disc structures and the live data.


Related Gerrit Patches:
operations/software/conftool : masterAdd schema support
operations/software/conftool : masterGeneralize entities definitions

Event Timeline

Joe created this task.Jan 20 2017, 12:18 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJan 20 2017, 12:18 PM
Joe moved this task from Backlog to Doing on the User-Joe board.Jan 22 2017, 10:38 AM

Change 288609 had a related patch set uploaded (by Giuseppe Lavagetto):
Generalize entities definitions

Change 288881 had a related patch set uploaded (by Giuseppe Lavagetto):
Add schema support

Joe moved this task from Doing to Blocked on others on the User-Joe board.Jan 24 2017, 8:34 AM
Krinkle moved this task from Inbox to Radar on the Performance-Team board.Jan 26 2017, 10:28 PM

Change 288609 merged by jenkins-bot:
Generalize entities definitions

Joe moved this task from Blocked on others to Doing on the User-Joe board.Feb 15 2017, 4:40 PM

Change 288881 merged by jenkins-bot:
Add schema support

Joe added a comment.Feb 24 2017, 5:27 PM

The code is done and a package has been created, although still only in experimental. This task can be considered resolved though.

Joe closed this task as Resolved.Feb 24 2017, 5:28 PM