Life with hostcap

Autonomous administration with hostgroups: To delegate portions of the host database to individual members of staff, the database has been divided into a number of hostgroups. Each set of records that make up a hostgroup is kept in a corresponding file in a directory /home/config/hostgroups. All the records in a hostgroup usually belong to a single organizational entity in our department. There is one hostgroup file for each of our research groups, one for the central computer facility, one for the students' computer pool, and so on.

Hostgroup files: The actual host database consists of a ``main'' hostgroup file that holds a few meta-records (which define things such as the list of capabilities) and then just includes all the hostgroups using the M4 include directive (we use GNU M4 to preprocess the hostgroup files). We set the file and group ownership of each hostgroup file so that it can be edited by the member (or members) of staff responsible for the corresponding organization. Use of RCS is mandatory so that we can find out easily what has changed in a hostgroup since a certain date or since the last time it was edited. The locking facility of RCS can be used for hostgroup files with more than one maintainer.

Changing hostgroup files: After having edited a hostgroup file, the owner just calls make in /home/config/hostgroups. The Makefile applies a number of sanity checks to the hostgroup files owned by the caller. Among others, the following things are checked:

Installing hostgroup files: If editing is finished and everything looks fine, the owner calls make install to submit the changed hostgroup file (or files) to the system. This also verifies the hostgroups and, if all checks are passed, essentially copies the modified files into a new directory, /home/nic/install, which is located on our central nameserver machine. A cron-job on this machine reads this directory periodically (every 10 minutes) to check whether any new hostgroup files have arrived. If this is the case, the hostgroups are checked again (as a safeguard against files that have been ``sneaked'' in the install directory, bypassing the initial checks). Finally, all the installed hostgroups are combined into a new host database using M4, and the system's NIS and DNS data files are generated from the new host database and reloaded so that the changes become visible system-wide.

Top: hostcap overview  Prev: Inquiring minds  Next: Roadmap