]> xenbits.xensource.com Git - xcp/xen-api.git/log
xcp/xen-api.git
15 years agoCA-39291: Work around firewalls which kill idle TCP connections by inserting a small...
David Scott [Fri, 9 Apr 2010 18:57:43 +0000 (19:57 +0100)]
CA-39291: Work around firewalls which kill idle TCP connections by inserting a small empty block into an export every 5s or so.

The failure happens whenever a disk has a lot of zeroes in it: the TCP connection goes idle while the server is scanning for the next non-zero block. Even setting SO_KEEPALIVE on the stunnel sockets and reducing the window probe interval down to 30s didn't fix it. We wish to keep the ability to have a basic client do an export via HTTP GET so we can't add application-level keepalives to the protocol... we must add them to the export itself.

Note this change is backwards compatible. The receiver code expects:
* a common prefix
* a monotonically increasing chunk number
* the first and last blocks to be the same size and included verbatim (even if all zeroes)
* blocks of zeroes the same size as the first block represented as gaps in the increasing chunk number sequence

Therefore including extra files of length 0 in the stream will be ignored provided they
* share the common prefix and chunk numbering scheme
* are not the first or last blocks

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
14 years ago[main.iso in a vm] Make qemu-dm-wrapper aware of the possibility that it might be...
Jonathan Ludlam [Mon, 7 Jun 2010 15:07:06 +0000 (16:07 +0100)]
[main.iso in a vm] Make qemu-dm-wrapper aware of the possibility that it might be running in an SDK VM

14 years agoPerform /sbin/chkconfig commands in rpm post-install script rather than the host...
David Scott [Tue, 1 Jun 2010 15:40:15 +0000 (16:40 +0100)]
Perform /sbin/chkconfig commands in rpm post-install script rather than the host-installer.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
14 years agoHook RPM build into mk/Makefile
David Scott [Fri, 28 May 2010 14:25:56 +0000 (15:25 +0100)]
Hook RPM build into mk/Makefile

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
14 years agoAdd RPM .spec file for xapi and associated tools.
David Scott [Fri, 28 May 2010 14:25:56 +0000 (15:25 +0100)]
Add RPM .spec file for xapi and associated tools.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
14 years agoAdd a xapi-datamodel-devel package for other code-generators
David Scott [Fri, 28 May 2010 14:25:56 +0000 (15:25 +0100)]
Add a xapi-datamodel-devel package for other code-generators

Signed-off-by: DAvid Scott <dave.scott@eu.citrix.com>
14 years agoOMakefiles now respect DESTDIR, for simpler packaging.
David Scott [Fri, 28 May 2010 14:25:56 +0000 (15:25 +0100)]
OMakefiles now respect DESTDIR, for simpler packaging.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
14 years agoMove the generation of ocaml/util/version.ml into the Makefile so that it can be...
David Scott [Fri, 28 May 2010 14:25:56 +0000 (15:25 +0100)]
Move the generation of ocaml/util/version.ml into the Makefile so that it can be done before the main build. This unbreaks the rpm build since 'hg id' will fail when run in a plain non-repo directory of sources.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
14 years agocommit 7fe79c6b8ac57a6cfa0c101f76bc7de2faca0531
Vincent Hanquez [Fri, 28 May 2010 14:25:56 +0000 (15:25 +0100)]
commit 7fe79c6b8ac57a6cfa0c101f76bc7de2faca0531
Author: Vincent Hanquez <vincent.hanquez@eu.citrix.com>
Date:   Tue Mar 9 11:43:31 2010 +0000

    omake: workaround to revert to old behaviour on how to generate dependencies

15 years agoCA-37279: Stunnel error from WLB connect "No route to host"
Ewan Mellor [Thu, 29 Apr 2010 09:22:35 +0000 (10:22 +0100)]
CA-37279: Stunnel error from WLB connect "No route to host"

Understand "No route to host" as an expected error message from stunnel, and turn that into API error WLB_UNKNOWN_HOST if we see it when contacting WLB.

This is two patches, one for xen-api-libs.hg, and one for xen-api.hg.

Signed-off-by: Ewan Mellor <ewan.mellor@eu.citrix.com>
15 years agoCA-40763: allow the CLI to change the name-description of Hosts.
David Scott [Mon, 26 Apr 2010 17:02:38 +0000 (18:02 +0100)]
CA-40763: allow the CLI to change the name-description of Hosts.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
15 years agoCA-40875: allow VCPU settings to be changed on a template.
David Scott [Mon, 26 Apr 2010 17:02:18 +0000 (18:02 +0100)]
CA-40875: allow VCPU settings to be changed on a template.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
15 years agoCA-40390: even if VDI.destroy fails after a VM.resume, log the error and continue...
David Scott [Thu, 22 Apr 2010 10:27:19 +0000 (11:27 +0100)]
CA-40390: even if VDI.destroy fails after a VM.resume, log the error and continue. Leaking a VDI is unfortunate but leaking a whole domain is worse.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
15 years agoCope with the stunnel zombie process issue.
Zheng Li [Tue, 20 Apr 2010 18:18:53 +0000 (19:18 +0100)]
Cope with the stunnel zombie process issue.

