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

Bug #1775621 reported by Niklas Hagman
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack-Ansible
In Progress
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.

Revision history for this message
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
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to openstack-ansible (master)

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

Changed in openstack-ansible:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on openstack-ansible (master)

Change abandoned by Nicolas Bock (<email address hidden>) on branch: master
Review: https://review.opendev.org/574893

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.