Bug 808415 - cluster-url should provide only existing addresses
Summary: cluster-url should provide only existing addresses
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: qpid-cpp
Version: 2.1
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: 2.2
: ---
Assignee: messaging-bugs
QA Contact: MRG Quality Engineering
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-03-30 11:01 UTC by Zdenek Kraus
Modified: 2012-04-23 17:07 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-04-23 17:07:59 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 808396 0 low NEW cluster-url should not allow localhost addresses 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 808411 0 low NEW cluster-url should be checked for syntax errors 2021-02-22 00:41:40 UTC

Internal Links: 808396 808411

Description Zdenek Kraus 2012-03-30 11:01:20 UTC
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 11:06:50 UTC
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 15:18:16 UTC
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 09:27:49 UTC
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.