2
0
mirror of https://github.com/openvswitch/ovs synced 2025-10-09 13:49:05 +00:00
Commit Graph

18 Commits

Author SHA1 Message Date
Ian Campbell
9a2b117527 CP-1592: interface-reconfigure: Configure network device MTU from Network.MTU field
With override via other-config:mtu field on specific objects in the datamodel.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1267008538 0
# Node ID a91df72fd4bf6329831d3efcae45a5ff55e3ba2e
# Parent  219104a041786d7274b15800de5c3efccf0c4f42
2010-02-24 10:54:41 -08:00
Ben Pfaff
86e1bb44da xenserver: Add assertion and additional comments to ovs-vsctl commands.
I found these useful while debugging.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2010-02-23 09:55:41 -08:00
Ben Pfaff
7966caf4a0 xenserver: Remove a VLAN's bridge when bringing down its PIF.
Before, interface-reconfigure would only bring remove a VLAN's bridge
incidentally as part of removing its datapath's bridge.  This commit fixes
it.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2010-02-23 09:55:39 -08:00
Ben Pfaff
2a75efe823 xenserver: Avoid doing unneeded work in deconfigure_datapath().
Deleting a bridge deletes all of its ports, too, so there's no benefit in
doing so manually beforehand.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2010-02-23 09:55:37 -08:00
Ben Pfaff
c0a50086d9 xenserver: Set xs-network-uuids for both datapath and VLAN bridges.
It makes sense to set xs-network-uuids for every bridge, so this commit
does so.  It also makes the code a bit more readable by factoring logic
out into a new function.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2010-02-23 09:55:35 -08:00
Ben Pfaff
56cac225ae xenserver: Always call ovs-vsctl in bring_down().
The datapath_modify_config() call here was at the wrong level of
indentation, so it was only getting called if 'dp' was to be deleted.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2010-02-23 09:52:39 -08:00
Ben Pfaff
d77ffabfbc xenserver: Fix bringing up VLAN PIFs.
In configure_datapath(), bringing up a VLAN PIF's datapath is no different
from bringing up a non-VLAN PIF's datapath, but the code was making
unnecessary distinctions.  Also, the test
	if parent and datapath:
did not work at all, because there was no variable named 'datapath' in
scope and no obvious source of one.

In preconfigure(), it then becomes necessary to create a VLAN bridge for a
VLAN PIF, in a straightforward way.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2010-02-23 09:52:18 -08:00
Ben Pfaff
96c7918c40 xenserver: Hoist identical bridge and vswitch functions into common code.
The previous commit made pif_bridge_name() in the bridge and vswitch
versions of interface-reconfigure functionally identical, so this commit
hoists them into a single common implementation in InterfaceReconfigure.py.

pif_is_bridged() also comes along for the ride because it is also generic
and because it is logically related.  Only the bridge code uses it at the
moment.

Suggested-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2010-02-23 09:52:13 -08:00
Ben Pfaff
6987c81c05 xenserver: Accept VLAN PIFs in pif_bridge_name().
pif_bridge_name() was written when the vswitch interface-reconfigure was
working with the raw Open vSwitch configuration via ovs-cfg-mod.  Then,
it made no sense to ask for the "bridge name" of a VLAN PIF, because a
VLAN PIF didn't have a bridge.

Now, however, the vSwitch interface-reconfigure works with ovs-vsctl, which
provides a thin layer over the OVS configuration that makes VLAN bridges
appear to exist.  So now it makes sense to ask for the bridge of a VLAN
PIF, and this commit enables that.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2010-02-23 09:51:59 -08:00
Ben Pfaff
7c79588e00 xenserver: Delete ports by interface name.
ovs-vsctl command "--if-exists del-port eth0" does nothing if eth0 is on
a bridge as part of a bond, because the bond's port name is not eth0 but
something else.  But interface-reconfigure needs to do that, so this commit
adds that ability to ovs-vsctl and modifies interface-reconfigure to use it.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2010-02-23 09:51:44 -08:00
Ben Pfaff
3b1acc9955 xenserver: Fix comment in interface-reconfigure.
This comment was accurate, but didn't actually say what the function did.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2010-02-23 09:51:33 -08:00
Ben Pfaff
c69ee87c10 Merge "master" into "next".
The main change here is the need to update all of the uses of UNUSED in
the next branch to OVS_UNUSED as it is now spelled on "master".
2010-02-11 11:11:23 -08:00
Ben Pfaff
e91087c7f9 xenserver: Fix bond configuration.
This bug was introduced as part of the merge from "master" and does not
therefore exist in Citrix upstream code.
2010-02-10 16:57:48 -08:00
Ben Pfaff
7b09e42666 xenserver: Fix failure to bring up secondary management interfaces.
When a secondary management interface is configured on a XenServer,
interface-reconfigure would fail to bring it up because it would attempt
to add a bridge that already exists.  This commit makes it tolerate that
situation.
2010-02-09 12:13:52 -08:00
Justin Pettit
13ffee26f1 xenserver: Various cleanups to get OVS to work with XenServer 5.5 2010-02-06 20:48:48 -08:00
Justin Pettit
a4af00400a Merge branch 'master' into next
Conflicts:
	COPYING
	datapath/datapath.h
	lib/automake.mk
	lib/dpif-provider.h
	lib/dpif.c
	lib/hmap.h
	lib/netdev-provider.h
	lib/netdev.c
	lib/stream-ssl.h
	ofproto/executer.c
	ofproto/ofproto.c
	ofproto/ofproto.h
	tests/automake.mk
	utilities/ovs-ofctl.c
	utilities/ovs-vsctl.in
	vswitchd/ovs-vswitchd.conf.5.in
	xenserver/etc_init.d_vswitch
	xenserver/etc_xensource_scripts_vif
	xenserver/opt_xensource_libexec_interface-reconfigure
2010-02-05 17:14:55 -08:00
Ian Campbell
66aeba23bd CA-37154: vswitch: Use MAC address of tagged PIF for VLAN fake-bridge
This is because PIF.MAC for a VLAN is FE:FF:FF:FF:FF:FF. In bridge
mode the VLAN and the bridge naturally pick up the underlying MAC
address from the physical device but under vswitch we must explicitly
specify it and we are currently specifying
FE:FF:FF:FF:FF. interface-reconfigure needs to use the MAC address of
the tagged PIF not the untagged PIF.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1265020755 0
# Node ID d7fc59d6a274334377fdbb09dcaf80a76431bcdb
# Parent  a6f27b5a3096ce627b5003c7be19ca59f7dd9606
2010-02-01 09:50:14 -08:00
Ian Campbell
b3080599f6 xenserver: Update interface-reconfigure and vif integration scripts.
This patch updates the versions of the host integration scripts to
what is present in the recent XCP update and the next release of
XenServer (5.6). I think it probably works on 5.5 as well but I
haven't verified that.

These new versions support runtime selection of the Linux bridging vs
vswitch through the toolstack. The patch includes the necessary
reconfiguration (rewriting /etc/xensource/network.conf) to enable
vswitch in the RPM %post stage.

The RPM spec file integration is only lightly tested, seems to work
for me.

This commit is as provided by Ian Campbell, with a few minor tweaks:

    - Updated xenserver/automake.mk to distribute the added files.

    - Updated RPM spec file not to complain if the added files do
      not already exist (since they do not exist on XenServer 5.5.0).

    - Change location of dbcache back to /var/lib/openvswitch/dbcache
      so that this can coexist with our other internal builds.
      (Undoubtedly we will have to adopt the new location chosen by Ian
      eventually, however.)
2010-01-25 10:36:08 -08:00