Skip to content

Fix the template's verbatim-copy conventions - #874

Merged
berendt merged 2 commits into
mainfrom
pr/overlay-render-conventions
Sep 15, 2026
Merged

berendt merged 2 commits into
mainfrom
pr/overlay-render-conventions

Conversation

@ideaship

Copy link
Copy Markdown
Contributor

Two commits, together because the second depends on the first.

Remove the dead _copy_without_render list. All three paths in it match zero files: keystone/wsgi-keystone.conf was deleted with the Keycloak configuration, neutron/ml2_conf.ini was deleted in #645, and the haproxy glob no longer matches now that the overlay lives under services.d/ with a cookiecutter-conditional filename. Nothing loses protection — the template migrated to {% raw %} blocks, which protect the content while still letting the filename be a cookiecutter expression. Removing the entries empties the key, so it goes entirely, leaving one stated convention instead of two of which the documented one pointed at files that do not exist.

Ship overlays/neutron/ml2_conf.ini with OVN resolvers. Every OVN deployment has to decide which resolvers Neutron advertises to instances, and on OSISM the fallback is actively broken rather than merely unset: the resolvconf role points /etc/resolv.conf at systemd-resolved's stub, Kolla runs containers with network_mode=host and no resolv.conf bind-mount, and Neutron does not filter loopback — so a subnet with no nameservers of its own advertises a dead resolver. The file is emitted with dns_servers set to the nameserver already supplied for resolvconf. Shipping it also removes a naming trap: Kolla merges exactly one filename from node_custom_config/neutron/ by exact name, so a copy named ml2.conf is silently inert.

The ordering is why they are one PR: _copy_without_render names overlays/neutron/ml2_conf.ini, so adding that file while the key still exists would have cookiecutter copy it verbatim and ship {{cookiecutter.name_server}} unrendered.

MTU is the other setting configured through this file. It is left commented rather than omitted — the right values depend on the underlay, but the keys belong in the file that configures them, where they can be found by grepping for what one is trying to change.

🤖 Generated with Claude Code

The three paths in _copy_without_render all match zero files, and have
for a long time:

  environments/kolla/files/overlays/keystone/wsgi-keystone.conf
      deleted 2025-02-02 by c16d604, which removed the Keycloak
      specific configuration but left this reference behind in the
      same file, one key away
  environments/kolla/files/overlays/haproxy/haproxy.cfg.*
      the haproxy overlay moved to haproxy/services.d/, where the one
      file has a cookiecutter-conditional name that this glob cannot
      match and must not, since that name has to be rendered
  environments/kolla/files/overlays/neutron/ml2_conf.ini
      deleted 2024-06-26 by #645

Nothing is losing verbatim-copy protection: the template migrated to
{% raw %} blocks, which protect the content while still allowing the
filename to be a cookiecutter expression. Every template file whose
content carries Jinja without a cookiecutter reference was checked and
uses a raw block.

Removing the three entries empties the key, so drop it entirely. That
leaves {% raw %} as the single stated convention, instead of two
conventions of which the documented one points at files that do not
exist -- a contributor adding a file with Ansible Jinja in it currently
has no way to tell which is current.

Assisted-by: Claude:claude-opus-5
Signed-off-by: Roger Luethi <luethi@osism.tech>
Every OVN deployment has to decide which resolvers Neutron advertises to
instances, and on OSISM the fallback is actively broken rather than
merely unset.

Neutron resolves guest DNS by a three-level precedence: the subnet's own
dns_nameservers, else [ovn] dns_servers, else the resolvers on the
neutron-server host. The third level is the trap. The resolvconf role
points /etc/resolv.conf at systemd-resolved's stub, Kolla runs its
containers with network_mode=host and no resolv.conf bind-mount, and
Neutron does not filter loopback -- so every subnet that carries no
nameservers of its own advertises 127.0.0.53 to its instances, where
nothing is listening.

Emit the file with dns_servers set to the nameserver the operator has
already supplied for resolvconf. The osism/testbed configuration sets
this same key in this same file, for the same reason.

Shipping the file also removes a naming trap. Kolla merges exactly one
filename from node_custom_config/neutron/ and matches it by exact name,
with nothing globbing the directory and nothing warning. A copy named
ml2.conf, or one left at the overlays top level, is therefore inert: the
deploy succeeds and the settings never reach Neutron. An operator
editing a file that is already in the right place cannot make that
mistake.

MTU is the other setting configured through this file. It is left
commented rather than omitted: the correct values depend on the underlay
so there is no default worth shipping, but the keys belong in the file
that configures them, where someone can find them by grepping for what
they are trying to change. The commented values are annotated with what
they assume about the underlay, so they read as an example rather than a
recommendation, plus a pointer to "MTU Considerations" in the
configuration guide.

Note the guide already named this path before the template shipped the
file.

Assisted-by: Claude:claude-opus-5
Signed-off-by: Roger Luethi <luethi@osism.tech>
@ideaship ideaship self-assigned this Sep 15, 2026
@ideaship
ideaship marked this pull request as ready for review September 15, 2026 06:49
@ideaship
ideaship requested a review from berendt September 15, 2026 06:49
@berendt
berendt merged commit 7b79326 into main Sep 15, 2026
3 checks passed
@berendt
berendt deleted the pr/overlay-render-conventions branch September 15, 2026 08:54
@github-project-automation github-project-automation Bot moved this from New to Done in Human Board Sep 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants