inspector: Missing new line in dnsmasq.conf when dnsmasq_ip_subnets is used

Bug #2042526 reported by Takashi Kajinami
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
puppet-ironic
Fix Released
High
Takashi Kajinami

Bug Description

While adding strict ^ and $ check in unit tests, it turned out that dnsmasq.conf is rendered wrongly when dnsmasq_ip_subnets is used.

```
port=0
interface=br-ctlplane

dhcp-range=192.168.0.100,192.168.0.120,10m
dhcp-option-force=option:mtu,1350
dhcp-range=set:subnet1,192.168.1.100,192.168.1.200,255.255.255.0,10m
dhcp-option=tag:subnet1,option:router,192.168.1.254
dhcp-option-force=tag:subnet1,option:mtu,1350
dhcp-range=set:subnet2,192.168.2.100,192.168.2.200,255.255.255.0,10m
dhcp-option=tag:subnet2,option:router,192.168.2.254
dhcp-option=tag:subnet2,option:classless-static-route,1.2.3.0/24,192.168.2.1,4.5.6.0/24,192.168.2.1dhcp-range=set:subnet3,2001:4888:a03:313a:c0:fe0:0:c200,2001:4888:a03:313a:c0:fe0:0:c2ff,64,10m
dhcp-boot=pxelinux.0,localhost.localdomain,192.168.0.1
dhcp-sequential-ip
```

A line break should be added btween 192.168.2.1 and dhcp-range.

Changed in puppet-ironic:
importance: Undecided → High
assignee: nobody → Takashi Kajinami (kajinamit)
Changed in puppet-ironic:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to puppet-ironic (master)

Reviewed: https://review.opendev.org/c/openstack/puppet-ironic/+/899910
Committed: https://opendev.org/openstack/puppet-ironic/commit/e1a89eb585aedcaba57fcfde1585162d37a6c1ba
Submitter: "Zuul (22348)"
Branch: master

commit e1a89eb585aedcaba57fcfde1585162d37a6c1ba
Author: Takashi Kajinami <email address hidden>
Date: Thu Nov 2 13:24:58 2023 +0900

    inspector: Fix missing new line in dnsmasq.conf with multiple subnets

    ... and make pattern match for inspector dnsmasq.conf more
    strict to detect missing new lines or unnecessary elements.

    Closes-Bug: #2042526
    Change-Id: I03abeb7c1519f5a2cbcddaa3722d4053eab3566f

Changed in puppet-ironic:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to puppet-ironic (stable/2023.2)

Fix proposed to branch: stable/2023.2
Review: https://review.opendev.org/c/openstack/puppet-ironic/+/899834

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to puppet-ironic (stable/2023.2)

Reviewed: https://review.opendev.org/c/openstack/puppet-ironic/+/899834
Committed: https://opendev.org/openstack/puppet-ironic/commit/5d73c1aa1c02d42380735dc548e52a5a030e2fdf
Submitter: "Zuul (22348)"
Branch: stable/2023.2

commit 5d73c1aa1c02d42380735dc548e52a5a030e2fdf
Author: Takashi Kajinami <email address hidden>
Date: Thu Nov 2 13:24:58 2023 +0900

    inspector: Fix missing new line in dnsmasq.conf with multiple subnets

    ... and make pattern match for inspector dnsmasq.conf more
    strict to detect missing new lines or unnecessary elements.

    Closes-Bug: #2042526
    Change-Id: I03abeb7c1519f5a2cbcddaa3722d4053eab3566f
    (cherry picked from commit e1a89eb585aedcaba57fcfde1585162d37a6c1ba)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to puppet-ironic (stable/2023.1)

Fix proposed to branch: stable/2023.1
Review: https://review.opendev.org/c/openstack/puppet-ironic/+/900182

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to puppet-ironic (stable/2023.1)

Reviewed: https://review.opendev.org/c/openstack/puppet-ironic/+/900182
Committed: https://opendev.org/openstack/puppet-ironic/commit/c968ac85a0895c82411224ade3d0597722e81639
Submitter: "Zuul (22348)"
Branch: stable/2023.1

commit c968ac85a0895c82411224ade3d0597722e81639
Author: Takashi Kajinami <email address hidden>
Date: Thu Nov 2 13:24:58 2023 +0900

    inspector: Fix missing new line in dnsmasq.conf with multiple subnets

    ... and make pattern match for inspector dnsmasq.conf more
    strict to detect missing new lines or unnecessary elements.

    Closes-Bug: #2042526
    Change-Id: I03abeb7c1519f5a2cbcddaa3722d4053eab3566f
    (cherry picked from commit e1a89eb585aedcaba57fcfde1585162d37a6c1ba)
    (cherry picked from commit 5d73c1aa1c02d42380735dc548e52a5a030e2fdf)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to puppet-ironic (stable/zed)

Fix proposed to branch: stable/zed
Review: https://review.opendev.org/c/openstack/puppet-ironic/+/900319

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.