[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

cfsched proposal

From: skaar
Subject: cfsched proposal
Date: Tue, 8 Jul 2003 17:29:04 -0400
User-agent: Mutt/1.4i

I started to take some notes today on something called cfsched, very
sketchy, but maybe some people on the list can provide comments or

This has grown out of dealing with init-scripts, crontab and inittab,
when I really would like to have cfengine, or a very similar tool handle
the tasks traditionally dealt with the system commands.

==[ CFSCHED PROPOSAL: ]===============================================

cfengine works great for keeping the system state as defined in the
configuration policy, and covers most of the operational tasks associated with
system administration. It is in the end a scheduled execution, even if
cfexecd provides some sort of scheduling.

What would be useful is a real scheduler within the cfengine framework, which
would replace non-system specific startup/scheduled scripts spread out on
different locations in todays systems (inittab, SysV-style init scripts,
rc-scripts and crontab).

In addition to scheduled events (bootup, cron-type events), we want to be
able to make sure that certain processes are always running. Inittab could
do this for you, but it is also a very critical place to have changes take

==[ FEATURE SOURCES: ]================================================

- SysV init scripts
- inittab
- at
- fcron
- Bernsteins daemontools
- Gentoo Linux
- cfengine

We use the "service" term, as used in daemontools, and this could be
added as an actiontype in cfengine. Conforming to cfengine's high level
syntax, different service definitions could use classes and the schedule
configuration could be shared for all systems under cfengine/cfsched

The daemontools suite comes close to replacing inittab/init, but it lacks
a good service dependency model (as do SysV init scripts). It is also
implemented using Bernstein's own idea about file system layout, the code
base doesn't seem to be maintained and it could need some cosmetic changes
(all the run scripts shows up as "./run" in the process table).

Gentoo Linux has SysV init scripts, but with dependencies. Cfsched would
need to be able to define both dependencies and conditions for when the
dependency is met.

fcron has added a number of useful things to standard cron. The scheduled
events can be queried and executed, you can cancel an event or have it
run at another time. It also has a concept of serial events, loadaverage
(cfenvd could provide cfsched with similar data).

Time classes could provide an at like schedule for single events, although
this might be better to do with cfagent if you don't need it to happen
exactly at the minute.

==[ CFSCHED: SPECIFICATION ]==========================================

Resolution: It should be enough to run cfsched every minute

Configuration: cfsched reads /var/cfengine/inputs/cfsched.conf every
time it runs, it should be able to compare the current "compiled"
state, with whatever it parsed from cfsched.conf (and imported files),
and ignore it if it's unchanged. If it had a working state before
it reread the config file(s), and it fails to parse the new one it
should continue to use the previous one. (I don't know if it makes
sense to save this in a Berkeley db file - ala sendmails aliases).

States: cfsched should have a notion about time and date so that it
can execute a service at a given time. In addition it could have logic
to figure out if it's an initial run after boot (if statefile doesn't
exist or statefile is older than now minus uptime), so we can differentiate
between boot and if cfsched is restarted.

Dependencies: Different services/scheduled events should be able to
have dependencies on other services. 

      status=<script or method to report status>


+----- address@hidden                   kent skaar   ----------------+
+----- internet services: infrastructure security   ----------------+

reply via email to

[Prev in Thread] Current Thread [Next in Thread]