From: Antoine Durr <antoine@(email surpressed)>
Subject: Re: semi dynamic hostgroups/criteria hosts file
   Date: Wed, 30 May 2007 16:37:31 -0400
Msg# 1562
View Complete Thread (7 articles) | All Threads
Last Next
On 2007-05-30 13:23:02 -0700, Greg Ercolano <erco@(email surpressed)> said:

Antoine Durr wrote:
I don't need fast dynamic updating.  I just wanted to avoid having the
same lists (or similar, but eventually diverging lists) in two
different places.  I think the solution is to have a cron job
regenerate the rush hosts list once per day..

	Oh, I see.. yes, you can do that with a cron job,
	rdisting out the change to the rest of the machines.

	Although not intended for 'unattended' use, you can even
	use 'rush -push hosts +any'; just be sure to watch stderr
	for 'NO RESPONSE FROM' errors, in case some remotes are too
	busy to respond, and to retry. (Rdist'ing is better)

	You won't need to use rush -reload; the daemons will pick
	up the change automatically within 30 secs. (The delay
	is to prevent hitting DNS all at once, esp for large sites)

	rdist is safer than rcp, because there's no chance of rush
	reading a partial file while it is in transit, due to how
	rdist copies to a temp file, then renames it into place
	as an atomic operation.

Hmmm, I hadn't thought of the problem that I need to rdist the file. I optimistically thought that I'd only need to do it in one place. Do I need to have *all* the machines have the same info at the same time, or is it sufficient for the submitting machine to have the latest hosts file? Maybe I could have the submit script rewrite it on the fly (which is really the only time I need it updated). But that wouldn't work if all hosts need to be synchronized.

-- Antoine

Floq FX Inc.
10839 Washington Blvd.
Culver City, CA 90232
310/430-2473


Last Next