[Bug 863182] New: libvirtd virtual networking: Allow for dnsmasq to be disabled completely
https://bugzilla.novell.com/show_bug.cgi?id=863182 https://bugzilla.novell.com/show_bug.cgi?id=863182#c0 Summary: libvirtd virtual networking: Allow for dnsmasq to be disabled completely Classification: openSUSE Product: openSUSE 13.1 Version: Final Platform: All OS/Version: openSUSE 13.1 Status: NEW Severity: Enhancement Priority: P5 - None Component: Xen AssignedTo: jdouglas@suse.com ReportedBy: olafmartens@web.de QAContact: qa-bugs@suse.de Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:27.0) Gecko/20100101 Firefox/27.0 Whenever a virtual network is started, the dnsmasq server is also fired up by libvirtd even if it isn't needed (e. g. the entire DHCP configuration has been moved out to an external DHCP server, including any virtual interfaces). However, this situation is somewhat unsatisfactory, because the dnsmasq server uses up resources, although it is completely useless. Furthermore, attempting to fire up a dnsmasq instance for a virtual network is also likely going to cause trouble when an external DHCP server is running, thereby causing problems at VM startup. In case only static IP addresses are assigned on the virtual network, firing up a DHCP server becomes completely useless for such networks. Libvirtd should either refrain from launching dnsmasq if it doesn't find any settings at all that rely on dnsmasq, or an option should be added to manually disable starting dnsmasq (if set, libvirtd should either ignore any parameters that are forwarded to dnsmasq or complain about their presence). Reproducible: Always Steps to Reproduce: 1. Create a VM with a virtual network (not in bridged mode) that doesn't contain a <dhcp ... /> definition 2. Start the VM Actual Results: ps -ef | grep dnsmasq is going to show running instances of dnsmasq associated with libvirtd, although it is absolutely useless. Expected Results: dnsmasq shouldn't be started at all if none of the virtual networks requests DHCP services from libvirtd. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=863182 https://bugzilla.novell.com/show_bug.cgi?id=863182#c Charles Arnold <carnold@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|jdouglas@suse.com |jfehlig@suse.com QAContact|qa-bugs@suse.de |jdouglas@suse.com -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=863182 https://bugzilla.novell.com/show_bug.cgi?id=863182#c1 --- Comment #1 from Olaf Martens <olafmartens@web.de> 2014-03-30 03:56:47 UTC --- As an addition to this the <dhcp> element could receive an option to accommodate for the use of an external DHCP client (e. g. <dhcp external='dhcpd'/>). The reason behind this: When setting up virtual networks these interfaces are started way after the physical network has been brought up (and also after the dhcpd has already been started). In order to make it easier to use an external DHCP daemon this variant of a DHCP definition for libvirt would cause it to restart the DHCP daemon once all virtual interfaces have been brought up in dom0 and subsequently restart the DHCP daemon. This avoids a manual restart of the DHCP daemon to attach it to the virtual interfaces, because for some reason an attempt to order dhcpd.service (which on top of that still relies on System V Init instead of systemd) and libvirtd.service still causes any virtual interfaces to be brought up too late for dhcpd. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=863182 https://bugzilla.novell.com/show_bug.cgi?id=863182#c2 Cédric Bosdonnat <cbosdonnat@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |NEEDINFO CC| |cbosdonnat@suse.com InfoProvider| |olafmartens@web.de --- Comment #2 from Cédric Bosdonnat <cbosdonnat@suse.com> 2014-08-28 08:46:00 UTC --- Olaf, Could you please provide us the complete network configuration you are using? What is the reason not to use a bridged network if your DHCP is handled externally? We'll also need to have a detailed description of a sample network to setup, both on the libvirt host and the external DHCP server. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=863182 https://bugzilla.novell.com/show_bug.cgi?id=863182#c3 --- Comment #3 from Olaf Martens <olafmartens@web.de> 2014-08-31 14:17:42 CEST --- First of all, resorting to a routed instead of a bridged network configuration has the advantage that one has more control over the data traffic taking place - since the virtual interface is a separate network interface, it can be assigned to any firewall zones separately. Furthermore, the DHCP daemon is running on dom0 on the same machine that does the virtualization (maybe there's a misunderstanding here: With "external" I was referring to the DHCP daemon not being launched by libvirtd, but instead getting fired up stand-alone). If the DHCP server had been running on another machine, I would have resorted to the DHCP relay server instead... Since I'm already using dhcpd for serving any DHCP queries arriving at some of the physical interfaces it would be sensible to use that one to serve any DHCP requests from the virtual interface, too. So, FYI, here's what the network configuration looks like (using old-style identifiers for the sake of simplification): eth0 ---> Ethernet card, link to a subnet (uses dhcpd) wlan0 ---> Wireless adapter, link to a remote AP (starts dhcpcd to obtain an IP address) wlan1 ---> Wireless adapter, local AP in dom0 (uses dhcpd) veth0 ---> Virtual network, subnet for any VMs The point is that libvirtd is firing up an instance of dnsmasq when it brings up veth0 - however, since I have already set dhcpd up so that it serves any DHCP requests from the virtual network, dnsmasq is conflicting with dhcpd and therefore refuses to start. So, now my question is what exactly do you need (ifconfig output, config files, anything else)? That way I could provide the info all at once in order to avoid repeated requests... -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=863182 https://bugzilla.novell.com/show_bug.cgi?id=863182#c4 --- Comment #4 from Cédric Bosdonnat <cbosdonnat@suse.com> 2014-09-02 07:50:43 UTC --- I would at least need the xml definition of your virtual network. I'm interested in the forward mode you're using. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=863182 https://bugzilla.novell.com/show_bug.cgi?id=863182#c5 Olaf Martens <olafmartens@web.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |NEW InfoProvider|olafmartens@web.de | --- Comment #5 from Olaf Martens <olafmartens@web.de> 2014-09-02 15:36:53 CEST --- <network> <name>routed</name> <uuid>xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx</uuid> <forward mode='route'/> <bridge name='veth0' stp='on' delay='0'/> <mac address='xx:xx:xx:xx:xx:xx'/> <ip address='192.168.127.1' netmask='255.255.255.0'> </ip> </network> I had to use bridged mode here, because networked mode won't work. The bridge is attached to dom0 by a virtual NIC. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=863182 https://bugzilla.novell.com/show_bug.cgi?id=863182#c6 Cédric Bosdonnat <cbosdonnat@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |NEEDINFO InfoProvider| |olafmartens@web.de --- Comment #6 from Cédric Bosdonnat <cbosdonnat@suse.com> 2014-09-04 08:15:22 UTC --- libvirt starts dnsmasq if it can find an ipv4 or ipv6 address for the network... which is mandatory for a routed network. You could try the following: * Create a new bridge on your host, e.g. br0 * Use a bridged network with such a config: <network> <name>bridged</name> <forward mode='bridge'/> <bridge name='br0'/> </network> This way you can assign br0 to any zone you need in the firewall settings. I'm using such a configuration here everyday and it doesn't launch dnsmasq. As mentioned in the libvirt documentation, libvirt won't try to manage your bridge, it won't set any DNS/DHCP nor add any iptable rule. Could you try this and give me some feedback on it? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com