Opened 7 years ago

Last modified 5 years ago

#2129 new enhancement

Support unix domain sockets for build slaves.

Reported by: simpletoon Owned by:
Priority: major Milestone: 0.9.+
Version: 0.8.5 Keywords: sprint master-slave


I'm using build-bot for a simple single-machine continuous build system. I don't really care to have TCP sockets open if not really needed. I have noticed that both status and slave ports can work with unix domain sockets:

c [ 'slavePortnum' ] = "unix:/home/user/build/master/slaveconnect"

c [ 'status' ].append(html.WebStatus?(http_port="unix:/home/user/build/master/status"))

This way it doesn't open any TCP ports on the host system. When I desire to view the status I can start as simple socat connection to redirect to the socket and use any web browser.

socat -v tcp-l:<portnum>,fork,reuseaddr,bind= unix:/home/user/build/master/status

I would like to find a way to configure the build slave (/home/user/build/slave) to connect to the master by using unix domain sockets instead of requiring a TCP connection. The code uses internet.TCPClient so it can't do this. It seems like a simple check could be done on hostname (if it starts with unix:) and then use internet.UnixClient? instead.

Change History (6)

comment:1 Changed 7 years ago by dustin

  • Milestone changed from undecided to 0.8.+

Ideally this would use endpoint strings, just like the master-side stuff you described.

Can you hack that in?

comment:2 Changed 7 years ago by simpletoon

I don't know enough about Twisted or the buildbot code to do anything with it myself. An idea may be something like using twisted.internet.endpoints.clientFromString. In order to be backwards compatible, BuildSlave could take both parameters still. If the port parameter is None, then treat the hostname parameter as the string and use clientFromString. Otherwise use the current TCPClient. New slaves created with buildbot create-slave would have the 'masterEndpoint' variable, and would call BuildSlave(masterEndpoint, None, ...), while current slaves would use BuildSlave(hostname, portnum, ...)

comment:3 Changed 7 years ago by dustin

  • Keywords sprint added

comment:4 Changed 6 years ago by tom.prince

  • Milestone changed from 0.8.+ to 0.8.8

comment:5 Changed 6 years ago by tom.prince

  • Keywords master-slave added
  • Milestone changed from 0.8.8 to 0.8.+

comment:6 Changed 5 years ago by dustin

  • Milestone changed from 0.8.+ to 0.9.+

Ticket retargeted after milestone closed

Note: See TracTickets for help on using tickets.