IPv6 addresses need to be wrapped in square brackets ([ ])

Bug #1775621 reported by Niklas Hagman on 2018-06-07
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
openstack-ansible
Medium
Nicolas Bock

Bug Description

When using a IPv6 address as internal_lb_vip_address, it needs to be wrapped in square brackets.
Ansible has the function ipwrap for this. https://docs.ansible.com/ansible/latest/user_guide/playbooks_filters_ipaddr.html#wrapping-ipv6-addresses-in-brackets

Because I have no access currently to openstack ansible repositories, I did it like this

find /opt/openstack-ansible/ -exec sed -i 's/{{ \[internal_lb_vip_address\] }}/{{ \[internal_lb_vip_address\] | ipwrap }}/g' {} \;

find /opt/openstack-ansible/ -exec sed -i 's/{{ internal_lb_vip_address }}/{{ internal_lb_vip_address | ipwrap }}/g' {} \;

find /opt/openstack-ansible/ -exec sed -i 's/{{internal_lb_vip_address}}/{{ internal_lb_vip_address | ipwrap }}/g' {} \;

find /opt/openstack-ansible/ -exec sed -i 's/{{ external_lb_vip_address }}/{{ external_lb_vip_address | ipwrap }}/g' {} \;

After these changes I can now use a IPv6 address as internal_lb_vip_address and external_lb_vip_address.
And no, this is not the complete way to have openstack-ansible support IPv6. Currently dual stack is needed.

Niklas Hagman (blinkiz) wrote :

The first line that is changing {{ [internal_lb_vip_address] }} is not correct because that is for haproxy.yml. Haproxy does not want urls with square brackets ([]). It seems like everything else wants square brackets.

Changed in openstack-ansible:
assignee: nobody → Nicolas Bock (nicolasbock)
Changed in openstack-ansible:
status: New → Confirmed
Changed in openstack-ansible:
importance: Undecided → Medium

Fix proposed to branch: master
Review: https://review.openstack.org/574893

Changed in openstack-ansible:
status: Confirmed → In Progress
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers