]> xenbits.xensource.com Git - xcp/xen-api.git/log
xcp/xen-api.git
14 years agoCA-41839: Moving to RPMs for xapi had the side-effect of renaming the CLI RPM from...
David Scott [Fri, 18 Jun 2010 12:37:34 +0000 (13:37 +0100)]
CA-41839: Moving to RPMs for xapi had the side-effect of renaming the CLI RPM from xe-cli-... to xapi-xe... This patch changes it back for now to minimise unwanted churn.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
diff -r 2ab7bcee7d0f mk/Makefile--- a/mk/Makefile Mon Jun 07 16:07:06 2010 +0100
+++ b/mk/Makefile Wed Jun 16 18:24:44 2010 +0100
@@ -34,7 +34,7 @@
 .PHONY: build
 build: $(OUTPUT_CLI_RT) $(OUTPUT_SDK) $(MY_SOURCES)/MANIFEST
  $(call mkdir_clean,$(MY_LINUX_CDFILES)/client_install)
- install -m 755 -o root -g root $(RPM_RPMSDIR)/$(DOMAIN0_ARCH_OPTIMIZED)/xapi-xe*.rpm $(MY_LINUX_CDFILES)/client_install/
+ install -m 755 -o root -g root $(RPM_RPMSDIR)/$(DOMAIN0_ARCH_OPTIMIZED)/xapi-xe-*.rpm $(MY_LINUX_CDFILES)/client_install/xe-cli-$(PRODUCT_VERSION)-$(BUILD_NUMBER).$(DOMAIN0_ARCH_OPTIMIZED).rpm

 $(MY_SOURCES)/MANIFEST: $(MY_SOURCES_DIRSTAMP) $(OUTPUT_XAPI_SRC)
  rm -f $@

14 years agoRemove bond-slave filter from PIF.scan
Rob Hoes [Thu, 17 Jun 2010 16:31:00 +0000 (17:31 +0100)]
Remove bond-slave filter from PIF.scan

This filter uses sysfs to find out whether an interface is a bond slave. This does not work when the openvswitch backend is used. Besides, it does not seem to be necessary (anymore?) anyway.

PIF.scan creates a new PIF for each interface it finds if this interface is physical and there is no PIF with the same MAC. The slave interfaces always have the same MAC as the bond master PIF (bridging backend) or their "real" MACs as stored in their PIFs (openvswitch backend). Therefore, when a bond is in effect, the MACs of all bond slaves have corresponding PIFs in the DB, so PIF.scan won't create new ones.

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
14 years agoCA-40910: Only copy physical PIFs on pool join
Rob Hoes [Thu, 17 Jun 2010 16:31:00 +0000 (17:31 +0100)]
CA-40910: Only copy physical PIFs on pool join

On pool join, any bonds or VLANs on the joining host are supposed to be ignored. When the host reboots after the join, it will inherit the bond/VLAN setup from the pool master. Therefore, Bond and VLAN objects are not copied from the joining host to the pool. However, bond and VLAN master PIFs are, with is not good. This patch fixes that.

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
14 years agoSplit off bond/VLAN reconstruction code from Dbsync_slave
Rob Hoes [Thu, 17 Jun 2010 16:31:00 +0000 (17:31 +0100)]
Split off bond/VLAN reconstruction code from Dbsync_slave

When a pool slave starts up, it needs synchronise its bonds and VLANs with the pool master. This code is in the Dbsync_slave module, but does not really belong there (DBsync_slave is for synchronising DB fields such as PIF.currently_attached with the state of the physical system). This patch gives the bond/VLAN recreation code its own module.

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
14 years agoMake sure the API docs also look good in Internet Explorer
Rob Hoes [Thu, 17 Jun 2010 16:31:00 +0000 (17:31 +0100)]
Make sure the API docs also look good in Internet Explorer

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
14 years agoAPI doc: add hook to translate release code names to something sensible
Rob Hoes [Thu, 17 Jun 2010 16:31:00 +0000 (17:31 +0100)]
API doc: add hook to translate release code names to something sensible

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
14 years agoCA-41171: anyone should be able to access http/get_host_rrd
Marcus Granado [Thu, 27 May 2010 11:04:40 +0000 (12:04 +0100)]
CA-41171: anyone should be able to access http/get_host_rrd

