[distcc] Roaming $HOME/.distcc/hosts ??

Martin Pool mbp at samba.org
Mon Jul 21 04:45:38 GMT 2003


On 18 Jul 2003, Bob Tanner <tanner at real-time.com> wrote:
> Is there a way to have what I'd call a roaming $HOME/.distcc/hosts?
> 
> My home directory follows me everywhere I go (ala AFS). Which means my 
> ~/.distcc/hosts file follows me everywhere I go, which for most people is 
> probably a desired effect.
> 
> We have "distcc compile clusters" at each of are geographically different 
> locations.
> 
> Something like this:
> 
> Location A: clusterA, clusterAA, clusterAAA
> Location B: clusterB, clusterBB, clusterBBB
> Location C: clusterC, clusterCC, clusterCCC
> 
> If I'm at location A, I have clusterA, clusterAA, clusterAAA in my 
> $HOME/.distcc/hosts, but if I go to Location B,  I'm compiling across a T1, 
> to get to clusterA, clusterAA, clusterAAA .
> 
> I've been manually changing my HOME/.distcc/hosts each time I move. 
> 
> I've ask the hostmaster to make all the cluster have the same hostname, and 
> just do cluster01, cluster02, cluster03 in my $HOME/.distcc/hosts and let DNS 
> "figure" out which non-FQDN I want to go to. But that is not happening all 
> that fast.
> 
> I'm thinking something like:
> 
> $HOME/.distcc/hosts.LocationA
> $HOME/.distcc/hosts.LocationB
> $HOME/.distcc/hosts.LocationC
> 
> Where locationA would be domain name, and having distcc pick that
> up?

Based on your machine's domain name?  That might be OK, but I imagine
many people will switch locations without switching domain name.

Do you use a script or program to move locations?  Maybe it could
change a .distcc/hosts symlink?

Maybe there could be some syntax to make distcc run a program to get a
list of hosts?  That would seem to be a clean way to plug in either
mDNS support or some user-defined method for getting a list of hosts.
Of course that script must run very quickly or it will slow the
compilation right down.  Writing it in Perl or Python is probably
uneconomical.

Following on from that, perhaps you could just have a cron job that
regularly updates the host file based on your detected location?

-- 
Martin 



More information about the distcc mailing list