Fix the template's verbatim-copy conventions - #874
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two commits, together because the second depends on the first.
Remove the dead
_copy_without_renderlist. All three paths in it match zero files:keystone/wsgi-keystone.confwas deleted with the Keycloak configuration,neutron/ml2_conf.iniwas deleted in #645, and the haproxy glob no longer matches now that the overlay lives underservices.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.iniwith 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.confat systemd-resolved's stub, Kolla runs containers withnetwork_mode=hostand 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 withdns_serversset to the nameserver already supplied for resolvconf. Shipping it also removes a naming trap: Kolla merges exactly one filename fromnode_custom_config/neutron/by exact name, so a copy namedml2.confis silently inert.The ordering is why they are one PR:
_copy_without_rendernamesoverlays/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