otherwise historical performance data of hosts is only available to pool* subjects.

Signed-off-by: Marcus Granado <marcus.granado@eu.citrix.com>
14 years agoAdd lifecycle info and release notes to HTML API docs
Rob Hoes [Tue, 25 May 2010 13:26:27 +0000 (14:26 +0100)]
Add lifecycle info and release notes to HTML API docs

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
14 years agoAdd lifecycle fields to some datamodel objects
Rob Hoes [Tue, 25 May 2010 13:26:27 +0000 (14:26 +0100)]
Add lifecycle fields to some datamodel objects

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
14 years agoAdd lifecycle information to datamodel
Rob Hoes [Tue, 25 May 2010 13:26:27 +0000 (14:26 +0100)]
Add lifecycle information to datamodel

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
14 years agoIntegrate API docs with OCamlDoc web interface
Rob Hoes [Tue, 25 May 2010 13:26:27 +0000 (14:26 +0100)]
Integrate API docs with OCamlDoc web interface

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
14 years agoGenerate API docs in JSON format
Rob Hoes [Tue, 25 May 2010 13:26:27 +0000 (14:26 +0100)]
Generate API docs in JSON format

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
14 years agoCA-34933: do not kill sessions children of sessions with running tasks
Marcus Granado [Fri, 21 May 2010 13:36:56 +0000 (14:36 +0100)]
CA-34933: do not kill sessions children of sessions with running tasks

Signed-off-by: Marcus Granado <marcus.granado@eu.citrix.com>
14 years agoCA-34933: test for valid session when calling back master
Marcus Granado [Fri, 21 May 2010 13:36:56 +0000 (14:36 +0100)]
CA-34933: test for valid session when calling back master

Signed-off-by: Marcus Granado <marcus.granado@eu.citrix.com>
14 years agoCA-34933: there should be more sessions than tasks
Marcus Granado [Fri, 21 May 2010 13:36:56 +0000 (14:36 +0100)]
CA-34933: there should be more sessions than tasks

Signed-off-by: Marcus Granado <marcus.granado@eu.citrix.com>
14 years agoCA-34933: gc intrapool sessions independently of normal sessions
Marcus Granado [Fri, 21 May 2010 13:36:56 +0000 (14:36 +0100)]
CA-34933: gc intrapool sessions independently of normal sessions

Signed-off-by: Marcus Granado <marcus.granado@eu.citrix.com>
14 years agoCA-34933: do not gc sessions in running tasks
Marcus Granado [Fri, 21 May 2010 13:36:56 +0000 (14:36 +0100)]
CA-34933: do not gc sessions in running tasks

Signed-off-by: Marcus Granado <marcus.granado@eu.citrix.com>
14 years agoCA-34933: do not gc intrapool sessions
Marcus Granado [Fri, 21 May 2010 13:36:56 +0000 (14:36 +0100)]
CA-34933: do not gc intrapool sessions

Signed-off-by: Marcus Granado <marcus.granado@eu.citrix.com>
14 years agoCA-34933: add proper interface for xapi_session.ml functions
Marcus Granado [Fri, 21 May 2010 13:36:56 +0000 (14:36 +0100)]
CA-34933: add proper interface for xapi_session.ml functions

Signed-off-by: Marcus Granado <marcus.granado@eu.citrix.com>
14 years ago[CA-41286] Fixes a memory accounting error in the squeezing code.
Jonathan Knowles [Wed, 19 May 2010 10:50:11 +0000 (11:50 +0100)]
[CA-41286] Fixes a memory accounting error in the squeezing code.

When calculating an upper bound for the memory usage of an HVM domain with no balloon driver, the squeezing code would double-count (inappropriately) the shadow memory area.
This caused the squeezing algorithm to underestimate the amount of usable memory of any host running one or more HVM domains without balloon drivers.
This change removes the double-counting error, and also fixes a bug that caused the squeezer to add (inappropriately) the shadow memory size to Xen maxmem.

