Michael DeHaan | 2 Jan 23:03
Picon
Favicon

Kickstart tracking in 0.3.6

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 
(Continue reading)

Michael DeHaan | 4 Jan 23:25
Picon
Favicon

Re: Kickstart tracking in 0.3.6

Ok, kickstart tracking is implemented and pushed, so if anyone wants to 
play with this, please check out the Mercurial repository.   Just run a 
"cobbler sync" after the upgrade to get Apache configured correctly.   I 
probably won't release this (along with the rest of 0.3.6) until 
mid-next week.   Manpage docs have to be written first :)

In order to see when machines have truly finished, the kickstart files 
need to contain the following somewhere in post:
%post
TEMPLATE::kickstart_done

I have updated the default kickstarts that come with cobbler, so you can 
see what is done there.  

And then, at any time, one can run the following and see following for 
all distros in their system:

[root <at> mdehaan cobbler]# cobbler status
Address              | State           | Started                   | 
Last Request              | Seconds    | File Count
172.16.56.91         | notdone         | Thu Jan  4 16:23:16 2007  | Thu 
Jan  4 17:13:32 2007  | 3016       | 1422 

Individual status of files transferred is stored in 
/var/log/cobbler/kicklog/$IPADDR.   Right now, these files are not 
pruned, though in future versions I might decide to delete them if they 
haven't been modified in 30 days, or something like that.    This really 
shouldn't be a problem as the files won't be huge.

If you're using kickstart trees on another partition, you'll only see a 
(Continue reading)


Gmane