[Gluster-devel] spurious regression failures again! [bug-1112559.t]

Anders Blomdell anders.blomdell at control.lth.se
Tue Jul 22 15:15:38 UTC 2014


On 2014-07-22 16:44, Justin Clift wrote:
> On 22/07/2014, at 3:28 PM, Joe Julian wrote:
>> On 07/22/2014 07:19 AM, Anders Blomdell wrote:
>>> Could this be a time to propose that gluster understands port reservation a'la systemd (LISTEN_FDS),
>>> and make the test harness make sure that random ports do not collide with the set of expected ports,
>>> which will be beneficial when starting from systemd as well.
>> Wouldn't that only work for Fedora and RHEL7?
> 
> Probably depends how it's done.  Maybe make it a conditional
> thing that's compiled in or not, depending on the platform?
Don't think so, the LISTEN_FDS is dead simple; if LISTEN_FDS is 
set in the environment, fd#3 to fd#3+LISTEN_FDS are sockets opened
by the calling process, and their function has to be deduced via 
getsockname and sockets should not opened by the process. If 
LISTEN_FDS is not set, proceed to open sockets just like before.

The good thing about this is that systemd can reserve the ports 
used very early during boot, and no other process can steal them
away. For testing purposes, this could be used to assure that
all ports are available before starting tests (if random port
stealing is the true problem here, that is still an unverified
shot in the dark).

> 
> Unless there's a better, cross platform approach of course. :)
> 
> Regards and best wishes,
> 
> Justin Clift
> 
/Anders


-- 
Anders Blomdell                  Email: anders.blomdell at control.lth.se
Department of Automatic Control
Lund University                  Phone:    +46 46 222 4625
P.O. Box 118                     Fax:      +46 46 138118
SE-221 00 Lund, Sweden



More information about the Gluster-devel mailing list