Signed-off-by: Jonathan Knowles <jonathan.knowles@eu.citrix.com>
Acked-by: Dave Scott <dave.scott@eu.citrix.com>
14 years agoAdd future release to datamodel types
Rob Hoes [Thu, 17 Jun 2010 16:31:00 +0000 (17:31 +0100)]
Add future release to datamodel types

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
14 years agoEnsure that the xapi-client library is uninstalled from the right place when rebuildi...
Rob Hoes [Thu, 17 Jun 2010 16:31:00 +0000 (17:31 +0100)]
Ensure that the xapi-client library is uninstalled from the right place when rebuilding xapi.

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
15 years agoRevert c/s 848:dddf116cddb5 - VM.other_config:auto_poweron is inexplicable either...
David Scott [Thu, 13 May 2010 13:31:01 +0000 (14:31 +0100)]
Revert c/s 848:dddf116cddb5 - VM.other_config:auto_poweron is inexplicable either way around, so revert back to the old behaviour until we come up with a new plan (probably involving merging this with HA VM restart)

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
14 years agoUpdated API evolution document
Rob Hoes [Thu, 17 Jun 2010 16:31:00 +0000 (17:31 +0100)]
Updated API evolution document

This document is meant to describe how the elements of the XenAPI may evolve over time, and provide compatibility guidelines. This is only a proposal and is still incomplete; we need some discussion about it, especially to establish what sort of compatibility guarantees we can give.

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
15 years agoCA-41119: make sure we persist VM_guest_metrics data so that master restarts don...
David Scott [Thu, 6 May 2010 16:23:02 +0000 (17:23 +0100)]
CA-41119: make sure we persist VM_guest_metrics data so that master restarts don't blank stuff like slave VM IP addresses.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
15 years agoCA-41107: Fix 'xe vm-export --metadata --multiple'
Ian Hickey [Thu, 6 May 2010 15:48:15 +0000 (16:48 +0100)]
CA-41107: Fix 'xe vm-export --metadata --multiple'

The filename of each separate export needs to be changed to avoid a 'file already exists' type error.

Signed-off-by: Ian Hickey <ian.hickey@citrix.com>
Acked-by: Dave Scott <dave.scott@eu.citrix.com>
15 years agoA few bugfixes and a few minor improvements to current xe cmdline tool implementation
Zheng Li [Tue, 4 May 2010 05:22:08 +0000 (06:22 +0100)]
A few bugfixes and a few minor improvements to current xe cmdline tool implementation

Bugfixes:

* xe command line options doesn't mix well with XE_EXTRA_ARGS varialbe. E.g. setting XE_EXTRA_ARGS to "username=xxxx,password=yyyy" (or any non-nil valid configuration) and calling "xe -s <some server> vm-list" will break xe. Note that this is a common user case in a cluster-like environment where all the machines have the same user/passwd config, where one can conveniently set user/passwd in XE_EXTRA_ARGS for once and connect to different servers by only specifying different "-s" arguments in the cmdline.

* Setting "compat=true" in xe's RC file won't work. E.g. xe vm-clone vm-name=<vm name> new-name=<new vm name> with "compat=true" in ~/.xe won't work (but with "compat=true" in XE_EXTRA_ARGS or in xe cmdline will work).

* Setting a password with comma via XE_EXTRA_ARGS will break the logic. After the fix, it's possible to specify that by using backslash to escape the comma (e.g. password=pass\,word)

* clean up the options handling logic, so that cmdline options, RC file setting and XE_EXTRA_ARGS variable can mix consistently even in some corner cases and follow the natural priority: cmdline option > XE_EXTRA_ARGS > ~/.xe RC > default settings

Improvements:

* change options "-debug" and "-debug-on-fail" to "--debug" and "--debug-on-fail", so that every command line option now follows the common naming convention of -shortcut v.s.--full-name (with the only standard exception of having both "-help" and "--help"). AFAICS, both debug options are (maybe deliberately) not documented in the manual, so changing the names might not be a big issue regarding compatibilities.

