[Demi-devel] Format for transferring machine information

John Morrissey jwm at horde.net
Tue Jan 10 21:05:24 UTC 2006


I've committed changes to have Demi pull the /etc/apt/sources.list and
/etc/apt/preferences from each machine. This increases the number of SSH
calls from one (/var/lib/dpkg/status) to three, since each file is a
separate cat or scp.

Since Demi will only gather more information as time goes on (architecture,
running kernel, to name a couple more in TODO), this number of connections
will only increase. I'm thinking about gathering everything in one shot, but
I'm not sure of the best way to do so.

I thought about having Demi call a command via SSH that would generate an
output document containing all the information (perhaps in XML format) so
only one SSH connection is needed to update all information. Retrieving only
changed information is problematic, unless there's a way to pass a milestone
that says "only give me information that has changed since X."

I also considered expect-like scripting of an SSH session. This seems a
little problematic, but requires writing less code to gather new bits of
information. For example, with the former XML format, the agent would need
to be updated to gather each new piece of information and format/escape it.
If we script an SSH session, we could have an abstract way to run a command
and return its output that would work for most anything. Commands could be
batched and run sequentially in a single SSH session.

Thoughts?

john
-- 
John Morrissey          _o            /\         ----  __o
jwm at horde.net        _-< \_          /  \       ----  <  \,
www.horde.net/    __(_)/_(_)________/    \_______(_) /_(_)__



More information about the Demi-devel mailing list