This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 808415 - cluster-url should provide only existing addresses
cluster-url should provide only existing addresses
Status: CLOSED NOTABUG
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: qpid-cpp (Show other bugs)
2.1
Unspecified Unspecified
unspecified Severity low
: 2.2
: ---
Assigned To: messaging-bugs
MRG Quality Engineering
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-30 07:01 EDT by Zdenek Kraus
Modified: 2012-04-23 13:07 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-04-23 13:07:59 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Zdenek Kraus 2012-03-30 07:01:20 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):
qpid-cpp-server-0.14-10.el6.x86_64
qpid-cpp-server-ssl-0.14-10.el6.x86_64
qpid-cpp-server-xml-0.14-10.el6.x86_64
qpid-cpp-server-store-0.14-10.el6.x86_64
qpid-cpp-server-devel-0.14-10.el6.x86_64
qpid-cpp-server-cluster-0.14-10.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1. set up cluster-name and cluster-url to some localhost address in
/etc/qpidd.conf
cluster-name=mycluster
cluster-url=amqp:tcp:172.16.31.254
# 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
URL
  
Actual results:
Cluster Name: mycluster
Cluster Status: ACTIVE
  Cluster Size: 1
       Members: ID=126.39.0.0:5693 URL=amqp:tcp:172.16.31.254:5672


Expected results:
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
disscution) 

Additional info:
Comment 1 Zdenek Kraus 2012-03-30 07:06:50 EDT
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.
Comment 2 Andrew Stitcher 2012-04-02 11:18:16 EDT
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.
Comment 3 Zdenek Kraus 2012-04-03 05:27:49 EDT
NAT is good reason to provide locally non existing address.

Note You need to log in before you can comment on or make changes to this bug.