[PATCH v2 0/2] network_conf: check if bridge exists on host for user created bridges

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch fixes the below problem.

==============================
If the bridge name is not mentioned in the <network> xml, the bridge name is
auto generated from virNetworkAllocateBridge(). If the default template named
bridge is created manually by a user, the bridge start will fail with
"File exists".

bash-4.3$ sudo brctl addbr virbr1

bash-4.3$ brctl show
bridge name bridge id STP enabled interfaces
br0 8000.000000000000 no
virbr0 8000.525400a91d03 yes virbr0-nic
virbr1 8000.000000000000 no

bash-4.3$ sudo virsh net-list --all
 Name                 State      Autostart     Persistent
----------------------------------------------------------
 default              active     no            yes

bash-4.3$ cat /tmp/isolated # Notice that the <bridge> intentionally not given.
<network>
  <name>isolated</name>
  <forward/>
  <ip address="192.168.123.1" netmask="255.255.255.0">
    <dhcp>
      <range start="192.168.123.2" end="192.168.123.254"/>
    </dhcp>
  </ip>
</network>

bash-4.3$ sudo virsh net-create /tmp/isolated
error: Failed to create network from isolated
error: Unable to create bridge virbr1: File exists
===============================

---

Shivaprasad G Bhat (2):
      cleanup conf/device_conf.h reference from util/virnetdev.h
      network_conf: check if bridge exists on host for user created bridges


 src/Makefile.am         |    3 +--
 src/conf/device_conf.h  |   21 +--------------------
 src/conf/network_conf.c |   11 +++++++++--
 src/util/virnetdev.h    |   21 ++++++++++++++++++++-
 4 files changed, 31 insertions(+), 25 deletions(-)

--
Signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]