Date: Thu, 7 Mar 2013 15:36:13 +0100
From: Tomáš Smetana <tsmetana(a)redhat.com>
To: openlmi-devel(a)lists.fedorahosted.org
Subject: Re: Cron Provider?
Message-ID: <20130307153613.14e1a0f0(a)zaphod.usersys.redhat.com>
Content-Type: text/plain; charset=UTF-8
On Thu, 07 Mar 2013 08:42:41 -0500
Stephen Gallagher <sgallagh(a)redhat.com> wrote:
> >> So yes, we *could* build a scheduling provider, but I think we
> >> want to think very hard about what level of scheduling we want to
> >> support. systemd's scheduler is a very large superset of what
> >> cron is capable of, so I suppose we could build that first and
> >> then extend it later to support the advanced systemd features.
The
underlying question is "do system admins using OpenLMI need to
submit jobs to run at a specific time, or to run repeatedly?" This looks
desirable, but I don't know how heavily it would be used.
> >
> > Starting with cron would also have the advantage of building the
> > most portable code first; it would make sense to add the more
> > version-specific options later.
Cron would be portable across older
versions of Linux; the systemd
scheduler would only support newer versions.
> >
>
> While I agree with that in principal, I need to make the point that
> I'm not sure we can build a CIM model for cron that will extend to the
> systemd approach at all. They may ultimately need to be two separate
> models, at which point we'll need to figure out how to manage the
> transition (which is what OpenLMI is trying to avoid).
It would make sense to
do two separate providers. This would also
simplify the model - one model for cron, one model for systemd
scheduler. I don't see a lot of value in closely following a DMTF model
here (unless it is already based on cron).
Cron might be an interesting modelling exercise... There are user crontabs,
scripts in /etc/cron.{hourly,weekly,monthly}, package-specific crontabs
in /etc/cron.d, system-wide /etc/crontab. And we might want to model and
monitor the running/finished jobs as well. I admit I don't know much about
systemd timer units. However I suppose systemd might make it easier to find
logs of a particular job run at least (and this would be a required feature I
assume).
I'm only afraid that both the cron and systemd are config-files driven and we
probably won't avoid parsing/editing the files. Which is ugly.
Regards,