Bug 501912

Summary: libvirt does not activate bridge if no IP address is assigned
Product: [Fedora] Fedora Reporter: Peter Bieringer <pb>
Component: libvirtAssignee: Daniel Veillard <veillard>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: berrange, clalance, crobinso, itamar, markmc, veillard, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 0.6.2-11.fc11 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-06-04 17:21:24 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Bug Depends On:    
Bug Blocks: 480594    

Description Peter Bieringer 2009-05-21 06:00:43 EDT
Description of problem:
I run some tests with DHCP servers (IPv4 and IPv6) in qemu KVM and therefore I need an isolated network inside. I found, that defined bridge is configured, but not activated, if no IPv4 settings are given.

Version-Release number of selected component (if applicable):
$ rpm -qa |grep virt
python-virtinst-0.400.3-1.fc10.noarch
virt-viewer-0.0.3-3.fc10.i386
virt-mem-0.2.9-6.fc10.i386
libvirt-0.5.1-2.fc10.i386
virt-manager-0.6.0-5.fc10.i386
libvirt-python-0.5.1-2.fc10.i386
virt-top-1.0.3-2.fc10.i386

How reproducible:
Always

Steps to Reproduce:
1. Setup isolated network
# cat /etc/libvirt/qemu/networks/IPv6internal.xml 
<network>
  <name>IPv6internal</name>
  <uuid>****</uuid>
  <bridge stp='on' forwardDelay='0' />
  <!--
  <ip address='192.168.100.1' netmask='255.255.255.0'>
    <dhcp>
      <range start='192.168.100.128' end='192.168.100.254' />
    </dhcp>
  </ip>
  -->
</network>v


2. Configure VMs to be isolated (e.g. a dhcp server and a client)

3. try to use DHCPv4 or DHCPv6
  
Actual results:
No packets seen on dhcp server

No wonder, bridge is down:

16: virbr1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN 
    link/ether 06:c3:8b:**:**:** brd ff:ff:ff:ff:ff:ff

Expected results:
Packets seen


Additional info:
Have to enable virbr1 manually by 

# ip link set virbr1 up


Note, this does not happen on another bridge with bridge-DHCP enabled.

But it makes no sense imho to bring this virbr1 not up in case of no IP address is assigned.
Comment 1 Daniel Berrange 2009-05-21 06:09:33 EDT
Sounds like you're hitting this bug that one of the Suse devs provide a patch for a few weeks back:

http://git.et.redhat.com/?p=libvirt.git;a=commit;h=4db7474b0c1907e877d7206edeb4d73962971096
Comment 2 Peter Bieringer 2009-05-21 06:29:01 EDT
Yes, looks like this would help, when I can expect a new RPM on rawhide including this patch?
Comment 3 Mark McLoughlin 2009-05-25 11:25:26 EDT
Building this for F-11 and will push to updates-testing

Please try it out and add a +/- comment to the update

* Mon May 25 2009 Mark McLoughlin <markmc@redhat.com> - 0.6.2-11.fc11
- Bring up the bridge, even if it doesn't have an IP address (bug #501912)
Comment 4 Fedora Update System 2009-05-25 11:41:50 EDT
libvirt-0.6.2-11.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/libvirt-0.6.2-11.fc11
Comment 5 Peter Bieringer 2009-05-25 16:58:23 EDT
libvirt-0.6.2-11.fc11 works now as expected, virbr is up while no IPv4 address is specified in xml - thank you for fast fix.
Comment 6 Fedora Update System 2009-05-26 03:57:27 EDT
libvirt-0.6.2-11.fc11 has been pushed to the Fedora 11 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update libvirt'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2009-5515
Comment 7 Fedora Update System 2009-06-04 17:20:57 EDT
libvirt-0.6.2-11.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.