Some versions of stunnel (old versions, or some new ones bulit with some particular Linux distribution versions) have the zombie process issue when called from xe. When it happens, the main stunnel process won't exit for long time after xe closing its communication channel, seems to be waiting for its children processes which are however staying in "defunct" status. The issue was also reported on the server side when stunnel is called by xapi daemon, so it would be useful to set the Stunnel.disconnect arguments properly there as well. However this demands more work to identify which setting is safe for each occurrence, so I'll leave it for future. Moreover, currently xe doesn't wait for the second stunnel connection process (HTTP Get/Put), this should also be fixed in the future. The question is: does xe really needs to care about the status of stunnel in most cases? If not, why not using the double fork tricks everywhere; if yes, a SSL library might be more appropriate than 3rd party tools such as stunnel.

Signed-off-by: Zheng Li <dev@zheng.li>
15 years agoThe OpenVswitch project is trying to standardise on using OpenVswitch rather than...
Ian Campbell [Tue, 20 Apr 2010 16:51:08 +0000 (17:51 +0100)]
The OpenVswitch project is trying to standardise on using OpenVswitch rather than simply vswitch so accept both in network.conf and report the mode as openvswitch.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
15 years agoCorrect a spelling mistake in the API documentation.
Jonathan Davies [Tue, 6 Apr 2010 13:35:13 +0000 (14:35 +0100)]
Correct a spelling mistake in the API documentation.

Signed-off-by: Jonathan Davies <jonathan.davies@citrix.com>
15 years agoCA-36936: add todo comment
Marcus Granado [Tue, 20 Apr 2010 16:45:42 +0000 (17:45 +0100)]
CA-36936: add todo comment

Signed-off-by: Marcus Granado <marcus.granado@eu.citrix.com>
15 years agoCA-27004: digit-only hostnames cannot join AD domain
Marcus Granado [Tue, 20 Apr 2010 16:44:28 +0000 (17:44 +0100)]
CA-27004: digit-only hostnames cannot join AD domain

That's a current limitation of Likewise on Linux.

Signed-off-by: Marcus Granado <marcus.granado@eu.citrix.com>
15 years agoCA-39663: Make mail-alarm handle unicode characters in email
Alex Zeffertt [Tue, 20 Apr 2010 16:42:51 +0000 (17:42 +0100)]
CA-39663: Make mail-alarm handle unicode characters in email

Signed-off-by: Alex Zeffertt <alex.zeffertt@eu.citrix.com>
15 years agoAdd linking flag to zlib in xenguest Makfile
Zheng Li [Sat, 10 Apr 2010 11:42:44 +0000 (12:42 +0100)]
Add linking flag to zlib in xenguest Makfile
Signed-off-by: Zheng Li <dev@zheng.li>
15 years agoCA-40385: whitelist xenapi params in audit-log for audit-report team
Marcus Granado [Tue, 20 Apr 2010 14:38:17 +0000 (15:38 +0100)]
CA-40385: whitelist xenapi params in audit-log for audit-report team

Signed-off-by: Marcus Granado <marcus.granado@eu.citrix.com>
15 years agoCA-40427: print AD username in audit.log records even when logged through AD group...
Marcus Granado [Tue, 20 Apr 2010 14:37:14 +0000 (15:37 +0100)]
CA-40427: print AD username in audit.log records even when logged through AD group in subject-list

Signed-off-by: Marcus Granado <marcus.granado@eu.citrix.com>
15 years agoSuggested change to the deprecation policy.
Jonathan Davies [Mon, 19 Apr 2010 08:00:10 +0000 (09:00 +0100)]
Suggested change to the deprecation policy.

Signed-off-by: Jonathan Davies <jonathan.davies@citrix.com>
15 years agoMinor corrections to deprecation policy document.
Jonathan Davies [Mon, 19 Apr 2010 08:00:09 +0000 (09:00 +0100)]
Minor corrections to deprecation policy document.

Signed-off-by: Jonathan Davies <jonathan.davies@citrix.com>
15 years agoAdd bash completion to VCPUs-params param-key
Yang Hongyang [Tue, 20 Apr 2010 13:56:16 +0000 (14:56 +0100)]
Add bash completion to VCPUs-params param-key

Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com>
15 years agoAdd strict check to VCPUs-params param-key,according to Xen Cloud Platform Administra...
Yang Hongyang [Tue, 20 Apr 2010 13:53:51 +0000 (14:53 +0100)]
Add strict check to VCPUs-params param-key,according to Xen Cloud Platform Administrator's Guide,there's only 'weight','cap' or 'mask' param-key available.

current:
# xe vm-param-set VCPUs-params:test=33 uuid=b7ca170b-c017-046e-116c-8d4c4d778195
# xe vm-list params=VCPUs-params uuid=b7ca170b-c017-046e-116c-8d4c4d778195
VCPUs-params (MRW)    : test: 33

after patch:
# xe vm-param-set VCPUs-params:test=33 uuid=b7ca170b-c017-046e-116c-8d4c4d778195
Error: Failed to add parameter 'test': expecting 'weight','cap' or 'mask'
# xe vm-list params=VCPUs-params uuid=b7ca170b-c017-046e-116c-8d4c4d778195
VCPUs-params (MRW)    :

Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com>
15 years agoAdd exceptions to DRAC plugin
Javier Alvarez-Valle [Mon, 19 Apr 2010 15:46:19 +0000 (16:46 +0100)]
Add exceptions to DRAC plugin

This patch adds exceptions when the DRAC plugin fails, because the supplemental pack is not installed or because the connection or credentials fail.

Signed-off-by: Javier Alvarez-Valle <javier.alvarez-valle@citrix.com>
15 years agoUse Pool.restrictions in DB to get/set pool restrictions, rather than local ref
Rob Hoes [Tue, 20 Apr 2010 09:43:07 +0000 (10:43 +0100)]
Use Pool.restrictions in DB to get/set pool restrictions, rather than local ref

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
15 years agoAdd a basic skeleton of a deprecation policy for the XenAPI.
David Scott [Fri, 16 Apr 2010 10:44:32 +0000 (11:44 +0100)]
Add a basic skeleton of a deprecation policy for the XenAPI.

There's lots of missing detail; feedback is essential!

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
15 years agoCA-39537: remove a lot of unnecessary log-spam
David Scott [Wed, 14 Apr 2010 21:13:57 +0000 (22:13 +0100)]
CA-39537: remove a lot of unnecessary log-spam

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
15 years agoCA-40329: Fix the bound checks in the Ipq.find* functions.
Rob Hoes [Wed, 14 Apr 2010 17:04:48 +0000 (18:04 +0100)]
CA-40329: Fix the bound checks in the Ipq.find* functions.

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
15 years agoFix a bug in the previous -debug-on-fail patch
Zheng Li [Sat, 10 Apr 2010 09:15:21 +0000 (10:15 +0100)]
Fix a bug in the previous -debug-on-fail patch

I didn't realize that xe would initial an auxilary stunnel link in certain opearions, so that some of the global variables we stored for the main link might be overwritten unexpectedly. Now the protection is added. What a typical example about how global mutable variable is bad, but I won't really regret having chosen such a solution because it demanded the least code modification, and hence safer for such complex software in that sense.

Signed-off-by: Zheng Li <dev@zheng.li>
15 years agoCA-40030: Cancel grace-retry timer when calling Host.apply_edition
Rob Hoes [Mon, 12 Apr 2010 19:32:36 +0000 (20:32 +0100)]
CA-40030: Cancel grace-retry timer when calling Host.apply_edition

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
15 years agoCA-40030: Option to remove an event by name from the periodic scheduler
Rob Hoes [Mon, 12 Apr 2010 19:32:35 +0000 (20:32 +0100)]
CA-40030: Option to remove an event by name from the periodic scheduler

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
15 years agoCA-40149: invalidate the local cache of hostname on Host.set_hostname_live
David Scott [Mon, 12 Apr 2010 16:55:24 +0000 (17:55 +0100)]
CA-40149: invalidate the local cache of hostname on Host.set_hostname_live

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
15 years agoCA-40134: when looking up a domid, always look up the domain by uuid rather than...
David Scott [Mon, 12 Apr 2010 13:44:41 +0000 (14:44 +0100)]
CA-40134: when looking up a domid, always look up the domain by uuid rather than relying on the value in the master's database (which could be out of sync).

In particular if the master is suddenly powercycled then recent domid updates might be lost. This results in VMs which are impossible to shutdown.

Looking up the domain by uuid should be strictly better than using the master's version: both are moving targets (eg over migrate) and so we already rely on the per-VM lock to protect (most) accesses.

The only problem is the code is slightly inefficient: it still has to contact the master to look up the VM's uuid and then has to list all domains on the host to build up a table of uuid -> domid. This can be improved later.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
15 years agoCA-38844: CPUID maskability
Rob Hoes [Fri, 9 Apr 2010 09:56:14 +0000 (10:56 +0100)]
CA-38844: CPUID maskability

Distinguish between not maskable ("no") (CPU does not have Intel FlexMigration or AMB Extended Migration), only base features are maskable ("base"), and base+extended features are maskable ("full") in Host.cpu_info:maskable.

Note: this patch should go in together with the flexmigration patch in xen-api-libs.hg.

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
15 years agoCA-39952: explicitly blank {allowed,current}_operations fields in VM exports. The...
David Scott [Wed, 7 Apr 2010 20:09:16 +0000 (21:09 +0100)]
CA-39952: explicitly blank {allowed,current}_operations fields in VM exports. The values stored here are redundant sources of potential import failures on older s/w versions.

The operation enums are often extended rendering them unparsable by older software versions. Although we don't guarantee that a new export can be imported on an old host it nevertheless should almost always work.. (apart from this)

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
15 years agoCA-38463: backend vifs now have proper "device" symlinks in /sys so to tell the diffe...
David Scott [Wed, 7 Apr 2010 16:43:56 +0000 (17:43 +0100)]
CA-38463: backend vifs now have proper "device" symlinks in /sys so to tell the difference between them and a real "physical" interface, look to see whether they link to devices/xen-backend/...

This prevents PIF.scan from accidentally introducing vifX.Y as PIFs...

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
15 years agoCA-39972: try extra hard to kill stunnel in 'service xapissl stop'
David Scott [Wed, 7 Apr 2010 16:06:31 +0000 (17:06 +0100)]
CA-39972: try extra hard to kill stunnel in 'service xapissl stop'

Previously we sent one SIGTERM and waited for up to 3 minutes. In a quick test, out of 1000 back-to-back 'service xapissl restart' calls, one took the full 3 minutes, as if the signal was ignored.

