Re: distcc doesn't read /etc/distcc/hosts when started by rpmbuild

Yassine ILMI <[email protected]> Mon, 15 Jun 2015 10:01:14 +0200
Newsgroups gmane.comp.compilers.distcc
Message-ID <CAC2-P-4baKXxQX=18SvdAg5X7+MsLBs-dy9jSjhUMinUujhUJA@mail.gmail.com>
--===============6526435363545862834==
Content-Type: multipart/alternative; boundary=089e01184838d49663051889dd08

--089e01184838d49663051889dd08
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Hi Sam,

1 - From my understanding, distcc is looking for its configuration from
environment variables (for the current session) or for a config file
located in $DISTCC_DIR/hosts directory -
http://distcc.googlecode.com/svn/trunk/doc/web/man/distcc_1.html#TOC_15

2 - I'm not sure how distcc handle configuration from files depending on
distributions, you should also run "distcc-config" utility. More
information about distcc configuration keys here :
http://distcc.googlecode.com/svn/trunk/doc/web/man/distcc_1.html#TOC_22

3 - I prefer to configure distcc using environment variable directly in a
file and source it when needed. You should check if the session used to run
rpmbuild also have distcc environment variables set.

Cheers,
Yassine



2015-06-14 16:33 GMT+02:00 Sam Varshavchik <[email protected]>:

> I have /etc/distcc/hosts configured with 4 local builds, and 6 distibuted
> builds.
>
> When I run 'make -j 10' myself, the build gets correctly distributed. But
> something strange happens when I try to use rpmbuild.
>
> I have rpmbuild properly configured to run 'make -j 10'. And I see that
> ten distcc instances get started, but only for localhost builds appear to
> be running, and the remaining processes wait until a localhost slot becom=
es
> available, before spawning off g++.
>
> I strace-d the entire rpmbuild.
>
> What I see is that distcc never reads /etc/distcc/hosts, and just proceed=
s
> to run a local build.
>
> When I run 'make -j 10' myself, this is what I see the distcc process
> doing:
>
> 17180 mkdir("/home/mrsam/.distcc", 0777 <unfinished =E2=80=A6>
> 17180 <=E2=80=A6 mkdir resumed> )             =3D -1 EEXIST (File exists)
> 17180 access("/home/mrsam/.distcc/hosts", R_OK) =3D -1 ENOENT (No such fi=
le
> or directory)
> 17180 access("/etc/distcc/hosts", R_OK <unfinished =E2=80=A6>
>
> =E2=80=A6 and so on.
>
> When I strace an entire rpmbuild, the distcc process, instead, does this:
>
> 10068 mkdir("/home/mrsam/.distcc", 0777 <unfinished =E2=80=A6>
> 10068 <=E2=80=A6 mkdir resumed> )             =3D -1 EEXIST (File exists)
> 10068 mkdir("/home/mrsam/.distcc/lock", 0777 <unfinished =E2=80=A6>
> 10068 <=E2=80=A6 mkdir resumed> )             =3D -1 EEXIST (File exists)
> 10068 open("/home/mrsam/.distcc/lock/cpu_localhost_0", O_WRONLY|O_CREAT,
> 0666 <unfinished =E2=80=A6>
>
> =E2=80=A6 and so on. What are the reasons distcc decides to skip checking
> /etc/distcc/hosts? grepping the entire strace, distcc never tries to read
> /etc/distcc/hosts.
>
>
> __
> distcc mailing list            http://distcc.samba.org/
> To unsubscribe or change options:
> https://lists.samba.org/mailman/listinfo/distcc
>

--089e01184838d49663051889dd08
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>Hi Sam,<br></div><div><br></div><div>1 - From my unde=
rstanding, distcc is looking for its configuration from environment variabl=
es (for the current session) or for a config file located in $DISTCC_DIR/ho=
sts directory - <a href=3D"http://distcc.googlecode.com/svn/trunk/doc/web/m=
an/distcc_1.html#TOC_15">http://distcc.googlecode.com/svn/trunk/doc/web/man=
/distcc_1.html#TOC_15</a></div><div><br></div><div>2 - I&#39;m not sure how=
 distcc handle configuration from files depending on distributions, you sho=
uld also run &quot;distcc-config&quot; utility. More information about dist=
cc configuration keys here :=C2=A0<a href=3D"http://distcc.googlecode.com/s=
vn/trunk/doc/web/man/distcc_1.html#TOC_22">http://distcc.googlecode.com/svn=
/trunk/doc/web/man/distcc_1.html#TOC_22</a><br></div><div><br></div><div>3 =
- I prefer to configure distcc using environment variable directly in a fil=
e and source it when needed. You should check if the session used to run rp=
mbuild also have distcc environment variables set.</div><div><br></div><div=
>Cheers,</div><div>Yassine</div><div><br></div><div><br></div></div><div cl=
ass=3D"gmail_extra"><br><div class=3D"gmail_quote">2015-06-14 16:33 GMT+02:=
00 Sam Varshavchik <span dir=3D"ltr">&lt;<a href=3D"mailto:mrsam@courier-mt=
a.com" target=3D"_blank">[email protected]</a>&gt;</span>:<br><blockquo=
te class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc so=
lid;padding-left:1ex">I have /etc/distcc/hosts configured with 4 local buil=
ds, and 6 distibuted builds.<br>
<br>
When I run &#39;make -j 10&#39; myself, the build gets correctly distribute=
d. But something strange happens when I try to use rpmbuild.<br>
<br>
I have rpmbuild properly configured to run &#39;make -j 10&#39;. And I see =
that ten distcc instances get started, but only for localhost builds appear=
 to be running, and the remaining processes wait until a localhost slot bec=
omes available, before spawning off g++.<br>
<br>
I strace-d the entire rpmbuild.<br>
<br>
What I see is that distcc never reads /etc/distcc/hosts, and just proceeds =
to run a local build.<br>
<br>
When I run &#39;make -j 10&#39; myself, this is what I see the distcc proce=
ss doing:<br>
<br>
17180 mkdir(&quot;/home/mrsam/.distcc&quot;, 0777 &lt;unfinished =E2=80=A6&=
gt;<br>
17180 &lt;=E2=80=A6 mkdir resumed&gt; )=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0=3D -1 EEXIST (File exists)<br>
17180 access(&quot;/home/mrsam/.distcc/hosts&quot;, R_OK) =3D -1 ENOENT (No=
 such file or directory)<br>
17180 access(&quot;/etc/distcc/hosts&quot;, R_OK &lt;unfinished =E2=80=A6&g=
t;<br>
<br>
=E2=80=A6 and so on.<br>
<br>
When I strace an entire rpmbuild, the distcc process, instead, does this:<b=
r>
<br>
10068 mkdir(&quot;/home/mrsam/.distcc&quot;, 0777 &lt;unfinished =E2=80=A6&=
gt;<br>
10068 &lt;=E2=80=A6 mkdir resumed&gt; )=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0=3D -1 EEXIST (File exists)<br>
10068 mkdir(&quot;/home/mrsam/.distcc/lock&quot;, 0777 &lt;unfinished =E2=
=80=A6&gt;<br>
10068 &lt;=E2=80=A6 mkdir resumed&gt; )=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0=3D -1 EEXIST (File exists)<br>
10068 open(&quot;/home/mrsam/.distcc/lock/cpu_localhost_0&quot;, O_WRONLY|O=
_CREAT, 0666 &lt;unfinished =E2=80=A6&gt;<br>
<br>
=E2=80=A6 and so on. What are the reasons distcc decides to skip checking /=
etc/distcc/hosts? grepping the entire strace, distcc never tries to read /e=
tc/distcc/hosts.<br>
<br>
<br>__<br>
distcc mailing list=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 <a href=3D"htt=
p://distcc.samba.org/" rel=3D"noreferrer" target=3D"_blank">http://distcc.s=
amba.org/</a><br>
To unsubscribe or change options:<br>
<a href=3D"https://lists.samba.org/mailman/listinfo/distcc" rel=3D"noreferr=
er" target=3D"_blank">https://lists.samba.org/mailman/listinfo/distcc</a><b=
r></blockquote></div><br></div>

--089e01184838d49663051889dd08--

--===============6526435363545862834==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

__
distcc mailing list            http://distcc.samba.org/
To unsubscribe or change options:
https://lists.samba.org/mailman/listinfo/distcc
--===============6526435363545862834==--