Bug 1700634

Summary: Undercloud install failing at downloading rabbitmqadmin when deploying with IPv6
Product: Red Hat OpenStack Reporter: David Vallee Delisle <dvd>
Component: puppet-archiveAssignee: Michele Baldessari <michele>
Status: CLOSED ERRATA QA Contact: nlevinki <nlevinki>
Severity: medium Docs Contact:
Priority: medium    
Version: 13.0 (Queens)CC: jjoyce, jschluet, michele, pkomarov, slinaber, tvignaud
Target Milestone: ---Keywords: Triaged, ZStream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: puppet-archive-2.2.1-0.20180216011042.10888db.el7ost Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-07-10 13:05:11 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description David Vallee Delisle 2019-04-17 00:50:41 UTC
Description of problem:
During undercloud install, we try to download rabbitmqadmin using curl on the local_ip. When local_ip is IPv6, this fails because curl returns a "bad range specification".

Version-Release number of selected component (if applicable):
puppet-rabbitmq-8.1.1-0.20180216013831.d4b06b7

How reproducible:
All the time

Steps to Reproduce:
1. undercloud install with IPv6 as local_ip

Actual results:
~~~
2019-04-11 14:02:25,220 INFO: ^[[mNotice: /Stage[main]/Rabbitmq/Rabbitmq_plugin[rabbitmq_management]/ensure: created^[[0m
2019-04-11 14:02:28,853 INFO: ^[[mNotice: /Stage[main]/Rabbitmq::Service/Service[rabbitmq-server]/ensure: ensure changed 'stopped' to 'running'^[[0m
2019-04-11 14:02:28,884 INFO: ^[[1;31mError: Execution of '/bin/curl http://[abcd:abcd:abcd:abcd:c0:fe0:0:c000]:15672/cli/rabbitmqadmin -o /tmp/rabbitmqadmin_20190411-26312-58b4zx -fsSL --max-redirs 5 --user 4a670a54492e90e2379f3e6f20c0896fe5eca17e:e01decab4b54a9f2cd1e5601d505aba7a8dde27f --insecure' returned 3: curl: (3) [globbing] error: bad range specification after pos 9^[[0m
2019-04-11 14:02:28,885 INFO: ^[[1;31mError: /Stage[main]/Rabbitmq::Install::Rabbitmqadmin/Archive[rabbitmqadmin]/ensure: change from absent to present failed: Execution of '/bin/curl http://[abcd:abcd:abcd:abcd:c0:fe0:0:c000]:15672/cli/rabbitmqadmin -o /tmp/rabbitmqadmin_20190411-26312-58b4zx -fsSL --max-redirs 5 --user 4a670a54492e90e2379f3e6f20c0896fe5eca17e:e01decab4b54a9f2cd1e5601d505aba7a8dde27f --insecure' returned 3: curl: (3) [globbing] error: bad range specification after pos 9^[[0m
2019-04-11 14:02:28,885 INFO: ^[[mNotice: /Stage[main]/Rabbitmq::Install::Rabbitmqadmin/File[/usr/local/bin/rabbitmqadmin]: Dependency Archive[rabbitmqadmin] has failures: true^[[0m
2019-04-11 14:02:28,885 INFO: ^[[1;33mWarning: /Stage[main]/Rabbitmq::Install::Rabbitmqadmin/File[/usr/local/bin/rabbitmqadmin]: Skipping because of failed dependencies^[[0m
~~~

Expected results:
It shouldn't fail


Additional info:

This workaround has been confirmed to work: 
~~~
echo 'rabbitmq::archive_options: [ "-g" ]' >> hiera_override.yaml
~~~

It's basically leveraging the globoff function of curl
~~~
       -g, --globoff
              This  option switches off the "URL globbing parser". When you set this option, you can specify URLs that contain the letters {}[] without having them being interpreted by
              curl itself. Note that these letters are not normal legal URL contents but they should be encoded according to the URI standard.
~~~

We would like to see this as the default in openstack-puppet/modules/rabbitmq/manifests/params.pp

Comment 1 Michele Baldessari 2019-05-08 13:30:35 UTC
I think this used to work and somehow got broken by https://github.com/voxpupuli/puppet-rabbitmq/commit/f223f66894e5e948bcd2cf05d7beaa911605b3ff (as a matter of fact now curl_prefix is completely unused...)

Comment 17 errata-xmlrpc 2019-07-10 13:05:11 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://access.redhat.com/errata/RHBA-2019:1738