Bug 808396 - cluster-url should not allow localhost addresses
cluster-url should not allow localhost addresses
Status: NEW
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: qpid-cpp (Show other bugs)
2.1
Unspecified Unspecified
low Severity low
: ---
: ---
Assigned To: messaging-bugs
MRG Quality Engineering
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-30 06:30 EDT by Zdenek Kraus
Modified: 2013-02-24 08:23 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
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 06:30:19 EDT
Description of problem:
option cluster-url allows to specify failover address localhost that tells client to failover to his localhost and that is not right.

all localhost variants are allowed:

    tcp:127.0.0.1:5672
    tcp:localhost:5672
    tcp:[::1]:5672
    tcp:localhost6:5672
    tcp:127.1:5672 

Domain name resolution may be done for Names like "localhost.localdomain", which could be specified by /etc/hosts. 

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:127.0.0.1:5672,tcp:localhost:5672,tcp:[::1]:5671,tcp:localhost6,tcp:127.1
2. start openais/corosync for clustering and broker
3. run qpid-cluster and observer that all localhost addresses are provided as URL
  
Actual results:
  Cluster Name: mycluster
Cluster Status: ACTIVE
  Cluster Size: 1
       Members: ID=126.39.0.0:5500 URL=amqp:tcp:127.0.0.1:5672,tcp:localhost:5672,tcp:[::1]:5671,tcp:localhost6:5672,tcp:127.1:5672


Expected results:
qpidd fails with error message like: "Localhost addresses is not allowed for cluster-url"

or prints warning, and will not provide such localhost addresses to clients if there is some other correct addresss (Note that second result is subject of disscution) 

Additional info:

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