Wow. Awesome improvement all around. Kudos ++!
Ben
Michael DeHaan wrote:
Michael DeHaan wrote:
> One thing I've been thinking about is finally improving the YAML serializer.
>
> It's fine for a reasonable number of systems, but it's not easy to
> hand-edit (if needed) a system if you have 500 of them in the systems
> file. There's also the problem if you are hand editing and mess up
> your file. Backups are great, but wouldn't it be better to break just
> that one object, rather than all objects of the same type? Probably true.
>
> A solution to this is probably a directory layout like:
>
> /var/lib/cobbler/config/systems.d/
> /var/lib/cobbler/config/repos.d/
>
> And so on...
>
> The idea is we can tweak the YAML serializer to load the original file
> if it exists, and on those loads, write the new files out. This should
> allow for seamless upgrades to the new version without anyone needing to
> change modules.conf.
>
> I'm only going to do this if performance does not suffer on each invocation.
>
> However as we can lazy-load the objects as needed (unless making a
> "find" call), I'm not sure that will be a problem.
>
> As a design point, we will not be requiring a database, and I think
> things have been working pretty good so far, so, by default, no database :)
>
> --Michael
>
>
>
>
> _______________________________________________
> cobbler mailing list
> cobbler(a)lists.fedorahosted.org
>
https://fedorahosted.org/mailman/listinfo/cobbler
>
It turns out this is exceedingly fast as compared to the old method,
even w/o requiring a database.
80 seconds for YAML to edit 200 objects
0.5 seconds for this new proposal.
So it looks like I'm going to be teaching cobbler how to migrate from
one to the other.
We'll still ship serializer_yaml, but the new serializer_catalog will
probably be the new default in /etc/cobbler/modules.conf provided
testing pans out ok.
serializer_catalog will know how to read the old format and convert to
the new.
--Michael
_______________________________________________
cobbler mailing list
cobbler(a)lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/cobbler