Now we send additional SIGTERMS as we go around the loop, one per second. In a quick test, 10000 back-to-back 'service xapissl restart' calls completed without any taking more than a few seconds.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
15 years agoCA-39887: Totally throw away VM RRD updates when domains are paused.
David Scott [Wed, 7 Apr 2010 16:06:30 +0000 (17:06 +0100)]
CA-39887: Totally throw away VM RRD updates when domains are paused.

Previously we kept the RRD data but silenced the dirty_memory signal. This would allow the following sequence:
1. domain created
   domain = paused; memory = 0
   <-- RRD updated with memory = 0
   <-- memory not considered 'dirty' because domain is paused
2. domain built
   domain = paused; memory = some interesting value
   <-- RRD updated with memory = some interesting value
   <-- memory not considered 'dirty' because domain is paused
3. domain unpaused
   domain = running; memory = some interesting value
   <-- RRD updated with memory = some interesting value
   <-- memory not considered 'dirty' because memory value has *not* changed in the RRD

Now we ignore the RRD updates when the domain is paused. This means that, when the domain is finally unpaused, the new memory value will always be considered to have changed.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
15 years agoRemove the Unknown VM power state.
Magnus Therning [Wed, 10 Feb 2010 14:33:41 +0000 (14:33 +0000)]
Remove the Unknown VM power state.

Signed-off-by: Magnus Therning <magnus.therning@citrix.com>
15 years agoCA-39401: on server boot only start VMs with auto_poweron=true which have their affin...
David Scott [Wed, 7 Apr 2010 10:46:46 +0000 (11:46 +0100)]
CA-39401: on server boot only start VMs with auto_poweron=true which have their affinity set to the local host.

The auto_poweron=true mechanism made sense when all pools were of size 1. It's a bit odd with multi-host pools.. surely these days you would HA protect VMs you care about?

This change makes the auto_poweron mechanism a bit less inexplicable. At some point we ought to merge this with HA.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
15 years agoCA-19067 - Now only matching CD drive contents with non-udev ISO VDIs. This rules...
David Scott [Wed, 7 Apr 2010 10:46:02 +0000 (11:46 +0100)]
CA-19067 - Now only matching CD drive contents with non-udev ISO VDIs. This rules out matching local drives.

Original patch was by Vijay Raghavan <vijay@xensource.com>

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
15 years agoCA-38723: Fix 'xe snapshot-revert uuid=...'
David Scott [Wed, 7 Apr 2010 10:43:55 +0000 (11:43 +0100)]
CA-38723: Fix 'xe snapshot-revert uuid=...'

Somehow I missed this one in the previous patch.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
15 years agoCA-34888: the Java bindings tests expect there to be enough memory to install from...
David Scott [Wed, 7 Apr 2010 10:42:09 +0000 (11:42 +0100)]
CA-34888: the Java bindings tests expect there to be enough memory to install from a Win7 (64 bit) template plus a bit. Bump up the default size of the simulated host in xiu.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
15 years agoCA-39386: Perform a best-effort check that we can access a suspended snapshot's suspe...
David Scott [Wed, 7 Apr 2010 10:40:51 +0000 (11:40 +0100)]
CA-39386: Perform a best-effort check that we can access a suspended snapshot's suspend_VDI before starting a revert.

We check that the SR's PBD is plugged and that the Host has live set to true.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
15 years agoAdd -debug-on-fail option to "xe" and other minor improvements
Zheng Li [Wed, 31 Mar 2010 09:30:27 +0000 (10:30 +0100)]
Add -debug-on-fail option to "xe" and other minor improvements

Unlike -debug, -debug-on-fail will only output debug information and connection diagnosis when the exit code is not 0.

Signed-off-by: Zheng Li <dev@zheng.li>
15 years agoFix a few Makefile issues on compiling XAPI client without Xen stuff
Zheng Li [Tue, 23 Mar 2010 00:50:49 +0000 (00:50 +0000)]
Fix a few Makefile issues on compiling XAPI client without Xen stuff

... also let making other objects go through even if pstopdf are not present.

Signed-off-by: Zheng Li <dev@zheng.li>
15 years agoCA-39745: When a failure to hotplug a disk is detected, check whether the underlying...
David Scott [Wed, 7 Apr 2010 10:36:23 +0000 (11:36 +0100)]
CA-39745: When a failure to hotplug a disk is detected, check whether the underlying device was a physical CDROM with an empty drive. In this case throw HOST_CD_DRIVE_EMPTY.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
15 years agoCA-39745: watch /local/domain/%d/error/backend/vbd/%d/%d/error for informative errors...
David Scott [Wed, 7 Apr 2010 10:35:06 +0000 (11:35 +0100)]
CA-39745: watch /local/domain/%d/error/backend/vbd/%d/%d/error for informative errors such as "2 creating vbd structure". This prevents us timing out after 20 minutes if something goes wrong with a blkback device.

A further patch will be needed to provide some decent error diagnosis.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
15 years agoCA-39461: Fix Network.pool_introduce
Rob Hoes [Wed, 7 Apr 2010 10:34:09 +0000 (11:34 +0100)]
CA-39461: Fix Network.pool_introduce

