<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, May 14, 2014 at 6:16 AM, Dave Abrahams <span dir="ltr"><<a href="mailto:dave@boostpro.com" target="_blank">dave@boostpro.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">DISTCC_POTENTIAL_HOSTS seems like a great idea; as I scale up the build farm I’d like to be able to deal with unavailability, but I’m having trouble getting it to work right.<div>

<br></div><div>First, after much fooling around I surmise two undocumented facts(?)</div>

<div><br></div><div>1. it adds ,lzo,cpp to all the hosts implicitly<br clear="all"></div></div></blockquote><div><br></div><div>Yes, that's done in ExportDISTCC_HOSTS function in the pump script (source file <a href="http://pump.in">pump.in</a>).</div>

<div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><div>2. it only accepts bare host names, not the usual @?hostname/<slots>(,<extension>)* syntax </div>

</div></div></blockquote><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Is that correct?</div>

</blockquote><div> </div></div><div>Pretty much, yes.  It just passes the variable's value to lsdistcc, and lsdistcc accepts either bare host names, or a printf format string containing %d, e.g. "mydistcc%d" or "distcc%<a href="http://d.my.own.org.com">d.my.own.org.com</a>", not <i>host specifications</i> as described the distcc man page.</div>

<div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><div>If so, it would be good if these things were documented explicitly somewhere.<br>

</div></div></div></blockquote><div><br></div><div>Agreed.  I would be happy to accept a patch to add such documentation.</div><div><br></div><div>Another possibility would be to change lsdistcc to handle host specifications.</div>

<div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><div></div>

<div>Also, if I want localhost to be one of the hosts, it looks like I need to run distccd there.  That doesn’t seem like the most efficient thing to do, since normal local compilation will presumably have fewer layers to work through.  Am I mistaken?<br>

</div></div></div></blockquote><div><br></div><div>Well, you only need to run distccd for lsdistcc's initial query (lsdistcc doesn't have any special casing for localhost).</div><div>But any actual compilations done will not go via the distccd on localhost; distcc itself does have special casing for localhost. </div>

<div><br></div><div>I'd be happy to accept a patch to src/lsdistcc.c to make it special-case "localhost".</div><div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

<div dir="ltr"><div>

<div>Lastly, I’ve only been able to get it to run the default 6 (?) slots per host using DISTCC_POTENTIAL_HOSTS.  My .distcc/hosts file looks like this, and has been working pretty well:<br></div><div><br></div>

</div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><div>--randomize</div></div><div><div>localhost/10</div></div><div><div>bruford/10,lzo,cpp</div></div><div><div>fripp/10,lzo,cpp</div></div></blockquote>



<div><div> </div><div>Is there any way to get an effect like that using DISTCC_POTENTIAL_HOSTS, i.e. 10 slots per host, no local distccd?  </div></div></div></blockquote><div><br></div><div>Not currently.  I imagine that it would require only very minor changes to the ExportDISTCC_HOSTS function in the pump script (source file <a href="http://pump.in">pump.in</a>), though.</div>

<div><br></div></div>Cheers,</div><div class="gmail_extra">   Fergus.<br clear="all"><div><br></div>-- <br><div>Fergus Henderson <<a href="mailto:fergus@google.com" target="_blank">fergus@google.com</a>></div><div>
<br>
</div><div><div><span style="font-family:arial,sans-serif;font-size:13px;border-collapse:collapse">"Defend the user, exclude no one, and create magic." -- Eric Schmidt.</span></div></div><div><span style="font-family:arial,sans-serif;font-size:13px;border-collapse:collapse"><br>

</span></div>
</div></div>