Red Hat Bugzilla – Bug 808415
cluster-url should provide only existing addresses
Last modified: 2012-04-23 13:07:59 EDT
Description of problem:
it's possible to specify cluster-url with address that broker doesn't know (address is not available on none of local interfaces). It could be mistake in address but address is syntax-correct, or address on interface was chanded by DHCP, etc..
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. set up cluster-name and cluster-url to some localhost address in
# address must not be on any interface
2. start openais/corosync for clustering and broker
3. run qpid-cluster and observe that address are provided as
Cluster Name: mycluster
Cluster Status: ACTIVE
Cluster Size: 1
Members: ID=22.214.171.124:5693 URL=amqp:tcp:172.16.31.254:5672
qpidd fails with error message like: "address does not exists on any available interface, thus cannot be supplied in cluster-url"
or prints warning, and will not provide such address to clients if
there is some other correct addresss (Note that second result is subject of
additional note, it should filter out address like 255.255.255.255 and 0.0.0.0, which is syntax-correct and also should be evaluated as existing because of their meaning.
I'm not sure about this idea - I think that it may be impossible for the broker to determine all the addresses that could be used to allow clients to refer to it.
It seems to me that the address advertised to clients could be an address that is not actually attached to one of the network interfaces of the machine for a number of reasons (simple example would be NAT).
I think the only safe way to perform the check would be to try to contact the broker on the address and make sure it is actually you.
NAT is good reason to provide locally non existing address.