Jonathan Knowles [Wed, 26 Jan 2011 17:39:04 +0000 (17:39 +0000)]
[CA-47369] Enables shadow memory by default for PV domains, with a hard-wired multiplier of 1.
Signed-off-by: Jonathan Knowles <jonathan.knowles@eu.citrix.com> Acked-by: Jonathan Ludlam <jonathan.ludlam@eu.citrix.com>
This change enables successful migrations of PV domains away from hosts with no spare memory.
David Scott [Wed, 26 Jan 2011 17:39:04 +0000 (17:39 +0000)]
SCTX-525: only write the names of interfaces ("current interfaces") into the inventory file and cause them to be ifup'ed on system boot if they actually have an IP address configuration in dom0. This avoids initialising bridges for bonds and VLANs which are only for guests and which can be initialised on demand.
Stats:
* 5 host pool
* 300 VLANs, none used
Pool reboot time drops from 45 mins to 8 mins
Signed-off-by: David Scott <dave.scott@eu.citrix.com>
David Scott [Wed, 26 Jan 2011 17:39:04 +0000 (17:39 +0000)]
Move defaults for environment variables PRODUCT_VERSION, PRODUCT_BRAND, BUILD_NUMBER into the OMakefile, to make it easier to use omake directly for building.
Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Jonathan Davies [Thu, 28 Oct 2010 16:01:05 +0000 (17:01 +0100)]
CA-42914, SCTX-434: Speed up writes of the database to the redo-log
Anecdotal evidence suggests that the default 1 KiB block size provided by Unixext.read_in_chunks causes write throughput to be very slow on some storage substrates.
Some (not massively scientific) timings of dd from /dev/zero to a block-attached VDI on various SR types agree with this observation. The data below shows that 4 KiB is the minimum block size that should be considered for use: throughput it universally higher above this threshold and often substantially lower below it. We'll default to 16 KiB to be on the safe side.
Jonathan Davies [Thu, 28 Oct 2010 16:00:59 +0000 (17:00 +0100)]
CA-42914: Deal with unexpected closure of data socket caused by exception in block_device_io
Previously, the closing of the data socket causes xapi's code that writes database to an fd to raise Sys_error("Connection reset by peer").
Instead, we can safely ignore the unexpected closing of the data socket and wait until we hear what happened over the control socket. Any exception that may be raised during transfer_data_from_sock_to_fd in block_device_io (that causes the data socket to be prematurely closed) gets caught in the exception handlers in action_writedb that call send_failure. So suppress all Sys_error("Connection reset by peer") exceptions that xapi may raise during the writing of the database to the fd because full details should be forthcoming on the control socket.
Signed-off-by: Jonathan Davies <jonathan.davies@citrix.com>
Jonathan Davies [Thu, 28 Oct 2010 16:00:51 +0000 (17:00 +0100)]
CA-42914, SCTX-434: Increase the timeout for writing the database to the redo-log
Previously, we had a flat timeout of 2 seconds for all redo-log operations. However, this has been shown to be too impatient for writing large databases over slow connections. (This resulted in timeouts firing prematurely, resulting in lots of METADATA_LUN_BROKEN alerts, and the redo-log being entirely useless for large pools as the database would never be successfully written!)
The timeout for each operation can now be specified independently. The new default for database writes is 30 seconds.
Signed-off-by: Jonathan Davies <jonathan.davies@citrix.com>
Jonathan Davies [Thu, 28 Oct 2010 16:00:42 +0000 (17:00 +0100)]
CA-42914: Catch other exceptions when reading commands from client in block_device_io
Previously, we only caught End_of_file which Unixext.really_read throws when the client sends EOF. Other exceptions dribbled through to the deeper exception handler, which was supposed to be reserved exclusively for problems opening the block device.
Now, we also catch other exceptions in the same place as the End_of_file exception is handled.
Signed-off-by: Jonathan Davies <jonathan.davies@citrix.com>
Jon Ludlam [Thu, 28 Oct 2010 15:59:54 +0000 (16:59 +0100)]
Fix the allowed-operations check for VMs.
The functions is long and had some non-obvious short-cut termination clauses in the long if...else if ... section. This has now been changed to have an option type containing the current error. Checks should be made in order of 'severity' - ie. power-state first, and e.g. PV driver status later.
Signed-off-by: Jon Ludlam <jonathan.ludlam@eu.citrix.com>
David Scott [Thu, 28 Oct 2010 15:51:04 +0000 (16:51 +0100)]
CA-46955: make code robust to parallel deletions of VBDs
In general we should be very careful in code like this not to expect the configuration of "other VMs" to remain static while we run. In this case a parallel thread deleted a VBD which it "owned" and this cross-talk killed this thread.
Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Jonathan Knowles [Thu, 28 Oct 2010 15:48:27 +0000 (16:48 +0100)]
[CA-43341] Amends squeezed so that just after transferring a reservation to a domain, it calls Xc.domain_setmaxmem with <size-of-reservation>.
This fix prevents the subsequent domain build from failing due to an artificially low maxmem.
Signed-off-by: Jonathan Knowles <jonathan.knowles@eu.citrix.com> Acked-by: Jonathan Ludlam <jonathan.ludlam@eu.citrix.com> Acked-by: Dave Scott <dave.scott@eu.citrix.com>
Thomas Sanders [Tue, 12 Oct 2010 10:59:58 +0000 (11:59 +0100)]
CA-37034 Lenny install-from-CD warning dialog
The installation template for Debian Lenny now warns that the standard CD/DVD
does not support XenServer, and gives directions to find ISOs that work.
For Debian Squeeze, there is now a warning that a multi-arch image is needed.
Signed-off-by: Thomas Sanders <thomas.sanders@citrix.com>
While I reviewed Rok's changes to cli_operations.ml, I realized how
aweful that file looks. I have used our hacked up emacs tuareg-mode
to fix the indentation mechanically and checked whether the result was
sane.
Alex Zeffertt [Tue, 12 Oct 2010 10:54:11 +0000 (11:54 +0100)]
CP-1876: Create RHEL 6 HVM template
Notes:
* We choosing to enable the "no execute" CPU flag in this guest
* We are not indicating the presence of viridian to this guest
Signed-off-by: Alex Zeffertt <alex.zeffertt@eu.citrix.com> Signed-off-by: David Scott <dave.scott@eu.citrix.com> Signed-off-by: Rob Hoes <rob.hoes@gmail.com>
Ewan Mellor [Tue, 12 Oct 2010 09:58:34 +0000 (10:58 +0100)]
The VM metadata export handler (/export_metadata) will output the metadata
of a VM, all its snapshots, and all their attached VDIs. However, it doesn't
walk the tree of VDIs defined by the VDI.sm_config["vhd_parent"] field. For
a full-fidelity representation, having the parent VDIs is very useful.
This patch adds an "include_vhd_parents=(true|false)" option to the the
/export_metadata handler. With this option on, the entire tree of VDIs is
exported.
This patch does not change the /export URL handler, does not change any
behaviour when include_vhd_parents is false or missing, and copes gracefully
with a missing or malformed vhd_parent entry.
Dave: modified to be robust to vhd parent cycles
Signed-off-by: Ewan Mellor <ewan.mellor@eu.citrix.com> Signed-off-by: Dave Scott <dave.scott@eu.citrix.com>
Rok Strnisa [Tue, 12 Oct 2010 09:54:04 +0000 (10:54 +0100)]
CA-27648: xe does not show the tags fields --- FIXED.
Added the ability to read and write tags on pool, host, network, VM, SR, and
VDI through the CLI. For each corresponding function, the patch adds four
lines of the general form:
make_field ~name:"tags"
~get:(fun () -> String.concat ", " (x ()).API.xxx_tags)
~get_set:(fun () -> (x ()).API.xxx_tags)
~add_to_set:(fun tag -> Client.Xxx.add_tags rpc session_id xx tag)
~remove_from_set:(fun tag -> Client.Xxx.remove_tags rpc session_id xx tag) ();
The patch also includes code re-indentation for the functions involved.
It appears as if much of this file could be auto-generated.
Signed-off-by: Rok Strnisa <rok.strnisa@citrix.com>
David Scott [Tue, 12 Oct 2010 09:53:03 +0000 (10:53 +0100)]
CP-1914: Record some extra build-time information in Host.software_version ("product_version_text" and "product_version_text_short" -- useful for UIs to display rather than raw version numbers)
Signed-off-by: David Scott <dave.scott@eu.citrix.com>
The build-number that xapi displays for a host now comes from
/etx/xensource-inventory instead of the branded in build-number, when
xapi is build. The former behaviour lead to discrepancies.
Rok Strnisa [Tue, 12 Oct 2010 09:50:42 +0000 (10:50 +0100)]
CA-44714: Semantics of "xe vm-export" with the metadata option is not as documented --- FIXED.
Consistent requirement for boolean parameters to be specified with true or false.
The patch includes refactoring of cli_operations.ml, which makes consistent
use of two simple functions for extracting information from parameters instead
of the previous 10 complicated ways.
Signed-off-by: Rok Strnisa <rok.strnisa@citrix.com>
Review by Matthias: Changes look good. But indentation in
get_bool_param is as horrible as in the rest of cli_operations.ml.
After-review changes: The horrible indentation (2 spaces) of get_bool_param has
has been corrected (into 1 tab).
Jonathan Knowles [Tue, 12 Oct 2010 09:40:01 +0000 (10:40 +0100)]
Rescues the indendation for several functions within the quicktest module. Splits an often-modified list of tests into multiple lines, reducing the chance that further patches will conflict with one another.
Signed-off-by: Jonathan Knowles <jonathan.knowles@eu.citrix.com>
Ben Pfaff [Tue, 12 Oct 2010 09:38:38 +0000 (10:38 +0100)]
[PATCH] Rename "xs-vif-mac" external_ids key to "attached-mac", for generality.
From e61070c32030d6d00e2eeae213d219320a7cbd10 Mon Sep 17 00:00:00 2001
Date: Wed, 1 Sep 2010 16:49:19 -0700
This can be useful on systems other than XenServer so there is no reason
to make it looks XenServer-specific.
CC: Jeremy Stribling <strib@nicira.com> Signed-off-by: Ben Pfaff <blp@nicira.com> Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
vswitchd/vswitch.xml | 15 ++++++++-------
scripts/vif | 2 +-
2 files changed, 9 insertions(+), 8 deletions(-)
Rob Hoes [Tue, 12 Oct 2010 09:36:54 +0000 (10:36 +0100)]
Require datetime values written to the DB to end with a 'Z'
All datetime values in the DB need to be UTC dates, and are required to ISO 8601 formatted with a trailing 'Z' to indicate they are UTC. The XenAPI did not have any functions that allow users to write datetimes directly to the DB... until recently (e.g. VMPP.set_archive_last_run_time)! It is therefore now necessary to enforce that the datetime values in the parameters of such 'set' functions have the correct form.
For backwards compatibility, XenAPI functions such as message.get_since still allow dates without 'Z', and will assume these are UTC dates.
Rob Hoes [Tue, 12 Oct 2010 09:36:09 +0000 (10:36 +0100)]
Hosts in a pool should use the same networking backend
This patch adds the following restrictions in order to prevent (as much as possible) trouble caused by hosts in a pool not having the same network backends (bridge/openvswitch):
1. Block pool join if the network backend of the joining host is not the same as the master's.
2. Block tunnel.create if at least one of the hosts in the pool uses the bridging backend.
Rob Hoes [Tue, 12 Oct 2010 09:34:47 +0000 (10:34 +0100)]
CP-1591: Synchronise VIF.MTU and PIF.MTU on plug
The VIF.MTU and PIF.MTU fields are now read-only, and will reflect the current state of the network. When you change the Network.MTU, VIFs and PIFs will have to be replugged to have their MTU changed by the networking subsystem. So when Network.MTU and PIF.MTU are not equal, this is a reminder to replug the PIF (same for VIFs).
David Scott [Tue, 12 Oct 2010 09:34:27 +0000 (10:34 +0100)]
CA-44731: rewrite RRD marshalling, unmarshalling code to (i) copy the compact binary representation; and then (ii) stream the XML directly to an fd without creating a temporary buffer of some kind.
This should now work properly when the XML data is > 16MiB
Signed-off-by: David Scott <dave.scott@eu.citrix.com>
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>