David Scott [Tue, 12 Oct 2010 09:32:46 +0000 (10:32 +0100)]
CA-44731: record timings for all xapi startup tasks for diagnostic purposes. Data can be retrieved with existing 'xe diagnostic-timing-stats' CLI command.
Signed-off-by: David Scott <dave.scott@eu.citrix.com>
David Scott [Tue, 12 Oct 2010 09:32:18 +0000 (10:32 +0100)]
CA-41832: clip the target of an 'inactive' domain to be within dynamic_min/dynamic_max
This is potentially dangerous: the reason we attempt to cap the memory usage of an unresponsive domain is to prevent it suddenly waking up and allocating at a bad moment, resulting in either a transient OOM or loss of low memory. With this change the cap will be 'loose', where target can be higher than memory_actual.
Signed-off-by: David Scott <dave.scott@eu.citrix.com>
David Scott [Mon, 11 Oct 2010 22:00:16 +0000 (23:00 +0100)]
CA-46050: allow more than 2 PCI devices to be hotplugged into a domain (!)
There is much confusion about the meaning of the X in
(X, (domain, bus, path, func)). Sometimes it means "order the device was
plugged"; other times it means something more device related.
With this change, more than 2 devices can be plugged into a domain and the
#devices and plug order remains constant over reboot.
Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Jon Ludlam [Mon, 11 Oct 2010 21:57:29 +0000 (22:57 +0100)]
The recent addition of the VDI on_boot and allow_caching parameters affected the allowed operations check. The additional check was put in
the middle of the if block rather than at the end, thus short circuiting some subsequent checks that would otherwise have been done. For
example, checkpoint is allowed in a VM with no tools. This patch fixes that behaviour.
Signed-off-by: Jon Ludlam <jonathan.ludlam@eu.citrix.com>
diff -r 95b9e4f1b9dd ocaml/xapi/xapi_vm_lifecycle.ml
Jon Ludlam [Fri, 24 Sep 2010 16:27:30 +0000 (17:27 +0100)]
Local disk caching API work. Added pool-level API calls to enable/disable caching, host-level API calls for same, per VDI on_boot and allow_caching parameters, and CLI calls for all.
Signed-off-by: Jon Ludlam <Jonathan.Ludlam@eu.citrix.com>
Jon Ludlam [Fri, 24 Sep 2010 15:46:04 +0000 (16:46 +0100)]
Pass the writable flag to the SM backends on activate as well as attach. This is a temporary fix to work around
an implementation hurdle in the backends.
Signed-off-by: Jon Ludlam <jonathan.ludlam@eu.citrix.com>
Ted M Lin [Wed, 4 Aug 2010 19:55:23 +0000 (15:55 -0400)]
MAR-112: RRD transfer lock can prevent master transition
If the master loses connectivity during a RRD transfer, the RRD mutex
will never be released. When performing a emergency master transition,
the first thing that occurs is to save the local RRDs to disk, which
requires the RRD mutex. This will never succeed, thus XAPI gets stuck
trying to shut down.
Instead of locking the mutex, we try to acquire it for a few seconds.
If the lock can not be taken, the loss of some RRD data is preferable
to not being able to transition at all.
Signed-off-by: Ted M Lin <tlin@marathontechnologies.com>
Rob Hoes [Mon, 23 Aug 2010 12:23:55 +0000 (13:23 +0100)]
Startup function to execute an emergency network reset
This patch contains the code that is able to perform an emergency network reset. The code runs when xapi starts and the file /tmp/network-reset (created by the xe-reset-networking script) is present.
Rob Hoes [Mon, 23 Aug 2010 12:23:54 +0000 (13:23 +0100)]
Add host.reset_networking API call
This call purges all network-related metadata associated with the given host (PIFs, VLANs, bonds, tunnels). This call is used by the emergency network reset functionality. It should normally not be used directly, and is hidden from the API docs.
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.