David Scott [Mon, 23 Aug 2010 12:16:56 +0000 (13:16 +0100)]
CA-43021: hook in 'sparse_dd' for improved VM.copy performance
On local LVHD, VM.copies of freshly installed guests are much quicker:
Guest Previous VM.copy time New VM.copy time Speedup
----------------------------------------------------------------
Debian Lenny 2:11 1:18 40%
Windows 7 14:18 7:57 44%
Signed-off-by: David Scott <dave.scott@eu.citrix.com>
David Scott [Mon, 23 Aug 2010 12:16:50 +0000 (13:16 +0100)]
CA-43021: More refactorings of the sparse_dd binary.
Split the DD operation into a 'fold' and a 'copy' (where the latter contains the side-effects, computes stats etc)
Move the substring record type into the Zerocheck module.
Signed-off-by: David Scott <dave.scott@eu.citrix.com>
David Scott [Mon, 23 Aug 2010 12:16:49 +0000 (13:16 +0100)]
CA-43021: Small refactorings of the new sparse_dd code.
Split the 'Stream' signature into two since we don't have to be reading and writing to the same kind of data.
Add a convenient 'substring' record type rather than passing around multiple arguments all the time.
Signed-off-by: David Scott <dave.scott@eu.citrix.com>
David Scott [Mon, 23 Aug 2010 12:05:49 +0000 (13:05 +0100)]
CP-1884: The pool master should forward VDI.copy calls to a host which can see the source SR; now that we have cross-host copying it isn't necessary to be able to find a host which can see both the source and destination SRs.
Signed-off-by: David Scott <dave.scott@eu.citrix.com>
David Scott [Mon, 23 Aug 2010 12:05:47 +0000 (13:05 +0100)]
CP-1883: Allow raw VDI import to receive an export-like chunked encoding.
The raw VDI import HTTP handler currently assumes the whole disk is being uploaded at once. Instead we add a 'chunked' mode which allows arbitrary-sized disk blocks to be selectively uploaded.
Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Rob Hoes [Wed, 14 Jul 2010 15:44:47 +0000 (16:44 +0100)]
Update firstboot network data before pool eject
When a host is ejected from a pool, its XAPI database objects are removed and recreated by the firstboot scripts after the host reboots. The data used by the firstboot scripts is stored when the host is installed, and never updated anymore after that. Part of the firstboot data is the assignment and IP configuration of the management interface.
This patch updates the firstboot data to reflect the current configuration of the management interface on pool eject, such that after the reboot, management is configured in the same way as before. As pool eject removes any bonds, in case management is on a bond, one of the slaves is chosen to become the new management interface.
Rob Hoes [Wed, 14 Jul 2010 15:44:47 +0000 (16:44 +0100)]
Introduce PIF.scan_bios
This function is similar to PIF.scan, but uses biosdevname to determine the device names of the network interfaces. The patch also add an extra check to the PIF introduce code to ensure that no new PIF is created if one already exists with the same device name.
Rob Hoes [Wed, 14 Jul 2010 15:43:32 +0000 (16:43 +0100)]
Rewrite feature restrictions code
This patch replaces restrictions.ml by features.ml and editions.ml, and splits up license.ml in three separate files (license.ml, license_init.ml and license_file.ml).
The Features module controls which XCP features are enabled. The Editions module defines "editions", which are sets of features that are enabled. An XCP host is always running as (exactly) one particular edition. Currently, there is just one edition defined, called "Free" (for backwards compatibility), in which all currently implemented features are enabled.
One use of this is that new or experimental features can be enabled only in special editions to keep them separate from the stable version of XCP.
From 92e906e484fac90d5c5618f2bca33f595ad2e390 Mon Sep 17 00:00:00 2001
Date: Wed, 23 Jun 2010 09:18:57 +0100
Only the vswitch backend is able to implement CHIN.
Rob Hoes [Wed, 14 Jul 2010 15:43:28 +0000 (16:43 +0100)]
Tunnelling: synchronise tunnels with the pool master when a slave starts up
Just like for bonds and VLANs, tunnels should be synchronised with the pool master and all pool slaves. This code ensure that tunnels are synchronised when xapi starts up on a slave, which is especially important after a pool join.
Rob Hoes [Wed, 14 Jul 2010 15:43:28 +0000 (16:43 +0100)]
VSwitch controller field may be blank on pool join
If the pool.vswitch_controller field is blank on a joining host, but not on the pool, the join is allowed. The openvswitch in the joining host will be controlled by the pool's controller.
Zheng Li [Wed, 16 Jun 2010 15:26:42 +0000 (16:26 +0100)]
Some minor improvements to the with-vdi script
- return the user command's exit code as the exit code of with-vdi script (unless something else failed in the preparation or post run steps)
- relax the requirement on the user command parameter, both absolute paths and in-paths executables are acceptable
- allow a user command to have its own arguments (i.e. with-vdi vdi-uuid user-command arg1 arg2 ... argn)
Alex Zeffertt [Thu, 8 Jul 2010 13:54:31 +0000 (14:54 +0100)]
Coalesce RHEL/CentOS/OEL 5.x templates into one template per distro per arch
Create 6 new templates (RHEL,CentOS,OEL)*(i386,x86_64) that can be used to
install 5.x point release.
For now we leave the old templates in place to prevent a failure in the
regression testing. However, when XenRT has been updated to use the new
templates we shall remove the old ones.
Signed-off-by: Alex Zeffertt <alex.zeffertt@eu.citrix.com>
Rob Hoes [Thu, 8 Jul 2010 13:50:44 +0000 (14:50 +0100)]
Improve import of networks/VIFs on pool join
Metadata export+import is used to recreate VIFs on the pool, when a host joins. VIFs are linked to networks on the receiving pool by matching the name_label of the network on the two pools. If the name_label does not exist, this has to be because an existing physical network on the receiving pool is used; in this case, we match on bridge name. This is a sensible fall-back option for imports in general.
Rob Hoes [Thu, 8 Jul 2010 13:47:51 +0000 (14:47 +0100)]
Improve network recreation on pool join
When joining a new host to a pool:
* Networks of physical interfaces are copied to the pool's DB if they do not yet exists; matching is done based on the bridge name (xenbr0, xenbr1, ...).
* All other networks are recreated on the pool. The bridge (xapi0, xapi1, ...) is renamed such that it is unique on the pool. All other network fields are copied from the host's network object.
Ian Campbell [Thu, 8 Jul 2010 13:35:13 +0000 (14:35 +0100)]
vswitch: pass network uuid to vswitch when creating an internal network
For external networks this is taken care of by interface-reconfigure
but in the internal network case there is currently no callout so
simply pass the network uuid when creating calling out to create the
bridge.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Ben Pfaff [Thu, 8 Jul 2010 13:33:34 +0000 (14:33 +0100)]
[PATCH] xenserver: Avoid errors from ovs-vsctl at system shutdown.
From ab32de001f10ddcb119360744c078ed9c1aebb06 Mon Sep 17 00:00:00 2001
Date: Fri, 25 Jun 2010 13:57:22 -0700
Commit 823c5699 "interface-reconfigure: callout to datapath backend class
method on rewrite" changed "interface-reconfigure rewrite" to update
bridge external-ids in the vswitch database. But this had the side effect
of causing errors at system shutdown, since ovsdb-server gets shut down
before the rewrite action is called. This commit fixes the problem by
skipping the update if the database socket does not exist. (It's just
fine to skip the update, since the external-ids will be re-set the next
time the system boots anyhow.)
This commit fixed the problem on 5.6.810-34773p for me. I don't see the
problem at all on 5.5.0. Presumably system shutdown order has changed.
Ben Pfaff [Thu, 8 Jul 2010 13:33:26 +0000 (14:33 +0100)]
[PATCH] xenserver: Kill bond master's dhclient when bringing up bond slave.
From fe19e820e4e543ee29b1b159be8ef8ee03947650 Mon Sep 17 00:00:00 2001
Date: Mon, 28 Jun 2010 10:34:10 -0700
interface-reconfigure is never explicitly called to down a bond master.
However, when it is called to up a slave it is implicit that we are
destroying the master. The "bridge" version of interface-reconfigure
always "ifdown"s the bond master in such a case, but until now the
"vswitch" version has not done so. Usually, it doesn't matter, because
the bond master network device disappears when the slave is brought up,
but one case was missed: for a bond master with an IP address obtained
via DHCP, the dhclient process needs to be killed, and we were not doing
it. This commit starts doing it (by invoking ifdown on the bond master).
The dhclient process that hangs around doesn't cause problems until the
bond master is brought back up, at which point "ifup" fails because it
refuses to start another dhclient for the same interface.
The converse behavior is also important; that is, when a bond PIF is
brought up, interface-reconfigure is expected to implicitly take down its
slave PIFs. My testing (on 5.5.0) shows that this behavior is already
correct. At any rate, this commit does not change that behavior.
Ian Campbell [Thu, 8 Jul 2010 13:33:23 +0000 (14:33 +0100)]
[PATCH] interface-reconfigure: callout to datapath backend class method on rewrite
From 823c5699d4de7bf726f988e1ca6197fb2400f388 Mon Sep 17 00:00:00 2001
Date: Fri, 4 Jun 2010 16:39:10 +0100
Use this mechanism to allow the vswitch backend to update the vswitch
configuration's mapping from datapath to XenAPI datamodel Network
UUIDs. The vswitch needs a mechanism to update these when they change
(i.e. on pool join and eject).
Refactor the DatapathFactory method to return the class which the
caller can instantiate or not as the require.
[PATCH] xenserver: Clean-up space/tabs issues in vif script
From 291a0f6b6e05fe5be28b935436abb5a958334885 Mon Sep 17 00:00:00 2001
Date: Wed, 21 Apr 2010 03:53:22 -0700
Our vif script had a mishmash of tab and space indentations. The
original vif script only uses spaces, so I went with that style.
[PATCH] xenserver: Set internal network-uuids in Bridge table on XS5.5
From 79eb8b002c588e6f7495a0cd73d8a0597a458442 Mon Sep 17 00:00:00 2001
Date: Wed, 21 Apr 2010 03:42:52 -0700
On XenServer 5.5, interface-reconfigure is not called when creating
internal bridges, so we jump through extra hoops to determine the
network UUIDs. The code that handled this was not properly retrieving
the UUIDs from XAPI, so the field would never be set. This commit
corrects that.
Ian Campbell [Thu, 8 Jul 2010 13:32:31 +0000 (14:32 +0100)]
[PATCH] xenserver: strip all alpha-suffixes from the xenserver build number.
From 2c0f11dc7e66e10257ef927574a99d5f888c774c Mon Sep 17 00:00:00 2001
Date: Thu, 1 Apr 2010 10:45:22 +0100
The letter at the end of the build number indicates the site where the build
was done. All publicly released builds come from "p" but within Citrix we have
other suffixes (i.e. in Cambridge we get c).
[PATCH] Cleanup default file locations and XenServer packaging
From bc39196036f8e33d15274855087f0c47be2095ee Mon Sep 17 00:00:00 2001
Date: Thu, 25 Mar 2010 22:38:13 -0700
This commit cleans up the locations of a number of files and directories
used. These include:
- Config file lives in /etc/openvswitch/conf.db
- Logs go into /var/log/openvswitch
- ovsdb-server socket is /var/run/openvswitch/db.sock
- Schema goes into /usr/share/openvswitch/vswitch.ovsschema
- PID files go in /var/run/openvswitch
For XenServer, these additional changes are made:
- Cores go in /var/xen/openvswitch
- OVS binaries run in /var/xen/openvswitch
In addition, it attempts to cleanup the XenServer packaging. This
includes referring to the project as "openvswitch" as opposed to the
somewhat presumptuous "vswitch".
Note: Changes to the Debian packaging will be forthcoming.
Ian Campbell [Thu, 8 Jul 2010 13:31:27 +0000 (14:31 +0100)]
[PATCH] xenserver: Ensure that Bridge.other-config:hwaddr and Interface.MAC are set as appropriate.
From 16f2ae571fc7d21f13c9ddbe4e948d8f35552ae5 Mon Sep 17 00:00:00 2001
Date: Fri, 26 Mar 2010 09:35:32 -0700
Otherwise bridges can end up with a generated MAC address using Nicira OID
which has an impact when using DHCP on that devices.
tests/interface-reconfigure.at updated by Ben Pfaff.
Ben Pfaff [Thu, 8 Jul 2010 13:31:26 +0000 (14:31 +0100)]
[PATCH] vswitchd: Make names of Bridge external_ids generic.
From 5c43922c13983d2b5addf9e6dd3f54a006c568a6 Mon Sep 17 00:00:00 2001
Date: Thu, 18 Mar 2010 09:37:31 -0700
Until now the names of the external_ids keys used for Bridge records have
implied that they are specific to XenServer, because they begin with "xs-".
They are more generic in intent, however, so this commit removes the "xs-"
prefix and explains them more generically.
This finishes the renaming process started in commit c0f9490 "vswitchd:
Make names of Interface external_ids generic."
Ben Pfaff [Thu, 8 Jul 2010 13:31:26 +0000 (14:31 +0100)]
[PATCH] vswitchd: Make names of Interface external_ids generic.
From c0f9490c24649855f36b9cb426decd600e5c3115 Mon Sep 17 00:00:00 2001
Date: Fri, 12 Mar 2010 14:57:59 -0800
Until now the names of the external_ids keys used for Interface records
have implied that they are specific to XenServer, because they begin with
"xs-". They are more generic in intent, however, so this commit removes
the "xs-" prefix and explains them more generically.
The Bridge record's external_ids still need renaming.
Ben Pfaff [Thu, 8 Jul 2010 13:31:25 +0000 (14:31 +0100)]
[PATCH] xenserver: Restore XS5.5 compatibility for vif script.
From c69af19fe8f20b5a3333e54310b1592bc3f6dfd0 Mon Sep 17 00:00:00 2001
Date: Fri, 12 Mar 2010 15:08:18 -0800
XAPI in XenServer 5.5 does not put the vif-uuid or network-uuid into
XenStore, so the vif script needs to query xapi for those attributes in
that case.
Tested with XenServer 5.5.0 update 1 and XenServer 5.5.9 build 29381
(the latter just to make sure I didn't break anything).
Signed-off-by: Ben Pfaff <blp@nicira.com> Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
scripts/vif | 49 +++++++++++++++++++++-------------
1 files changed, 30 insertions(+), 19 deletions(-)
From 47a3c536c345925b6d3837643b0e8a24b752fad3 Mon Sep 17 00:00:00 2001
Date: Tue, 2 Mar 2010 14:52:05 -0800
These settings are supported by the bridge, and they were supported
earlier by the vswitch, but support regressed when OVSDB was initially
introduced because at first ovs-vsctl did not support these settings.
This commit restores support.
Related to bug #2430, #2442.
Signed-off-by: Ben Pfaff <blp@nicira.com> Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
...ensource_libexec_InterfaceReconfigureVswitch.py | 68 ++++++++++++++++----
2 files changed, 62 insertions(+), 14 deletions(-)
Ben Pfaff [Thu, 8 Jul 2010 13:30:22 +0000 (14:30 +0100)]
[PATCH] xenserver: Fix vNetManager internal network compatibility with XS 5.5.0.
From b09d5ec96a32c906bb35770937120401f64e90b7 Mon Sep 17 00:00:00 2001
Date: Tue, 2 Mar 2010 12:20:43 -0800
The previous commit depends on XAPI to add "xs-network-uuids" external IDs
for internal networks. Only recent XAPI builds do this and in particular
the version in XenServer 5.5.0 does not. This commit restores support
for these older XenServer versions.
The xs-network-names field is no longer set. We plan to avoid the need for
it in the software that once used it. It was always a bit of a kluge
anyhow.
CC: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ben Pfaff <blp@nicira.com> Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
scripts/vif | 28 +++++++++++++++++++++++++++-
1 files changed, 27 insertions(+), 1 deletions(-)
Ian Campbell [Thu, 8 Jul 2010 13:30:21 +0000 (14:30 +0100)]
[PATCH] vswitch: do not access XenAPI from VIF hotplug script
From 31afafc599ec9806e7a56e947a6ca0cd7af055f1 Mon Sep 17 00:00:00 2001
Date: Fri, 26 Feb 2010 13:25:09 -0800
XenAPI accesses must go through the pool master which introduces a
scalability issue. All but one of the required values are already
present in xenstore for this reason
The only exception is the network UUID for an internal network. Rather
than working around the lack of callout to interface-reconfigure for
these networks simply pass the network uuid when creating calling out
to create the bridge.
Ian Campbell [Thu, 8 Jul 2010 13:30:21 +0000 (14:30 +0100)]
[PATCH] vswitch: interface-reconfigure: bring down physical interfaces
From df9a459ab60259b88610ac781889f69b73fbffad Mon Sep 17 00:00:00 2001
Date: Thu, 25 Feb 2010 16:15:13 +0000
This should be done when bringing down the last PIF which uses a
datapath in order to account for VLAN PIFs sharing a datapath.
The logic in bring_down() already acounts for this requirement by
clearing the dp variable if the datapath is still required so if we
get as far as deconfiguring that datapath then it is also correct to
bring down the physical devices.
Ben Pfaff [Thu, 8 Jul 2010 13:30:20 +0000 (14:30 +0100)]
[PATCH] xenserver: In vif script, tolerate port existing when we (re)add it.
From 867cc7bd395b32a3516112127a04d41d9f1b15fc Mon Sep 17 00:00:00 2001
Date: Tue, 23 Feb 2010 14:35:08 -0800
When a Windows VM boots, it initially has "vif" devices. Then, when
XS Tools loads during boot, those "vif" devices disappear and then are
recreated under the same name. The vif script is not called to remove
the old devices, but it is called to add the new ones. It refused to do
this, however, because it saw the new device as having a duplicate name
(because the old was wasn't deleted).
This commit fixes the problem by making the vif script delete the port,
if it exists, before it adds it.
Bug #2425.
CC: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ben Pfaff <blp@nicira.com> Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
scripts/vif | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
Ben Pfaff [Thu, 8 Jul 2010 13:30:18 +0000 (14:30 +0100)]
[PATCH] xenserver: Avoid error due to missing MTU fields on XenServer 5.5.
From 3a32d4ca77ab91c495b3628b58c3967af7b6ff39 Mon Sep 17 00:00:00 2001
Date: Wed, 24 Feb 2010 15:45:11 -0800
The network records in XenServer 5.5 do not have an MTU field, so allow
these to be missing.
Diagnosed-by: Reid Price <reid@nicira.com> CC: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ben Pfaff <blp@nicira.com> Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
.../opt_xensource_libexec_InterfaceReconfigure.py | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
Ben Pfaff [Thu, 8 Jul 2010 13:25:51 +0000 (14:25 +0100)]
[PATCH] xenserver: Add --no-syslog feature to interface-reconfigure.
From b63fadcfdc8a96ddb5e944b60733edf21999a1ad Mon Sep 17 00:00:00 2001
Date: Mon, 22 Feb 2010 16:26:50 -0800
This makes it easier to do unit tests (some of which will be added in an
upcoming commit) by allowing messages to be read from stderr instead of
having to somehow intercept syslog calls.
Ben Pfaff [Thu, 8 Jul 2010 13:25:51 +0000 (14:25 +0100)]
[PATCH] xenserver: Add --root-prefix feature to interface-reconfigure.
From 64ddb6fecfe21a7b50c5907dd88de67a87ec6eca Mon Sep 17 00:00:00 2001
Date: Mon, 22 Feb 2010 16:25:54 -0800
This makes it easier to do unit tests (some of which will be added in an
upcoming commit) by allowing fake configuration files and scripts to be
added in a directory other than the real root.
Ben Pfaff [Thu, 8 Jul 2010 13:25:51 +0000 (14:25 +0100)]
[PATCH] xenserver: Remove a VLAN's bridge when bringing down its PIF.
From 7966caf4a08629f7d0498427420ef83b44838f44 Mon Sep 17 00:00:00 2001
Date: Mon, 22 Feb 2010 13:32:01 -0800
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> Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
...ensource_libexec_InterfaceReconfigureVswitch.py | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
Ben Pfaff [Thu, 8 Jul 2010 13:25:51 +0000 (14:25 +0100)]
[PATCH] xenserver: Avoid doing unneeded work in deconfigure_datapath().
From 2a75efe8236e0c98838d866399cc0092fc7f2cd1 Mon Sep 17 00:00:00 2001
Date: Mon, 22 Feb 2010 13:27:19 -0800
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> Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
...ensource_libexec_InterfaceReconfigureVswitch.py | 15 +--------------
1 files changed, 1 insertions(+), 14 deletions(-)
Ben Pfaff [Thu, 8 Jul 2010 13:25:51 +0000 (14:25 +0100)]
[PATCH] xenserver: Set xs-network-uuids for both datapath and VLAN bridges.
From c0a50086d9e60995b17bdd8a4e1f150caba337d5 Mon Sep 17 00:00:00 2001
Date: Mon, 22 Feb 2010 16:41:19 -0800
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> Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
...ensource_libexec_InterfaceReconfigureVswitch.py | 39 ++++++++++++--------
1 files changed, 23 insertions(+), 16 deletions(-)
Ben Pfaff [Thu, 8 Jul 2010 13:25:51 +0000 (14:25 +0100)]
[PATCH] xenserver: Always call ovs-vsctl in bring_down().
From 56cac225ae4df8ff0c50a806b78abdb6ac96c33a Mon Sep 17 00:00:00 2001
Date: Mon, 22 Feb 2010 13:41:19 -0800
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> Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
...ensource_libexec_InterfaceReconfigureVswitch.py | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
Ben Pfaff [Thu, 8 Jul 2010 13:25:51 +0000 (14:25 +0100)]
[PATCH] xenserver: Fix bringing up VLAN PIFs.
From d77ffabfbcf9eb04b7e69ff6b34e12f000d314ee Mon Sep 17 00:00:00 2001
Date: Mon, 22 Feb 2010 13:08:10 -0800
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> Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
...ensource_libexec_InterfaceReconfigureVswitch.py | 34 ++++++++++---------
1 files changed, 18 insertions(+), 16 deletions(-)
Ben Pfaff [Thu, 8 Jul 2010 13:25:51 +0000 (14:25 +0100)]
[PATCH] xenserver: Hoist identical bridge and vswitch functions into common code.
From 96c7918c4043326bfa0e05b3fc9cbb9547279d40 Mon Sep 17 00:00:00 2001
Date: Tue, 23 Feb 2010 09:47:31 -0800
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.
Ben Pfaff [Thu, 8 Jul 2010 13:25:51 +0000 (14:25 +0100)]
[PATCH] xenserver: Accept VLAN PIFs in pif_bridge_name().
From 6987c81c05f21c579fbe60e9b6693862abbbb762 Mon Sep 17 00:00:00 2001
Date: Mon, 22 Feb 2010 12:53:17 -0800
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> Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
...ensource_libexec_InterfaceReconfigureVswitch.py | 7 +------
1 files changed, 1 insertions(+), 6 deletions(-)
Ben Pfaff [Thu, 8 Jul 2010 13:25:51 +0000 (14:25 +0100)]
[PATCH] xenserver: Delete ports by interface name.
From 7c79588e006eb28e51ca8b715e22abce0c81f5d4 Mon Sep 17 00:00:00 2001
Date: Mon, 22 Feb 2010 16:36:30 -0800
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.
Ben Pfaff [Thu, 8 Jul 2010 13:25:21 +0000 (14:25 +0100)]
[PATCH] xenserver: Fix comment in interface-reconfigure.
From 3b1acc9955fa9c595f6b9e41999aa40041c7b049 Mon Sep 17 00:00:00 2001
Date: Mon, 22 Feb 2010 12:37:20 -0800
This comment was accurate, but didn't actually say what the function did.
Signed-off-by: Ben Pfaff <blp@nicira.com> Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
...ensource_libexec_InterfaceReconfigureVswitch.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
Rob Hoes [Thu, 8 Jul 2010 12:01:37 +0000 (13:01 +0100)]
Advertise which network backend is in use in DB
For clients to determine which network backend is in use a key "network_backend" is added to the Host.software_version map on each host. The value of this key can be (same as the contents of /var/xensource/network.conf):
* bridge: the Linux bridging backend is in use;
* openvswitch: the Open vSwitch backend is in use.
Daniel Stodden [Thu, 8 Jul 2010 11:59:56 +0000 (12:59 +0100)]
blktap2: Map Tap type devices to blkback backends.
Make the agent map all Vbd backend types to blkback instances. We keep
the kind=Tap on backend types. But the distinction remains significant
only so VHD snapshotting can pause VBDs where necessary.
Signed-off-by: Daniel Stodden <daniel.stodden@citrix.com>
Daniel Stodden [Thu, 8 Jul 2010 11:59:55 +0000 (12:59 +0100)]
blktap2: Redirect VBD pause events to sm/blktap.py
Delegate blkback uevent handling to sm/blktap2.py, a drop-in
replacment for scripts/block.
Once blktap2 is enabled, the new module additionally manages
pause/resume for all tapdisk2 nodes. A VBD.pause/resume then will
pause/resume the tapdev node accordingly.
Signed-off-by: Daniel Stodden <daniel.stodden@citrix.com>
Daniel Stodden [Thu, 8 Jul 2010 11:59:54 +0000 (12:59 +0100)]
scripts/block: Update and disable blkback queue state callbacks.
Fixed, then disabled for now. The change handler is only left around
for reference, and upstreaming to xen.org, eventually.
The queue state variable in kernel space was eliminated, we now exit
the dispatcher for any of pause/shutdown/disconnect operations.
Instead we cleanly write/remove the kthread-pid before signalling
transitions.
Scripts now can hook into shutdown-done too. This is useful because
the hotplug scripts want time to ack the shutdown change, before the
agent gets to remove the backend. Exit signalling might later aid in
other areas, e.g. for consistent ionice modes.
Signed-off-by: Daniel Stodden <daniel.stodden@citrix.com>
Jon Ludlam [Thu, 8 Jul 2010 11:55:00 +0000 (12:55 +0100)]
When a VBD unplug event is caught by the event thread, it issues a VDI.detach but not a VDI.deactivate. This fixes this behaviour. Also does the same for eject (although no ISO SRs currently use activate/deactivate)
Signed-off-by: Jon Ludlam <Jonathan.Ludlam@eu.citrix.com>
Jon Ludlam [Thu, 8 Jul 2010 11:54:49 +0000 (12:54 +0100)]
If there is any error in syncing the RRDs while shutting down, don't let the exception propagate.
Only bad things can happen if the exception gets out.
Signed-off-by: Jon Ludlam <Jonathan.Ludlam@eu.citrix.com>
Rob Hoes [Thu, 8 Jul 2010 11:53:49 +0000 (12:53 +0100)]
Require lifecycle specification for APIs
Another step in the transition to better lifecycle information in the API.
Each API in the datamodel.ml should have an explicit lifecycle description attached to it (which may be [] for prototypes). Specifying 'in_product_since' is still allowed for backwards compatibility, but should no longer be used!