On Sat, 11 Jun 2011 11:54:17 -0500, James Cammarata <jimi(a)sngx.net> wrote:
I'm decided to go ahead and write this. I got a working module up
with
about 30 minutes of effort, so I was wondering if others might be
interested in it. During the writing, I did discover the serializer
code is a bit broken, as it will only allow CouchDB or the catalog
serializers - if you write a custom backend currently and follow the
documentation on the wiki it will NOT work. Half of the effort in
writing this was figuring out why my serializer wouldn't load...
I'd be interested in why.
I would most likely add a "cobbler settings" command, which
would
allow the modification of settings from the CLI. I also found that if
you insert objects directly into the database, cobblerd doesn't pick
that up since it maintains an internal cache of objects (the same is
true if you manually copy JSON files into config/ now), so I was
thinking of adding a "cobbler reload" command too which would cause a
sync up between the data store and cobblerd's cache.
Both sound sane, though eventually we might want to make it so that
cobblerd doesn't do unnecessary caching when the backend can just handle
it. Aka, the json backend should be doing its own caching and cobblerd
should just call in to it, that way each back end can do the right thing
for itself.
Finally, I was planning on making this an optional RPM, like
cobbler-extra-backends or something like that, so the dependency tree
for a basic install wouldn't grow too much. We could move the
experimental CouchDB serializer there too - not sure if anyone even
uses that or not.
Sounds sane. Maybe cobbler-backend-mongodb, then we could do something
similar for couchdb (though I don't know that anyone is actually using
it). Alternatively, just do a conditional import and error out if
mongodb is selected and the proper packages aren't installed.
--
Scott Henson
Red Hat CIS Operator
WVU Alum BSAE/BSME