Opened 8 years ago

Closed 8 years ago

#1428 closed task (complete)

Unix domain socket for sending sockets from boss

Reported by: vorner Owned by: vorner
Priority: medium Milestone: Sprint-20111220
Component: ~Boss of BIND (obsolete) Version:
Keywords: Cc:
CVSS Scoring: Parent Tickets:
Sensitive: no Defect Severity: N/A
Sub-Project: Core Feature Depending on Ticket: Socket creator
Estimated Difficulty: 0 Add Hours to Ticket: 0
Total Hours: 0 Internal?: no

Description

This is a subtask of #802. It should add the ability to keep bunch of unix domain sockets for sending the sockets from socket creator to components.

It should consist of these parts:

  • A listening unix-domain socket is created somewhere in filesystem. The name is stored in self._socket_path (as other parts will need the path, and we want to be able to choose the path randomly in future).
  • When anything connects to the listening socket, it is accepted and kept.
  • When a line comes over one of the kept sockets, the newline is stripped and socket_request_handler is called with this string and the socket it came from.
  • When the remote closes one of the kept sockets, socket_consumer_dead is called.

These functions are introduced in trac802 in boss (as stubs). They form interface to the other subtasks.

Subtickets

Change History (7)

comment:1 Changed 8 years ago by vorner

  • Owner set to vorner
  • Status changed from new to accepted

comment:2 Changed 8 years ago by vorner

  • Owner changed from vorner to UnAssigned
  • Status changed from accepted to reviewing

Hello

It should be ready for review.

Some functions, like the ones that create and remove the socket file, are not tested, because there's nothing else than asking the OS to create the socket for us.

There's one implicit (there was self.runnable in main()) and one explicit bugfix (it returned 0 even when boss contained non-zero exit code).

It is based on the #802 code, so it should be reviewed from 51f3cb54492ef02e4951afb15a9c40ba0cdff4ce.

comment:3 Changed 8 years ago by jelte

  • Owner changed from UnAssigned to jelte

comment:4 Changed 8 years ago by jelte

  • Owner changed from jelte to vorner

I fixed one typo in a test docstring.

Code changes look fine, and this can be merged (when the rest is done)

comment:5 Changed 8 years ago by jinmei

  • Owner changed from vorner to jinmei
  • Status changed from reviewing to accepted

comment:6 Changed 8 years ago by jinmei

  • Owner changed from jinmei to vorner
  • Status changed from accepted to reviewing

(oops, sorry changed the wrong ticket)

comment:7 Changed 8 years ago by vorner

  • Resolution set to complete
  • Status changed from reviewing to closed
Note: See TracTickets for help on using tickets.