Comment 2 for bug 1225980

Revision history for this message
Gavin Panella (allenap) wrote :

The problem is tangled, afaict. In rabbitfixture:

- RabbitMQ is started on all addresses; the hostname attribute on
  RabbitServerResources doesn't actually seem to have an effect.

- RabbitServerResources.fq_hostname always uses socket.gethostname()
  instead of the hostname attribute. I think this was required because
  the server was starting up on all addresses rather than one.

- allocate_ports() only binds to localhost, not the address on which
  the RabbitMQ server is going to be brought up on. There's nothing
  preventing the port from being in use on any other address.

I think the fix will look like:

- Only start RabbitMQ on the specified address. The environment
  variable RABBITMQ_NODE_IP_ADDRESS can be used to do this.

- Change fq_hostname to use the configured hostname.

- Change allocate_ports() to take an address parameter, and pass in
  the configured hostname when using it.