Petr Horáček has uploaded a new change for review.

Change subject: net: native ovs: reserve ovsbr0 network name
......................................................................

net: native ovs: reserve ovsbr0 network name

Don't allow user to set network name 'ovsbr0' as it is reserved by
current Vdsm OVS implementation.

Change-Id: I8ca84142e8fa9f25e76378abe9d05b41af921e7f
Bug-Url: https://bugzilla.redhat.com/1195208
Signed-off-by: Petr Horáček <phora...@redhat.com>
---
M lib/vdsm/network/ovs/validator.py
1 file changed, 6 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/52/56452/1

diff --git a/lib/vdsm/network/ovs/validator.py 
b/lib/vdsm/network/ovs/validator.py
index 4c25078..78d1a63 100644
--- a/lib/vdsm/network/ovs/validator.py
+++ b/lib/vdsm/network/ovs/validator.py
@@ -22,6 +22,8 @@
 
 from vdsm.network import errors as ne
 
+from .constants import BRIDGE_NAME
+
 
 def _get_untagged_net(running_networks):
     for net, attrs in six.iteritems(running_networks):
@@ -42,6 +44,10 @@
     bond = attrs.get('bonding')
     vlan = attrs.get('vlan')
 
+    if net == BRIDGE_NAME:
+        raise ne.ConfigNetworkError(
+            ne.ERR_BAD_PARAMS, 'Network name %s is reserved' % net)
+
     if vlan is None:
         # TODO: We should support multiple utagged networks per hosts (probably
         # via multiple OVS bridges).


-- 
To view, visit https://gerrit.ovirt.org/56452
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8ca84142e8fa9f25e76378abe9d05b41af921e7f
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Petr Horáček <phora...@redhat.com>
_______________________________________________
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to