Date: Wed, 2 Jun 2004 15:09:23 +0100 From: Josef Karthauser <joe@FreeBSD.org> To: Mark Murray <mark@grondar.org>, current@FreeBSD.ORG Subject: Re: Problems with periodic scripts in jails [Cron <operator@sosai> /usr/libexec/save-entropy] Message-ID: <20040602140923.GA27070@genius.tao.org.uk> In-Reply-To: <20040602140148.GA27036@genius.tao.org.uk> References: <20040602134523.GA26835@genius.tao.org.uk> <200406021357.i52DvCIn002903@grimreaper.grondar.org> <20040602140148.GA27036@genius.tao.org.uk>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
On Wed, Jun 02, 2004 at 03:01:48PM +0100, Josef Karthauser wrote:
> > > (y/n [n]) not overwritten
> >
> > Not the answer you are looking for, but the entropy cronjob is an example
> > of the type of cronjob that IMVHO should not be run in jails.
> >
>
> Probably not :) The point is though that there is no reason why we
> should be getting permission errors here, save some kind of race
> condition.
>
Ok, I've found the cause of the problem. Cron is spawning
more than one copy of the entropy script...
I've got the same problem with the election script I run on the server:
obleo# crontab -u root -l
# Run the election process
*/2 * * * * ~joe/elections/cronjobs/doit
obleo# grep doit /var/log/cron | tail
Jun 2 14:00:00 obleo /usr/sbin/cron[90837]: (root) CMD (~joe/elections/cronjobs/doit)
Jun 2 14:00:01 obleo /usr/sbin/cron[90904]: (root) CMD (~joe/elections/cronjobs/doit)
Jun 2 14:02:00 obleo /usr/sbin/cron[91017]: (root) CMD (~joe/elections/cronjobs/doit)
Jun 2 14:02:00 obleo /usr/sbin/cron[91048]: (root) CMD (~joe/elections/cronjobs/doit)
Jun 2 14:04:00 obleo /usr/sbin/cron[91162]: (root) CMD (~joe/elections/cronjobs/doit)
Jun 2 14:04:00 obleo /usr/sbin/cron[91166]: (root) CMD (~joe/elections/cronjobs/doit)
Jun 2 14:06:00 obleo /usr/sbin/cron[91297]: (root) CMD (~joe/elections/cronjobs/doit)
Jun 2 14:06:00 obleo /usr/sbin/cron[91301]: (root) CMD (~joe/elections/cronjobs/doit)
Jun 2 14:08:00 obleo /usr/sbin/cron[91402]: (root) CMD (~joe/elections/cronjobs/doit)
Jun 2 14:08:00 obleo /usr/sbin/cron[91448]: (root) CMD (~joe/elections/cronjobs/doit)
obleo# ps -auxww | grep cron
root 23586 0.0 0.0 1396 948 ?? IsJ Mon01PM 0:00.83 /usr/sbin/cron
There's only one running!!!
Joe
--
Josef Karthauser (joe@tao.org.uk) http://www.josef-k.net/
FreeBSD (cvs meister, admin and hacker) http://www.uk.FreeBSD.org/
Physics Particle Theory (student) http://www.pact.cpes.sussex.ac.uk/
================ An eclectic mix of fact and theory. =================
[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (FreeBSD)
iEYEARECAAYFAkC935IACgkQXVIcjOaxUBaqgACcDgEHRNYlGzpCSxFwCUXhAxtE
mJMAoJtZ+bCw6DMRQbtzvmSc5QKJuE+T
=RU3K
-----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040602140923.GA27070>
