Red Hat Bugzilla – Full Text Bug Listing
|Summary:||DHCP fails if running on a DHCP server|
|Product:||[Fedora] Fedora||Reporter:||Tim Waugh <twaugh>|
|Component:||libvirt||Assignee:||Daniel Veillard <veillard>|
|Status:||CLOSED WONTFIX||QA Contact:||Fedora Extras Quality Assurance <extras-qa>|
|Version:||9||CC:||berrange, briemers, virt-maint|
|Fixed In Version:||Doc Type:||Bug Fix|
|Doc Text:||Story Points:||---|
|Last Closed:||2009-07-14 12:40:10 EDT||Type:||---|
|oVirt Team:||---||RHEL 7.3 requirements from Atomic Host:|
Description Tim Waugh 2008-06-28 07:42:48 EDT
Description of problem: If libvirt is running on a machine that already provides a DHCP server for a local network, the dnsmasq DHCP server does not seem to receive BOOTPC packets at all. One way round this is to define a subnet for 192.168.122.0/24 in /etc/dhcpd.conf; however, the dhcp service starts up before libvirtd, and this means that the interface does not yet exist. As a result it is ignored by dhcpd. Version-Release number of selected component (if applicable): dhcp-4.0.0-14.fc9.x86_64 libvirt-0.4.2-3.fc9.x86_64 How reproducible: 100% Steps to Reproduce: 1.Install libvirt on a machine that is already acting as a DHCP server 2.Run a guest Actual results: The guest cannot obtain an IP address. Expected results: The guest obtains an IP address from 192.168.122.0/24. If necessary, this can be achieved by removing the 'dhcp' tag from /etc/libvirt/qemu/networks/default.xml and defining a subnet clause in /etc/dhcpd.conf.
Comment 1 Bill C. Riemers 2008-09-04 04:22:12 EDT
I just ran into a slight variation of this problem. It seems libvirt won't start dhcp for the virtual subnet if dnsmasq is already running. I was only running dnsmasq for DNS and not for DHCP on interface=lo. I was able to resolve the problem by adding in interface=virbr0 to my dnsmasq.conf, and appropriate dhcp settings for that interface. It seems to me rather than trying to make libvirt handle all possible conflicts, a simple and acceptable solution would be to at least notify the user of the conflict and point them to an FAQ or such on how to solve it. Bill
Comment 2 Daniel Berrange 2009-01-22 08:14:19 EST
libvirt is already doing the maximum it can do to avoid conflicting, by making sure its own dnsmasq instance only binds to explicit IP addresses. If there's an existing DHCP daemon bound to all IPs, its pretty much game over for what we need to be able to provide. I'm not sure there's an easy way for us to detect the problem either - since DHCP is UDP based, we can't do a simple 'connect()' call to check if something's on the port - connect() always works for UDP regardless of whether anything's listening. There is also no easy way to get feedback to the user, because the conflict will typically occurr during machine startup, where there's no useful UI - we can't block the initscript waiting to see if dnsmsaq starts OK, because that unacceptably delays the boot process.
Comment 3 Tim Waugh 2009-01-22 08:26:33 EST
Perhaps the answer is to make dhcpd allow configuration for interfaces that do not exist at start-up, and apply that configuration if those interfaces appear during runtime.
Comment 4 Bug Zapper 2009-06-09 21:49:01 EDT
This message is a reminder that Fedora 9 is nearing its end of life. Approximately 30 (thirty) days from now Fedora will stop maintaining and issuing updates for Fedora 9. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as WONTFIX if it remains open with a Fedora 'version' of '9'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version prior to Fedora 9's end of life. Bug Reporter: Thank you for reporting this issue and we are sorry that we may not be able to fix it before Fedora 9 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora please change the 'version' of this bug to the applicable version. If you are unable to change the version, please add a comment here and someone will do it for you. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. The process we are following is described here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 5 Bug Zapper 2009-07-14 12:40:10 EDT
Fedora 9 changed to end-of-life (EOL) status on 2009-07-10. Fedora 9 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. Thank you for reporting this bug and we are sorry it could not be fixed.