Friendly Neighborhood Cobbler Users,
One of the things I've wanted to do with cobbler for some time was be
able to keep track of systems as they kickstart, so that higher level
applications and scripts could, if they wanted, try to detect which
machines had stalled or otherwise failed to complete. Some
rudimentary support for this is going into upstream now, and I'll be
refining it some more over the next few days.
How does it work?
Well, it only works for kickstart trees that come out of
/var/www/cobbler -- local content -- so if you're installing off of a
Fedora mirror, this gives you more reason to let Cobbler mirror that
distro and serve it locally (plus, it's nicer to the guy running the
mirror). This means kickstart tracking will work for any distros that
have been pulled down via "cobbler import" or any distributions you have
created yourself in that directory (/var/www/cobbler/localmirror/foo is
the preferred destination for such content). If you already have a
kickstart tree elsewhere, symlinking it should be good enough if you
configure Apache appropriately.
So, how it works -- this new release installs a mod_python filter
handler automagically for /var/www/cobbler, and access to certain files
in that directory are logged with the IP address of the requester, the
time, and the file requested. From this, it is possible to tell what
profiles are being requested, what RPM's they've requested, and when
they are done (they request a special filename at the bottom of their
kickstarts when they are done). This all currently goes into
/var/log/cobbler/cobbler.log and there is a logrotate script in
/etc/logrotate.d that keeps the logfile manageable. This is all done
from the RPM basically, so there isn't any added pain on the user.
This will probably require some more advanced tools to understand the
logfiles and report on the status of the kickstarts. Some things this
tool might need to look at would be things like produce reports that
provide information such as "this machine hasn't requested an file in 30
minutes and is not yet finished" and so on.
If anybody is already doing this sort of thing, or has ideas on what
sort of form factor reporting tools should take, I'd love to hear your
opinion. I may end up keeping the log data itself as YAML, so that it
is more easily read back by cobbler to produce a report.
Imagine:
cobbler showkickstarting
192.168.1.10 IN PROGRESS | 50 rpms requested | 35 minutes elapsed
192.168.1.11 FINISHED | 250 rpms requested | 55 minutes elapsed
192.168.1.12 STALLED? | 15 rpms requested | 250 minutes elapsed
and so on.
Comments?
--Michael