* complete the pair relation between command line options and RC/environment variables. There were some missings from either side: e.g. "compat=xxxx" has no "--compat" correspondence and "--debug"("--debug-on-fail") has not "debug=xxxx" in par.

Signed-off-by: Zheng Li <dev@zheng.li>
15 years agoCA-40882: In the SLES 10SP2 kernel the 3 VIF limit was removed so remove this limit...
Alex Zeffertt [Tue, 27 Apr 2010 14:58:24 +0000 (15:58 +0100)]
CA-40882: In the SLES 10SP2 kernel the 3 VIF limit was removed so remove this limit in the template

Signed-off-by: Alex Zeffertt <alex.zeffertt@eu.citrix.com>
15 years agoAdd missing edition "XD"
Zheng Li [Fri, 23 Apr 2010 18:30:04 +0000 (19:30 +0100)]
Add missing edition "XD"

"XD" edition seems to be missing here. The more interesting thing is that when we fail because of this bug, the log file will say "unknown edition" as expected, but the cli's error message will say "daemon was not found".

Signed-off-by: Zheng Li <dev@zheng.li>
15 years agoEnable native/bytecode compilation choices, and some Makefile simplification.
Zheng Li [Fri, 23 Apr 2010 17:54:31 +0000 (18:54 +0100)]
Enable native/bytecode compilation choices, and some Makefile simplification.

* Enable the independent bytecode compilation mode.

Previously this was unfortunately blocked by the hard wired xapi-client.cmxa in the Makefile. Now we should be able to load the bytecode version of xapi client lib in the OCaml interpreter for interactive development with instant feedback. Use $(COMPILE_NATIVE) and $(COMPILE_BYTE) to control these options.

* Change a few "XXX_TARGET = $(if $(equal $(XXX_CONF), yes), $(XXX_OBJ), none)" to "XXX_TARGET = $(if $(XXX_CONF), $(XXX_OBJ))"

The judge conditions are not strictly equivalent in semantics. The former holds only if XXX_CONF equals to "yes", the later condition holds when XXX_CONF is set to any non-negative string (not "no", "false", "0", none etc.). But I think it should be the same regarding XAPI's current Makefiles, and with more simplicity and tolerance. A lot more simplication and optimization can be done to these Makefiles, it's just a matter of time. Moreover XAPI should consider to update to new version of OMake (which should be better, but unfortunately not fully compatible with the old one).

Signed-off-by: Zheng Li <dev@zheng.li>
15 years agoCA-40621: Make the charset explicit in outgoing emails sent by mail-alarm
Alex Zeffertt [Fri, 23 Apr 2010 08:46:29 +0000 (09:46 +0100)]
CA-40621: Make the charset explicit in outgoing emails sent by mail-alarm

Signed-off-by: Alex Zeffertt <alex.zeffertt@eu.citrix.com>
15 years agoCA-40755: session-subject-identifier-{list,logout} should handle group sids
Marcus Granado [Thu, 22 Apr 2010 16:29:01 +0000 (17:29 +0100)]
CA-40755: session-subject-identifier-{list,logout} should handle group sids

Signed-off-by: Marcus Granado <marcus.granado@eu.citrix.com>
15 years agoCA-37151: If a SIGTERM/SIGINT is received during metadata backup we should tidy up...
Alex Zeffertt [Thu, 22 Apr 2010 16:08:07 +0000 (17:08 +0100)]
CA-37151: If a SIGTERM/SIGINT is received during metadata backup we should tidy up properly

This means run cleanup() if the signal is received and in cleanup block the signal so that
a second SIGTERM/SIGINT doesn't cause a problem.

Also, in cleanup(), if we have an uninitialised vdi (e.g. because we've just created it but
have not yet mkfs'd it) then we ought to delete the vdi.

Signed-off-by: Alex Zeffertt <alex.zeffertt@eu.citrix.com>
15 years agoCA-40601: hup syslog, not xapi, when rotating audit.log
Marcus Granado [Tue, 20 Apr 2010 17:07:46 +0000 (18:07 +0100)]
CA-40601: hup syslog, not xapi, when rotating audit.log

Signed-off-by: Marcus Granado <marcus.granado@eu.citrix.com>
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>