new sysinstall

Chris Pressey cpressey at catseye.mine.nu
Tue Sep 2 10:05:16 PDT 2003


On Tue, 2 Sep 2003 17:15:03 +0200
Joerg Sonnenberger <joerg at xxxxxxxxxxxxxxxxx> wrote:

> What XML offers is an open hierachical container. You can choose a
> simple plain text format, but if you want to support hierachical
> information storage, you end up with something very similiar to XML.
> Consider the Apache httpd.conf format (<Directory> ... </Directory>).
> You can always use XML mostly like a flat key/value format, but it
> doesn't force you. Having a hierachical structure is important if
> you want to configure multiple identical machines, since you don't
> want to copy a zillion files and work-around like embedding those
> files in a configuration tarball feels wrong, too.
> 
> My argument to use XML or a similar tool is therefore not
> extensibility, but simply that is an existing tool good for such kind
> of work. We could formally provide a DTD or schema, but that's not
> that important.

Hmm... if we're just going to use XML as a hierarchical container of
data (rather than as a means of exchanging structured semantic
information) then my feeling is that we might as well not use it,
because we already have a hierarchical container for data; it's called
the filesystem.

Which brings me to my vote for today, which is squarely on having a
configuration filesystem mount.  It's probably the most elegant and
least error-prone way to detect changes in a file.  When files are saved
in it, the driver can parse them and store them in a regular database
file (in some other mounted file system.)  Among other things, this
would let us have a full hierarchy without a proportional cost in
inodes (i.e. no configuration tarballs needed, if you don't like
them...) but that's probably the least of the benefits; it's just plain
*smoother* than any other method I can think of at the moment.

I just hope it wouldn't interact too badly with RCNG... the thing that
strikes me is that configuration information is declarative while shell
scripts are imperative.  I think this has far-reaching ramifications
that can be a bit hard to appreciate.  Take FreeBSD's rc.conf, for
instance - it's intended that you fill it with a (declarative) list of
variable assignments.  But you can assign a variable more than once (so
that the latter instance overrides the former,) and presumably you can
do much worse things, like conditionals, or executing programs, because
it is still just (part of) a shell script.  I hope these abuses would be
universally regarded as bad form, and I wouldn't shed any tears if a
configuration filesystem explicitly disallowed anything in these files
except variable assignments - i.e. enforcing them to be 100% declarative
(like they probably should be.)  But otoh, conditionals might be nice to
have (and they'd be harder to parse - albeit minimally.)

Sorry if that didn't make much sense, I'm still hashing it out in my
head...

-Chris





More information about the Kernel mailing list