Square Brackets in IPv6 address variable break dnsmasq

Bug #1978892 reported by Brendan Shephard
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
High
Takashi Kajinami

Bug Description

Description
When deploying the Undercloud with IPv6 addresses, the IP is saved in Hiera with square brackets and results in dnsmasq not being able to start.

Environment:
TripleO Wallaby

Reproduce:
Deploy a undercloud with the following:
[DEFAULT]
clean_nodes = true
cleanup = false
container_cli = podman
container_healthcheck_disabled = true
container_images_file = /home/stack/containers-prepare-parameter.yaml
deployment_user = stack
enable_ironic = true
enable_ironic_inspector = true
enable_neutron = true
enable_routed_networks = false
generate_service_certificate = false
ipv6_address_mode = dhcpv6-stateful
ipxe_enabled = true
local_interface = enp8s0
local_ip = aaaa:aaaa:aaaa::1/64
subnets = ctlplane-subnet
undercloud_admin_host = aaaa:aaaa:aaaa::1
undercloud_hostname = undercloud.com
undercloud_ntp_servers = 30.30.30.3
undercloud_public_host = aaaa:aaaa:aaaa::1
undercloud_timezone = UTC

[ctlplane-subnet]
cidr = aaaa:aaaa:aaaa::/64
dhcp_end = aaaa:aaaa:aaaa::f
dhcp_start = aaaa:aaaa:aaaa::a
gateway = aaaa:aaaa:aaaa::1
inspection_iprange = aaaa:aaaa:aaaa::3,aaaa:aaaa:aaaa::9

Observe the ironic_pxe_tftp container failing to start and complaining about the dnsmasq command:
$ sudo podman logs ironic_pxe_tftp

dnsmasq: bad command line options: try --help
dnsmasq: bad command line options: try --help
dnsmasq: bad command line options: try --help
dnsmasq: bad command line options: try --help

The variable we use for BIND_HOST has [ ] around the IP address which cause the issue:
https://github.com/openstack/tripleo-heat-templates/blob/stable/wallaby/deployment/ironic/ironic-pxe-container-puppet.yaml#L125

[root@undercloud stack]# sudo hiera ironic::pxe::tftp_bind_host -c /etc/puppet/hiera.yaml
[aaaa:aaaa:aaaa::1]

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-heat-templates (master)
Changed in tripleo:
status: New → In Progress
Changed in tripleo:
importance: Undecided → High
assignee: nobody → Takashi Kajinami (kajinamit)
milestone: none → zed-1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-heat-templates (stable/wallaby)

Fix proposed to branch: stable/wallaby
Review: https://review.opendev.org/c/openstack/tripleo-heat-templates/+/848651

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-heat-templates (master)

Reviewed: https://review.opendev.org/c/openstack/tripleo-heat-templates/+/846081
Committed: https://opendev.org/openstack/tripleo-heat-templates/commit/3290e6f9de3a905085a6e29ebb4cbf9f2d8d41db
Submitter: "Zuul (22348)"
Branch: master

commit 3290e6f9de3a905085a6e29ebb4cbf9f2d8d41db
Author: Takashi Kajinami <email address hidden>
Date: Thu Jun 16 11:33:22 2022 +0900

    ironic tftp: Do not format IPv6 address for bind_host

    dnsmasq does not accept IPv6 addresses surrounded by [] and we should
    pass a raw IP string without [].

    Closes-Bug: #1978892
    Change-Id: Ida8e79d5cf1a4ecf80dbe855798c3732ced06260

Changed in tripleo:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-heat-templates (stable/wallaby)

Reviewed: https://review.opendev.org/c/openstack/tripleo-heat-templates/+/848651
Committed: https://opendev.org/openstack/tripleo-heat-templates/commit/e36b018e86cb0d668c0121849a34d172df1c5be5
Submitter: "Zuul (22348)"
Branch: stable/wallaby

commit e36b018e86cb0d668c0121849a34d172df1c5be5
Author: Takashi Kajinami <email address hidden>
Date: Thu Jun 16 11:33:22 2022 +0900

    ironic tftp: Do not format IPv6 address for bind_host

    dnsmasq does not accept IPv6 addresses surrounded by [] and we should
    pass a raw IP string without [].

    Conflicts:
            deployment/ironic/ironic-conductor-container-puppet.yaml

    Resolved conflict caused by replacement of the hiera functions.

    Closes-Bug: #1978892
    Change-Id: Ida8e79d5cf1a4ecf80dbe855798c3732ced06260
    (cherry picked from commit 3290e6f9de3a905085a6e29ebb4cbf9f2d8d41db)

tags: added: in-stable-wallaby
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-heat-templates 17.0.0

This issue was fixed in the openstack/tripleo-heat-templates 17.0.0 release.

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

Other bug subscribers

Remote bug watches

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