The bug in Network.pool_introduce led to problems when adding a host to a pool, when this host has a Network with a name different from any Network on the pool. Networks and PIFs were not properly recreated on the pool in this case.

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
15 years agoCA-39889: hotplug PCI devices into guests in the order specified in the (original...
David Scott [Tue, 6 Apr 2010 09:57:56 +0000 (10:57 +0100)]
CA-39889: hotplug PCI devices into guests in the order specified in the (original) other-config key.

There were two problems:
1. xapi was accidentally reversing the list provided in the other_config key (a side-effect of a fold)
2. when listing the PCI devices present in xenstore, the Device.PCI.list function was passing the device order number back in the place reserved for "PCI bus ID". This caused the devices to be hotplugged in reverse over reboot.

Now the behaviour is:
1. devices are hotplugged in the order they are found in the other_config key
2. the hotplug ordering is stable across start/internal reboot/external reboot

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
15 years agoRemove some redundant code from the Db_action_helper module and simplify the usage...
Jonathan Davies [Tue, 9 Mar 2010 16:02:02 +0000 (16:02 +0000)]
Remove some redundant code from the Db_action_helper module and simplify the usage of this module in the auto-generated code.

Signed-off-by: Jonathan Davies <jonathan.davies@citrix.com>
15 years agoRemoving unused stunnel configuration file: /etc/xensource/xapi-ssl.conf
Magnus Therning [Wed, 24 Mar 2010 16:51:16 +0000 (16:51 +0000)]
Removing unused stunnel configuration file: /etc/xensource/xapi-ssl.conf

15 years agoCA-39115: subject-add should return a uuid
Marcus Granado [Thu, 1 Apr 2010 11:14:17 +0000 (12:14 +0100)]
CA-39115: subject-add should return a uuid

Signed-off-by: Marcus Granado <marcus.granado@eu.citrix.com>
15 years ago[CA-39743] Wait for Xen to scrub host memory (only if necessary) before building...
Jonathan Knowles [Thu, 1 Apr 2010 11:11:55 +0000 (12:11 +0100)]
[CA-39743] Wait for Xen to scrub host memory (only if necessary) before building a domain.

Signed-off-by: Jonathan Knowles <jonathan.knowles@eu.citrix.com>
Acked-by: Vincent Hanquez <vincent.hanquez@eu.citrix.com>
15 years ago[CA-39743] Improvements to the wait_xen_free_mem function.
Jonathan Knowles [Thu, 1 Apr 2010 11:11:29 +0000 (12:11 +0100)]
[CA-39743] Improvements to the wait_xen_free_mem function.

Improvements include:
* We read the values of free_memory and scrub_memory atomically (rather than separately).
* We exit early if (free_memory < required_memory) and (scrub_memory = 0) as it's unlikely that more will become free.
* We time out more quickly than before (64 seconds rather than 256 seconds).

Signed-off-by: Jonathan Knowles <jonathan.knowles@eu.citrix.com>
15 years agoCA-39519: add extra debugging to quicktest
David Scott [Thu, 1 Apr 2010 10:54:49 +0000 (11:54 +0100)]
CA-39519: add extra debugging to quicktest

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
15 years agoCA-38974: improve parameter reporting during obj.destroy in auditlog
Marcus Granado [Thu, 1 Apr 2010 10:53:47 +0000 (11:53 +0100)]
CA-38974: improve parameter reporting during obj.destroy in auditlog

Obj.destroy has the nasty side-effect of removing the object name from the database.
Therefore, for .destroy actions, no obj name is shown in the audit record parameters.

This patch caches the object name before Obj.destroy is called, working around this
side-effect.

Signed-off-by: Marcus Granado <marcus.granado@eu.citrix.com>
15 years agoCA-38723: make "xe snapshot-" commands advertise "uuid" parameters (rather than ...
David Scott [Thu, 1 Apr 2010 10:52:20 +0000 (11:52 +0100)]
CA-38723: make "xe snapshot-" commands advertise "uuid" parameters (rather than "snapshot-uuid") for consistency with other commands but still secretly accept "snapshot-uuid" to avoid breaking anything.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
15 years agoCA-39705: Throw grace_license alert for upgrade grace licenses
Rob Hoes [Thu, 1 Apr 2010 10:51:32 +0000 (11:51 +0100)]
CA-39705: Throw grace_license alert for upgrade grace licenses

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
15 years agoCA-38601: Make the VM.query_data_source API call lock free
Jon Ludlam [Thu, 1 Apr 2010 10:49:37 +0000 (11:49 +0100)]
CA-38601: Make the VM.query_data_source API call lock free

Signed-off-by: Jon Ludlam <Jonathan.Ludlam@eu.citrix.com>
15 years agoCA-38698: unify notions of HA "protected-ness". This should unblock (eg) attempts...
David Scott [Thu, 1 Apr 2010 10:45:33 +0000 (11:45 +0100)]
CA-38698: unify notions of HA "protected-ness". This should unblock (eg) attempts to make a best-effort VM non-agile by adding a local disk.

Previously some of the code used ha_always_run = true while other parts of the code used ha_always_run = true && ha_restart_priority <> best-effort.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
15 years agoCA-34993: If a blob sync fails then log this as an 'error' to syslog but do not gener...
David Scott [Thu, 1 Apr 2010 10:43:39 +0000 (11:43 +0100)]
CA-34993: If a blob sync fails then log this as an 'error' to syslog but do not generate an alert since this isn't an earth-shattering failure.

For diagnostic purposes we store the last successful blob sync time in the Host.other_config.

Also remove an unused post-blob-sync plugin call.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
15 years agoCA-39435: when no suspend SR is available, use the same error message in VM.checkpoin...
David Scott [Tue, 30 Mar 2010 13:22:11 +0000 (14:22 +0100)]
CA-39435: when no suspend SR is available, use the same error message in VM.checkpoint that we do in VM.suspend (VM_NO_SUSPEND_SR).

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
15 years ago[CA-39425] Unhides "vm-memory-target-set" from the CLI, and brings the help string...
Jonathan Knowles [Tue, 30 Mar 2010 10:34:27 +0000 (11:34 +0100)]
[CA-39425] Unhides "vm-memory-target-set" from the CLI, and brings the help string in line with current semantics.

Signed-off-by: Jonathan Knowles <jonathan.knowles@eu.citrix.com>
15 years agoMerged
David Scott [Tue, 30 Mar 2010 10:30:01 +0000 (11:30 +0100)]
Merged

15 years agoCA-39538: make sure that squeezed will dump core if it crashes.
David Scott [Tue, 30 Mar 2010 10:27:23 +0000 (11:27 +0100)]
CA-39538: make sure that squeezed will dump core if it crashes.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
15 years ago[CA-39589] Refactoring: flattens a number of nested function applications.
Jonathan Knowles [Mon, 29 Mar 2010 15:12:41 +0000 (16:12 +0100)]
[CA-39589] Refactoring: flattens a number of nested function applications.

Signed-off-by: Jonathan Knowles <jonathan.knowles@eu.citrix.com>
Acked-by: Marcus Granado <Marcus.Granado@eu.citrix.com>
15 years ago[CA-39589] Refactoring: extracts out the "do_final_actions_after_suspend" function...
Jonathan Knowles [Mon, 29 Mar 2010 15:12:39 +0000 (16:12 +0100)]
[CA-39589] Refactoring: extracts out the "do_final_actions_after_suspend" function from a deeply-nested block.

Signed-off-by: Jonathan Knowles <jonathan.knowles@eu.citrix.com>
Acked-by: Marcus Granado <Marcus.Granado@eu.citrix.com>
15 years ago[CA-39589] Refactoring: extracts out the "do_suspend" function from a deeply-nested...
Jonathan Knowles [Mon, 29 Mar 2010 15:12:38 +0000 (16:12 +0100)]
[CA-39589] Refactoring: extracts out the "do_suspend" function from a deeply-nested block.

Signed-off-by: Jonathan Knowles <jonathan.knowles@eu.citrix.com>
Acked-by: Marcus Granado <Marcus.Granado@eu.citrix.com>
15 years ago[CA-39589] Refactoring: extracts out the "suspend_domain" function from a deeply...
Jonathan Knowles [Mon, 29 Mar 2010 15:12:36 +0000 (16:12 +0100)]
[CA-39589] Refactoring: extracts out the "suspend_domain" function from a deeply nested block.

Signed-off-by: Jonathan Knowles <jonathan.knowles@eu.citrix.com>
Acked-by: Marcus Granado <Marcus.Granado@eu.citrix.com>
15 years ago[CA-39589] Refactoring: extracts out the "handle_death" function from a deeply nested...
Jonathan Knowles [Mon, 29 Mar 2010 15:12:33 +0000 (16:12 +0100)]
[CA-39589] Refactoring: extracts out the "handle_death" function from a deeply nested block.

Signed-off-by: Jonathan Knowles <jonathan.knowles@eu.citrix.com>
Acked-by: Marcus Granado <Marcus.Granado@eu.citrix.com>
15 years ago[CA-39589] Refactoring: lifts a number of definitions out of a deeply nested block.
Jonathan Knowles [Mon, 29 Mar 2010 15:12:30 +0000 (16:12 +0100)]
[CA-39589] Refactoring: lifts a number of definitions out of a deeply nested block.

Signed-off-by: Jonathan Knowles <jonathan.knowles@eu.citrix.com>
Acked-by: Marcus Granado <Marcus.Granado@eu.citrix.com>
15 years ago[CA-39589] After a VM suspend operation, Xapi now reverses any destructive update...
Jonathan Knowles [Mon, 29 Mar 2010 15:12:23 +0000 (16:12 +0100)]
[CA-39589] After a VM suspend operation, Xapi now reverses any destructive update it makes to XenStore's copy of dynamic-max.

This changeset replaces a "try x catch y" expression with a "finally x y" expression.

Signed-off-by: Jonathan Knowles <jonathan.knowles@eu.citrix.com>
Acked-by: Marcus Granado <Marcus.Granado@eu.citrix.com>
15 years ago[CA-39589] Fixes confusing code structure, which made it hard to discern the true...
Jonathan Knowles [Mon, 29 Mar 2010 15:11:51 +0000 (16:11 +0100)]
[CA-39589] Fixes confusing code structure, which made it hard to discern the true execution path through a relatively long and deeply nested function.

Signed-off-by: Jonathan Knowles <jonathan.knowles@eu.citrix.com>
Acked-by: Marcus Granado <Marcus.Granado@eu.citrix.com>
15 years agoCA-36244: Broadcast the management_ip_cond condition variable unconditionally in...
Jon Ludlam [Mon, 29 Mar 2010 09:11:36 +0000 (10:11 +0100)]
CA-36244: Broadcast the management_ip_cond condition variable unconditionally in the 'on_dom0_networking_change' - the only thing waiting on this is immediately above, where we're waiting for a management IP. If the IP obtained by DHCP was the same as we had before, the old logic wouldn't have signalled, and therefore the loop would never have woken.

Signed-off-by: Jon Ludlam <Jonathan.Ludlam@eu.citrix.com>
15 years agoCA-39188: Change illegal MTU value to 1500 when creating Network
Rob Hoes [Mon, 29 Mar 2010 09:10:00 +0000 (10:10 +0100)]
CA-39188: Change illegal MTU value to 1500 when creating Network

There is already a default of 1500 in the datamodel for the Network.MTU field. However, language bindings tend to fill in their own default of 0 (which is illegal), when the field is not specified by the user.

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
15 years agoAdd CPUID features whitelisting foor Pool.join.
Rob Hoes [Mon, 29 Mar 2010 09:10:00 +0000 (10:10 +0100)]
Add CPUID features whitelisting foor Pool.join.

This allows the user to exclude CPUID features from the Pool.join checks by setting a mask in Pool.other_config:cpuid_feature_mask. When comparing the CPUID features of the pool and the joining host for equality, this mask is applied before the comparison. The format is the same as the format of the feature field in Host.cpu_info. The default is "ffffff7f-ffffffff-ffffffff-ffffffff", which defines the EST feature, bit 7 of the base ecx flags, as "don't care".

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
15 years agoCA-36278: add short test for the redo log functionality
David Scott [Sun, 28 Mar 2010 20:13:05 +0000 (21:13 +0100)]
CA-36278: add short test for the redo log functionality

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
15 years agoCA-29183: add a CLI 'message-destroy' to make it easier to clear out old messages...
David Scott [Sun, 28 Mar 2010 17:51:27 +0000 (18:51 +0100)]
CA-29183: add a CLI 'message-destroy' to make it easier to clear out old messages (alerts).

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
15 years agoCA-39371: quicktest will avoid calling VDI.create and VDI.destroy on an SR if the...
David Scott [Sun, 28 Mar 2010 13:19:01 +0000 (14:19 +0100)]
CA-39371: quicktest will avoid calling VDI.create and VDI.destroy on an SR if the special other-config:quicktest-no-VDI_CREATE key is set.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
15 years agoCA-39450: during domainjoin error 0x57 is also permission-denied
Marcus Granado [Sun, 28 Mar 2010 13:16:34 +0000 (14:16 +0100)]
CA-39450: during domainjoin error 0x57 is also permission-denied

Signed-off-by: Marcus Granado <marcus.granado@eu.citrix.com>
15 years agoCA-39288: host-enable-disable-extauth should be pool-admin
Marcus Granado [Sun, 28 Mar 2010 13:16:33 +0000 (14:16 +0100)]
CA-39288: host-enable-disable-extauth should be pool-admin

Signed-off-by: Marcus Granado <marcus.granado@eu.citrix.com>
15 years agoCA-38729: split {en,dis}able extauth exceptions to simplify translations in xencenter
Marcus Granado [Wed, 24 Mar 2010 11:10:58 +0000 (11:10 +0000)]
CA-38729: split {en,dis}able extauth exceptions to simplify translations in xencenter

Signed-off-by: Marcus Granado <marcus.granado@eu.citrix.com>
15 years agoCA-32170: On start, xapi GCs messages. If any of those fails to parse, the exception...
Jon Ludlam [Wed, 24 Mar 2010 11:08:12 +0000 (11:08 +0000)]
CA-32170: On start, xapi GCs messages. If any of those fails to parse, the exception bubbles up to the top and causes xapi to exit. This patch fixes that bad behaviour.

Signed-off-by: Jon Ludlam <Jonathan.Ludlam@eu.citrix.com>
15 years agoCA-36934: in the API call patch "precheck", if the patch has been downloaded from...
David Scott [Wed, 24 Mar 2010 11:06:53 +0000 (11:06 +0000)]
CA-36934: in the API call patch "precheck", if the patch has been downloaded from the master then delete the patch afterwards. This makes leaks of patch files less likely (although they're going to be rare since there aren't going to be many patches)

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
15 years agoCA-36410: When importing VM metadata, if the VM is Suspended then preserve this....
David Scott [Wed, 17 Mar 2010 17:57:21 +0000 (17:57 +0000)]
CA-36410: When importing VM metadata, if the VM is Suspended then preserve this. If the VM was in any other state (eg Running) then it can't be any more: set it to Halted.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
15 years agoCA-36448: remove a sleep(30) I accidentally added (!)
David Scott [Wed, 17 Mar 2010 17:02:50 +0000 (17:02 +0000)]
CA-36448: remove a sleep(30) I accidentally added (!)

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
15 years agoCA-38030: improve the RRD behaviour when the system clock moves backwards (earlier)
David Scott [Wed, 17 Mar 2010 15:33:01 +0000 (15:33 +0000)]
CA-38030: improve the RRD behaviour when the system clock moves backwards (earlier)

Moving the clock backwards (earlier) is a bad thing to do: it will cause many time-related functions to fail. Most things can be cleared with a reboot... except RRDs which are persistent.

When the clock moves towards the future, lots of recent RRD data is lost as it is averaged and then shuffled into more approximate RRDs.

When the clock moves towards the past, the previous behaviour is to reject old updates as invalid. This unfortunately means that fields driven from RRDs (eg memory-actual) freeze (often at 0). The new behaviour is to:
* accept the update even though we know something is wrong
* log a warning message
* generate a single HOST_CLOCK_WENT_BACKWARDS ALERT.

SIgned-off-by: David Scott <dave.scott@eu.citrix.com>
15 years agoCA-31448: unconditionally read all the HTTP headers resulting from an HTTP PUT, not...
David Scott [Tue, 16 Mar 2010 22:29:33 +0000 (22:29 +0000)]
CA-31448: unconditionally read all the HTTP headers resulting from an HTTP PUT, not just the first line.

xapi HTTP handlers (eg the patch upload one) expext to be able to write a complete set of HTTP response headers, without someone closing the socket and triggering an EPIPE.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
15 years agoCA-38120: tidy up stunnel-related logging a bit by adding the host and port as well...
David Scott [Tue, 16 Mar 2010 20:56:42 +0000 (20:56 +0000)]
CA-38120: tidy up stunnel-related logging a bit by adding the host and port as well as pid.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
15 years agoCA-27944: On pool eject, remove all locally stored blobs (rrds,messages)
Jon Ludlam [Tue, 16 Mar 2010 15:11:05 +0000 (15:11 +0000)]
CA-27944: On pool eject, remove all locally stored blobs (rrds,messages)

Signed-off-by: Jon Ludlam <Jonathan.Ludlam@eu.citrix.com>
15 years agoCA-26611: make CN include domain name.
Simon Rowe [Mon, 15 Mar 2010 10:59:37 +0000 (10:59 +0000)]
CA-26611: make CN include domain name.

Signed-off-by: Simon Rowe <simon.rowe@eu.citrix.com>
15 years agoCA-38369: fix errorcode regression in xapi with LW54 during domain-join-leave
Marcus Granado [Tue, 16 Mar 2010 14:58:48 +0000 (14:58 +0000)]
CA-38369: fix errorcode regression in xapi with LW54 during domain-join-leave

this patch only adds the new error codes; it doesn't modify the error strings.

Signed-off-by: Marcus Granado <marcus.granado@eu.citrix.com>
15 years ago[CP-1552] SLES 10 SP3 x86_64 support
Alex Zeffertt [Thu, 14 Jan 2010 13:22:53 +0000 (13:22 +0000)]
[CP-1552] SLES 10 SP3 x86_64 support

Add template for SLES 10 SP3 x86_64.

Note: We cannot add a template for the 32 bit version since between
SP2 and SP3 Novell removed the PAE guest kernel from the installer
ISO, leaving only the non-PAE guest kernel.  This is not a problem for
them since they have compiled their Xen 3.2 hypervisor to support
non-PAE PV guests (instead of PAE PV guests.) However, since v3.2 this
compile option has been removed from Xen.

This means that we cannot boot the SLES 10 SP3 i386 installer ISO.  To
install SLES 10 SP3 i386 it is necessary to install SP2 and upgrade.

Signed-off-by: <alex.zeffertt@eu.citrix.com>
15 years agoCA-38971: Sometimes windows guests take a long time to shutdown cleanly. This patch...
Jonathan Knowles [Tue, 16 Mar 2010 14:53:56 +0000 (14:53 +0000)]
CA-38971: Sometimes windows guests take a long time to shutdown cleanly. This patch lengthens the timeout time for clean shutdown requests from 20 minutes to 60 minutes.

Windows guests sometimes have genuine reasons to take longer than 20 minutes to shut down.

Possible reasons include:
* there are updates to install.
* the guest is overloaded.
* the host is overloaded.

Signed-off-by: Jonathan Knowles <jonathan.knowles@eu.citrix.com>
Acked-by: David Scott <dave.scott@eu.citrix.com>
15 years agoCA-35059: LVHDRT/TC8713 wants a noninteractive PV guest.
Daniel Stodden [Tue, 16 Mar 2010 14:42:59 +0000 (14:42 +0000)]
CA-35059: LVHDRT/TC8713 wants a noninteractive PV guest.

Password init on the console, during an interactive first boot, blocks
the xs-tools daemon start, which prevents a VM.suspend, which TC8713
relies on.

The behavioral difference sneaked in with xgts.hg cset
559:7d7540a5ff43 (utilities support for Debian Squeeze). Fixed by
setting the "noninteractive" PV attribute.

Signed-off-by: Daniel Stodden <daniel.stodden@citrix.com>
15 years agoCA-38109: HostInstallation/TCQuicktest: quicktest failed: SR_OPERATION_NOT_SUPPORTED...
Ewan Mellor [Tue, 16 Mar 2010 14:40:52 +0000 (14:40 +0000)]
CA-38109: HostInstallation/TCQuicktest: quicktest failed: SR_OPERATION_NOT_SUPPORTED: OpaqueRef:2c96e6a1-afdc-19a6-b6cb-37af7e90e504
CP-1603: CR-50: R4. Include REQ259 - Writable ISO SRs

Update quicktest to match new writable ISO SR support.  The XenServer
Tools SR is special-cased to prevent writing even if the ISO SR backend
itself allows it, and quicktest needed to be updated to match this.

Also, the VM import code has a special case to protect importing into
ISO SRs, so quicktest needs to know about this, too.

Signed-off-by: Ewan Mellor <ewan.mellor@eu.citrix.com>