Bug 1390010

Summary: In IPv6 deployment RabbitMQ url in proxy-server.conf gets incorrectly set: ValueError: invalid literal for int() with base 10: 'fd00:fd00:2000::17:5672'
Product: Red Hat OpenStack Reporter: Marius Cornea <mcornea>
Component: openstack-tripleo-heat-templatesAssignee: Steven Hardy <shardy>
Status: CLOSED ERRATA QA Contact: Marius Cornea <mcornea>
Severity: urgent Docs Contact:
Priority: high    
Version: 10.0 (Newton)CC: afazekas, dbecker, emacchi, jcoufal, jschluet, jslagle, mabrams, mburns, morazi, rhel-osp-director-maint
Target Milestone: rcKeywords: AutomationBlocker, Triaged
Target Release: 10.0 (Newton)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-tripleo-heat-templates-5.0.0-0.20160922100830.75c20d5.1.el7ost puppet-tripleo-5.3.0-7.el7ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-12-14 16:26:43 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 1378428    

Description Marius Cornea 2016-10-30 18:56:01 UTC
Description of problem:
In IPv6 deployment RabbitMQ url in proxy-server.conf gets incorrectly set:  ValueError: invalid literal for int() with base 10: 'fd00:fd00:2000::17:5672'

Version-Release number of selected component (if applicable):
puppet-swift-9.4.2-1.el7ost.noarch
openstack-tripleo-heat-templates-5.0.0-0.9.0rc3.el7ost.noarch

How reproducible:
100%

Steps to Reproduce:
1. Deploy overcloud:
source ~/stackrc
export THT=/usr/share/openstack-tripleo-heat-templates/

openstack overcloud deploy --templates $THT \
-r ~/openstack_deployment/roles/roles_data.yaml \
-e $THT/environments/network-isolation-v6.yaml \
-e $THT/environments/network-management.yaml \
-e $THT/environments/storage-environment.yaml \
-e $THT/environments/cinder-backup.yaml \
-e ~/openstack_deployment/environments/cinder_backup_swift_backend.yaml \
-e ~/openstack_deployment/environments/nodes.yaml \
-e ~/openstack_deployment/environments/network-environment.yaml \
-e ~/openstack_deployment/environments/disk-layout.yaml \
-e ~/openstack_deployment/environments/neutron-settings.yaml \
--log-file overcloud_deployment.log &> overcloud_install.log

2. SSH to the nodes running the openstack-swift-proxy.service:
systemctl status openstack-swift-proxy.service

Actual results:
 openstack-swift-proxy.service - OpenStack Object Storage (swift) - Proxy Server
   Loaded: loaded (/usr/lib/systemd/system/openstack-swift-proxy.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Sun 2016-10-30 18:23:38 UTC; 25min ago
 Main PID: 31449 (code=exited, status=1/FAILURE)

Oct 30 18:23:38 overcloud-serviceapi-0.localdomain swift-proxy-server[31449]: File "/usr/lib/python2.7/site-packages/ceilometermiddleware/swift.py", line 123, in __init__
Oct 30 18:23:38 overcloud-serviceapi-0.localdomain swift-proxy-server[31449]: oslo_messaging.get_transport(cfg.CONF, url=conf.get('url')),
Oct 30 18:23:38 overcloud-serviceapi-0.localdomain swift-proxy-server[31449]: File "/usr/lib/python2.7/site-packages/oslo_messaging/transport.py", line 182, in get_transport
Oct 30 18:23:38 overcloud-serviceapi-0.localdomain swift-proxy-server[31449]: url = TransportURL.parse(conf, url, aliases)
Oct 30 18:23:38 overcloud-serviceapi-0.localdomain swift-proxy-server[31449]: File "/usr/lib/python2.7/site-packages/oslo_messaging/transport.py", line 459, in parse
Oct 30 18:23:38 overcloud-serviceapi-0.localdomain swift-proxy-server[31449]: port = int(port)
Oct 30 18:23:38 overcloud-serviceapi-0.localdomain swift-proxy-server[31449]: ValueError: invalid literal for int() with base 10: 'fd00:fd00:2000::17:5672'
Oct 30 18:23:38 overcloud-serviceapi-0.localdomain systemd[1]: openstack-swift-proxy.service: main process exited, code=exited, status=1/FAILURE
Oct 30 18:23:38 overcloud-serviceapi-0.localdomain systemd[1]: Unit openstack-swift-proxy.service entered failed state.
Oct 30 18:23:38 overcloud-serviceapi-0.localdomain systemd[1]: openstack-swift-proxy.service failed.

Expected results:
openstack-swift-proxy.service gets started.

Additional info:
Environment files:
http://paste.openstack.org/show/587403/

/etc/swift/proxy-server.conf:
http://paste.openstack.org/show/587404/

Setting the ip address withing square brackets makes it work:
url = rabbit://guest:FMJMduwxbv2U9dMkc49Xt6pmF@[fd00:fd00:fd00:2000::17]:5672//

Comment 1 Marius Cornea 2016-10-31 17:36:27 UTC
I tested the attached patches on my environment and I couldn't reproduce the initial issue anymore.

Comment 5 errata-xmlrpc 2016-12-14 16:26:43 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHEA-2016-2948.html