You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In internal/server/network/driver_bridge.go, Incus gathers invocation flags to pass to a dnsmasq instance, and then makes a stub empty dnsmasq.raw config file so incus will not read system dnsmasq.conf.
Nowhere is a network's dns.mode setting consulted, except to avoid adding -s, --interface-name and -S options to dnsmasq invocation. The daemon is still started even with dns.mode=none and the values of both ipv4.dhcp=false and ipv6.dhcp=false, it just doesn't get the above flags added to dnsmasq invocation in that case.
The daemon does not need to be started when nothing is using it (and explicitly disabled by configuration). My use case is complete static host db in /etc/hosts, and static ip address, done by cloud-init.
I could use an unmanaged network, but I like the bridge being created and given an IP address by Incus, and also retain option to use managed nat/firewall later. In the meantime, dnsmasq should not be started, as long as both dns and dhcp are not in use.
It looks like the dnsmasq code is not activated at all if there is no address (empty or "none") on the bridge itself, but I think this makes it unmanaged entirely, and would mean it has to be plumbed out of band from Incus. It would be useful if we could still have it declared as "managed" (and have firewall/nat features available) but without any DNS or DHCP.
If I may, here's a few thing I noticed: (1) it looks like you made the PR in your own repository, rather than this one; (2) you did not make a branch, but added the commit to main branch; (3) your commit message summary line does not match the format from other commits; (4) there appears to be noise in there from other unrelated PRs.
Regarding the code, if I can make a suggestion: instead of adding a condition to each location in the file that does something, only UsesDNSMasq() really needs to be modified, because it decides on whether the dnsmasq block gets run at all, so those individual conditions would be bypassed by changing it there [only].
In
internal/server/network/driver_bridge.go
, Incus gathers invocation flags to pass to a dnsmasq instance, and then makes a stub emptydnsmasq.raw
config file so incus will not read systemdnsmasq.conf
.Nowhere is a network's
dns.mode
setting consulted, except to avoid adding-s
,--interface-name
and-S
options to dnsmasq invocation. The daemon is still started even withdns.mode=none
and the values of bothipv4.dhcp=false
andipv6.dhcp=false
, it just doesn't get the above flags added todnsmasq
invocation in that case.The daemon does not need to be started when nothing is using it (and explicitly disabled by configuration). My use case is complete static host db in /etc/hosts, and static ip address, done by cloud-init.
I could use an unmanaged network, but I like the bridge being created and given an IP address by Incus, and also retain option to use managed nat/firewall later. In the meantime, dnsmasq should not be started, as long as both dns and dhcp are not in use.
Incus v6.7
The text was updated successfully, but these errors were encountered: