Conversation
✅MegaLinter analysis: Success
See detailed reports in MegaLinter artifacts Your project could benefit from a custom flavor, which would allow you to run only the linters you need, and thus improve runtime performances. (Skip this info by defining
|
|
Ideally, we'd have an optional setting in https://github.com/openstack/kolla-ansible/blob/master/ansible/roles/neutron/templates/ml2_conf.ini.j2, no? |
kolla's merge_configs already merges custom configs. Having the two lines as documented in the file is sufficient. |
3c2f8f4 to
3313e7c
Compare
The configuration guide does not mention instance DNS anywhere, yet every OVN deployment has to make a decision about it, because the fallback that applies when nothing is configured does not work on OSISM. Neutron picks the DNS servers it advertises to instances from the subnet's dns_nameservers, else the [ovn] dns_servers option, else the resolvers of the host running neutron-server. That last step is the problem: the osism.commons.resolvconf role deliberately points /etc/resolv.conf at the systemd-resolved stub (127.0.0.53) and keeps the real upstream resolvers in resolved.conf. Syntactic validity is the only test neutron applies to the entries it reads there, so the loopback stub passes, and the containers run in the host network namespace, so 127.0.0.53 is what reaches the instances, where it resolves nothing. An instance on a subnet without dns_nameservers then has no working DNS at all. The failure is silent. For IPv4 neutron warns only when it finds no resolver at all, and the stub is a syntactically valid address, so there is nothing for it to warn about; the DHCPv6 path omits the option without warning either way. This is not an upstream bug -- the precedence is deliberate and documented, and per-subnet DNS is the recommended path -- but nothing told OSISM operators about the interaction, so each one rediscovers it and hand-writes the same overlay. Document the precedence, the fallback caveat, and the [ovn] dns_servers override, next to the MTU section that already points at the same overlay file. Cover three behaviours an operator meets after setting the option: * dns_servers is a single list filtered per IP version, so an IPv4-only list leaves IPv6 subnets falling through to the host resolvers, which on a systemd-resolved host are IPv4-only as well -- the DHCPv6 reply then carries no DNS server at all. * 0.0.0.0 (IPv4) and :: (IPv6) suppress the DHCP option, but only as the sole remaining entry for that IP version. * A changed [ovn] dns_servers does not reach subnets that already exist. Neutron reconciles them at startup only when neutron_sync_mode is set to repair, and the default is log, so a restart on its own changes nothing. The subnet has to be updated, and an update that changes no attribute sends no request at all. Also note that neutron_dnsmasq_dns_servers, which defaults to public resolvers, only applies to the ML2/OVS DHCP agent and does nothing on an OVN deployment -- a reasonable thing to expect to help, and it does not. Assisted-by: Claude:claude-opus-5 Signed-off-by: Roger Luethi <luethi@osism.tech>
3313e7c to
a9dd1c6
Compare

What
Adds a DNS Resolution for Instances (OVN) section to the Neutron configuration guide, documenting which DNS servers Neutron hands to instances and how to control them on an OSISM deployment.
Why
The precedence itself is upstream-documented — subnet
dns_nameservers, thendns_serversin the[ovn]section, then the resolvers of the host runningneutron-server. The third level is the problem, and nothing in the guide says so.osism.commons.resolvconfpoints/etc/resolv.confat thesystemd-resolvedstub (127.0.0.53) and keeps the real upstream resolvers inresolved.conf. Syntactic validity is the only test Neutron applies to the entries it reads there, so the loopback stub passes, and the containers run in the host network namespace —127.0.0.53is what reaches the instances, where it resolves nothing. An instance on a subnet withoutdns_nameserversthen has no working DNS at all, internal name resolution included.The failure is silent on both DHCP paths: for IPv4 Neutron warns only when it finds no resolver, and the stub is a valid address; the DHCPv6 path omits the option without warning either way.
How
dns_nameserversas the recommended approach.environments/kolla/files/overlays/neutron/ml2_conf.ini.0.0.0.0/::suppress the DHCP option, but only as the sole remaining entry for that IP version; and a changed[ovn] dns_serversdoes not reach subnets that already exist, becauseneutron_sync_modedefaults tolog.neutron_dnsmasq_dns_servers, which defaults to public resolvers, applies only to the ML2/OVS DHCP agent and has no effect under OVN.Verification
Checked against a live OVN deployment, not only against the source:
neutron_serverruns withNetworkMode: host, and/etc/resolv.confinside the container isnameserver 127.0.0.53— the exact file Neutron reads for level 3.dns_nameserversreceiveddns_server="{9.9.9.9, 149.112.112.9}"from[ovn] dns_servers; its IPv6 sibling received nodns_serverkey at all, the config list being IPv4-only.[ovn] dns_serversand restartingneutron-serveron all three control nodes, existing subnets kept their old resolvers across six minutes with no API activity; a subnet created afterwards got the new ones; a subnet update then flipped the existing one. An update that changes no attribute has no effect — the client sends no request and still exits successfully.Markdown-only addition to an existing page;
yarn buildhas not been run locally.Related
Top of a two-PR stack. This section cross-references Customization of the service configurations, which the PR below repairs, so that one merges first:
🤖 Generated with Claude Code