]> xenbits.xensource.com Git - xcp/xen-api.git/log
xcp/xen-api.git
14 years agoAdd the notion of a database schema.
David Scott [Wed, 26 Jan 2011 17:39:06 +0000 (17:39 +0000)]
Add the notion of a database schema.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
14 years agoAdd a unit test for Pool_db_backup.prepare_database_for_restore.
David Scott [Wed, 26 Jan 2011 17:39:06 +0000 (17:39 +0000)]
Add a unit test for Pool_db_backup.prepare_database_for_restore.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
14 years agoRewrite the pool database restore processing to use the type-safe Db.* API, now that...
David Scott [Wed, 26 Jan 2011 17:39:06 +0000 (17:39 +0000)]
Rewrite the pool database restore processing to use the type-safe Db.* API, now that it's possible to have multiple active databases. Fold the 'post_restore_hook' logic into a single 'prepare' step as there was no special reason it had to be done so late (and in the wrong layer of the code)

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
14 years agoNow that all the release-specific upgrade rules are in the 'db_hiupgrade' (from where...
David Scott [Wed, 26 Jan 2011 17:39:06 +0000 (17:39 +0000)]
Now that all the release-specific upgrade rules are in the 'db_hiupgrade' (from where they can use the type-safe Db.* API), remove the unneeded low-level logic.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
14 years agoAdd a unit test for the update_snapshots database upgrade logic.
David Scott [Wed, 26 Jan 2011 17:39:06 +0000 (17:39 +0000)]
Add a unit test for the update_snapshots database upgrade logic.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
14 years agoRewrite the database upgrade update_snapshots to use the type-safe Db.* API rather...
David Scott [Wed, 26 Jan 2011 17:39:06 +0000 (17:39 +0000)]
Rewrite the database upgrade update_snapshots to use the type-safe Db.* API rather than the unsafe low-level database API. Move this xapi-specific stuff out of the database layer and put it further up the stack.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
14 years agoAdd a unit test for the database upgrade_bios_strings logic.
David Scott [Wed, 26 Jan 2011 17:39:06 +0000 (17:39 +0000)]
Add a unit test for the database upgrade_bios_strings logic.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
14 years agoRewrite the database upgrade upgrade_bios_strings to use the type-safe Db.* API rathe...
David Scott [Wed, 26 Jan 2011 17:39:06 +0000 (17:39 +0000)]
Rewrite the database upgrade upgrade_bios_strings to use the type-safe Db.* API rather than the unsafe low-level database API. Move this xapi-specific stuff out of the database layer and put it further up the stack.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
14 years agoAdd a unit test for the database upgrade_vm_records logic.
David Scott [Wed, 26 Jan 2011 17:39:06 +0000 (17:39 +0000)]
Add a unit test for the database upgrade_vm_records logic.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
14 years agoRewrite the database upgrade upgrade_vm_records to use the type-safe Db.* API rather...
David Scott [Wed, 26 Jan 2011 17:39:06 +0000 (17:39 +0000)]
Rewrite the database upgrade upgrade_vm_records to use the type-safe Db.* API rather than the unsafe low-level database API. Move this xapi-specific stuff out of the database layer and put it further up the stack.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
14 years agoAdd a new type: Db_ref.t which may be either (In_memory x) or Remote. At the xapi...
David Scott [Wed, 26 Jan 2011 17:39:06 +0000 (17:39 +0000)]
Add a new type: Db_ref.t which may be either (In_memory x) or Remote. At the xapi-level, each Context can have a different Db_ref.t, allowing the type-safe Db API to be used on multiple disjoint databases.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
14 years agoCA-47366-Remove-lvhd_stop_using_these_vdis_and_call_script
Mike McClurg [Wed, 26 Jan 2011 17:39:05 +0000 (17:39 +0000)]
CA-47366-Remove-lvhd_stop_using_these_vdis_and_call_script

Removed the API call and the corresponding lvhdrt test case, TC-8713. Also removed some quickcheck code that was calling this function.

Signed-off-by: Mike McClurg <mike.mcclurg@citrix.com>
14 years agoAdd the possibility of automatically managed many-to-many relationships between objec...
David Scott [Wed, 26 Jan 2011 17:39:05 +0000 (17:39 +0000)]
Add the possibility of automatically managed many-to-many relationships between objects in the datamodel.
1. Add the concept of a many-to-many mapping in the database schema
2. Loosen the existing datamodel sanity checks to permit this new configuration
3. Enforce referential integrity in the mid-level database update functions (remove_row; set_row_in_table)

Also add a set of unit-tests to check referential integity is maintained across create/destroy/modify

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
14 years agoAlways regenerate the 'many' side of a 'one-to-many' relationship at indexing time...
David Scott [Wed, 26 Jan 2011 17:39:05 +0000 (17:39 +0000)]
Always regenerate the 'many' side of a 'one-to-many' relationship at indexing time. This means that every system start acts equivalently to an upgrade from a previous version, simplifying testing.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
14 years agoRemove all mutable state within the database layer, leaving one single global referen...
David Scott [Wed, 26 Jan 2011 17:39:05 +0000 (17:39 +0000)]
Remove all mutable state within the database layer, leaving one single global reference (to the master's single "database"). Allow the type-safe Db.* API to be used on more than one database at a time, by adding the "current database" to Context.t. Add a notion of database callbacks which are used by xapi for both the redo-log(s) and the event system.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
14 years agoCA-6021: rather than look up a "uuid" field to check whether an object exists, use...
David Scott [Wed, 26 Jan 2011 17:39:05 +0000 (17:39 +0000)]
CA-6021: rather than look up a "uuid" field to check whether an object exists, use "is_valid_ref" instead.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
14 years agoMake the heartbeat disk big enough to accommodate 64 hosts.
David Scott [Wed, 26 Jan 2011 17:39:05 +0000 (17:39 +0000)]
Make the heartbeat disk big enough to accommodate 64 hosts.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
14 years agoCA-48995: after upgrading an old database schema, make sure to bump the schema to...
David Scott [Wed, 26 Jan 2011 17:39:05 +0000 (17:39 +0000)]
CA-48995: after upgrading an old database schema, make sure to bump the schema to the new level (or we will persist forever on the old level...)

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
14 years agoCA-48995: rather than rely on the pool db backup error preventing forced pool.join...
David Scott [Wed, 26 Jan 2011 17:39:05 +0000 (17:39 +0000)]
CA-48995: rather than rely on the pool db backup error preventing forced pool.join across distinct PRODUCT_VERSIONs, add an explicit check.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
14 years agoAdd a component-level test for the database server subcomponent.
David Scott [Wed, 26 Jan 2011 17:39:05 +0000 (17:39 +0000)]
Add a component-level test for the database server subcomponent.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
14 years agoMove the generation into the database cache rather than keeping it as a separate...
David Scott [Wed, 26 Jan 2011 17:39:05 +0000 (17:39 +0000)]
Move the generation into the database cache rather than keeping it as a separate global thing.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
14 years agoChange the database type to include the schema version, rather than tracking it separ...
David Scott [Wed, 26 Jan 2011 17:39:05 +0000 (17:39 +0000)]
Change the database type to include the schema version, rather than tracking it separately all over the place.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
14 years agoRemove the xapi_minor from the database manifest because it shouldn't have been used...
David Scott [Wed, 26 Jan 2011 17:39:05 +0000 (17:39 +0000)]
Remove the xapi_minor from the database manifest because it shouldn't have been used: version checks should have considered the schema version instead.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
14 years agoRemove the xapi_major from the database manifest because it shouldn't have been used...
David Scott [Wed, 26 Jan 2011 17:39:05 +0000 (17:39 +0000)]
Remove the xapi_major from the database manifest because it shouldn't have been used: version checks should have considered the schema version instead.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
14 years agoRemove the build_number from the database manifest because it wasn't used.
David Scott [Wed, 26 Jan 2011 17:39:05 +0000 (17:39 +0000)]
Remove the build_number from the database manifest because it wasn't used.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
14 years agoRemove the product_brand from the database manifest because it wasn't used.
David Scott [Wed, 26 Jan 2011 17:39:05 +0000 (17:39 +0000)]
Remove the product_brand from the database manifest because it wasn't used.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
14 years agoRemove the product_version from the database manifest because it wasn't used.
David Scott [Wed, 26 Jan 2011 17:39:05 +0000 (17:39 +0000)]
Remove the product_version from the database manifest because it wasn't used.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
14 years agoRemove the pool_token from the database manifest since it doesn't make sense to prese...
David Scott [Wed, 26 Jan 2011 17:39:05 +0000 (17:39 +0000)]
Remove the pool_token from the database manifest since it doesn't make sense to preserve the pool secret if all other hosts are being deleted anyway (on database restore)

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
14 years agoRemove the pool_conf from the database manifest because it wasn't used.
David Scott [Wed, 26 Jan 2011 17:39:05 +0000 (17:39 +0000)]
Remove the pool_conf from the database manifest because it wasn't used.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
14 years agoRemove the control_domain_uuid from the database manifest (since it duplicated inform...
David Scott [Wed, 26 Jan 2011 17:39:05 +0000 (17:39 +0000)]
Remove the control_domain_uuid from the database manifest (since it duplicated information already in the database)

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
14 years agoRemove the installation_uuid from the database manifest (since it duplicated informat...
David Scott [Wed, 26 Jan 2011 17:39:05 +0000 (17:39 +0000)]
Remove the installation_uuid from the database manifest (since it duplicated information already in the database)

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
14 years agoPR-1126: add support for secret.other_config
Marcus Granado [Wed, 26 Jan 2011 17:39:05 +0000 (17:39 +0000)]
PR-1126: add support for secret.other_config

as requested by storage backend.

Signed-off-by: Marcus Granado <marcus.granado@eu.citrix.com>
14 years agoCA-46738: escape email body properly in vmpp alerts
Marcus Granado [Wed, 26 Jan 2011 17:39:05 +0000 (17:39 +0000)]
CA-46738: escape email body properly in vmpp alerts

Signed-off-by: Marcus Granado <marcus.granado@eu.citrix.com>
14 years agoPR-1089: add solaris 10 template
Marcus Granado [Wed, 26 Jan 2011 17:39:05 +0000 (17:39 +0000)]
PR-1089: add solaris 10 template

For solaris, viridian must be false; nx is enabled in template.

Signed-off-by: Marcus Granado <marcus.granado@eu.citrix.com>
14 years agoRemove unused variable leaving_snapshots in xapi_vm.ml
Matthias Goergnes [Wed, 26 Jan 2011 17:39:05 +0000 (17:39 +0000)]
Remove unused variable leaving_snapshots in xapi_vm.ml

Signed-off-by: Matthias Goergnes <matthias.goergens@citrix.com>
14 years agoRemove unused variable dead_hosts in xapi_ha_vm_failover.ml
Matthias Goergnes [Wed, 26 Jan 2011 17:39:05 +0000 (17:39 +0000)]
Remove unused variable dead_hosts in xapi_ha_vm_failover.ml

Signed-off-by: Matthias Goergnes <matthias.goergens@citrix.com>
14 years agoRemove unused variable e in xapi_vm.ml
Matthias Goergnes [Wed, 26 Jan 2011 17:39:05 +0000 (17:39 +0000)]
Remove unused variable e in xapi_vm.ml

Signed-off-by: Matthias Goergnes <matthias.goergens@citrix.com>
14 years agoCA-48062 xapi hook "vm-pre-start"
James Bulpin [Tue, 9 Nov 2010 18:44:19 +0000 (18:44 +0000)]
CA-48062 xapi hook "vm-pre-start"

Signed-off-by: James Bulpin <James.Bulpin@eu.citrix.com>
14 years agoRemoving warnings, first wave.
Rok Strnisa [Wed, 26 Jan 2011 17:39:05 +0000 (17:39 +0000)]
Removing warnings, first wave.

Signed-off-by: Rok Strnisa <rok.strnisa@citrix.com>
14 years agoCA-47759 - CLI command vm-reboot failed: Stunnel process 17840 existed with exit...
John Else [Wed, 26 Jan 2011 17:39:05 +0000 (17:39 +0000)]
CA-47759 - CLI command vm-reboot failed: Stunnel process 17840 existed with exit code 0

Remove the really_write function and instead use Unixext.really_write.

Signed-off-by: John Else <john.else@citrix.com>
14 years agoCA-47663 The host blob sync logs 10s of thousands of log lines per iteration
Mike McClurg [Wed, 26 Jan 2011 17:39:05 +0000 (17:39 +0000)]
CA-47663 The host blob sync logs 10s of thousands of log lines per iteration

The rsync command called by Xapi_sync.sync_host was given the -v (verbose) option, which made it spew tens of thousands of lines into the xensource.log file. I removed the -v option and added --stats in order to keep the file transfer summaries in the output.

Signed-off-by: Mike McClurg <mike.mcclurg@citrix.com>
14 years agoCA-47663: Fix indentation and whitespace problems in xapi_sync.ml
Mike McClurg [Wed, 26 Jan 2011 17:39:05 +0000 (17:39 +0000)]
CA-47663: Fix indentation and whitespace problems in xapi_sync.ml

This patch is in preparation to resolve issue CA-47663. I wanted to make a lot of whitespace and indentation changes to this file for readability's sake, and decided to keep those changes separate from the (minor) changes that I will make to actually fix this issue.

Signed-off-by: Mike McClurg <mike.mcclurg@citrix.com>
14 years agoCA-47556: Revert to PV template for RHEL 6 64 bit for now
Alex Zeffertt [Wed, 26 Jan 2011 17:39:05 +0000 (17:39 +0000)]
CA-47556: Revert to PV template for RHEL 6 64 bit for now

From ticket description:

See CP-1876 - RH have changed their kernel to require an option to use PV on HVM.
We currently have no way to set that option ourselves so would rely on the customer
doing it which they will be very unlikely to do in most cases. Also it's not easy
to switch from emulated drivers to PV therefore the chances are customers will end
up with a poorly performing fully HVM VM.

For RTM I suggest we revert to using the PV template for 64 bit (just like we do
for 32 bit). This is a simple revert of the template code.

Long term we want to move to HVM to avoid the performance penalty of 64 bit PV but
RH6 isn't quite ready yet. This could be a change we make when we turn RH6 support
into fully supported, rather than experimental, in a future LCM update

Signed-off-by: Alex Zeffertt <alex.zeffertt@eu.citrix.com>
14 years agoCA-47135 Add "experimental" to RHEL 6 and Debian Squeeze templates
Mike McClurg [Wed, 26 Jan 2011 17:39:05 +0000 (17:39 +0000)]
CA-47135 Add "experimental" to RHEL 6 and Debian Squeeze templates

Added "is_experimental" argument to make_long_name function, and added
optional "is_experimental" argument to template building functions. If
a template is experimental (untested), pass the argument
~is_experimental:true to the *_template function.

CA-48240: Debian Squeeze 32-bit shouldn't be experimental, Ubuntu 32-bit
and 64-bit should.

CP-1686: In Boston the Ubuntu templates should not be marked experimental
as they will be tested and supported.

Signed-off-by: Mike McClurg <mike.mcclurg@citrix.com>
Signed-off-by: David Scott <dave.scott@eu.citrix.com>
14 years agoClean up old modules
Rob Hoes [Wed, 26 Jan 2011 17:39:05 +0000 (17:39 +0000)]
Clean up old modules

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
diff -r 0b9c761f2f4d ocaml/license/pubring.gpg
Binary file ocaml/license/pubring.gpg has changed
diff -r 0b9c761f2f4d ocaml/license/secring.gpg
Binary file ocaml/license/secring.gpg has changed
diff -r 0b9c761f2f4d ocaml/license/trustdb.gpg
Binary file ocaml/license/trustdb.gpg has changed

14 years agoDo not hardcode the edition names in the bash completion file, but ask v6d
Rob Hoes [Wed, 26 Jan 2011 17:39:05 +0000 (17:39 +0000)]
Do not hardcode the edition names in the bash completion file, but ask v6d

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
14 years agoCA-28853: CLI command returns an error on pressing Tab key --- FIXED.
Rok Strnisa [Wed, 26 Jan 2011 17:39:04 +0000 (17:39 +0000)]
CA-28853: CLI command returns an error on pressing Tab key --- FIXED.

Only the first if statement (3 lines) includes the change.
The other changes to the file only make the indentation consistent.

Signed-off-by: Rok Strnisa <rok.strnisa@citrix.com>
14 years agoCP-2137: Allow additional feature flags to be set by v6d
Rob Hoes [Wed, 26 Jan 2011 17:39:04 +0000 (17:39 +0000)]
CP-2137: Allow additional feature flags to be set by v6d

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
14 years agoUpdate ocamldoc
Rob Hoes [Wed, 26 Jan 2011 17:39:04 +0000 (17:39 +0000)]
Update ocamldoc

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
14 years agoClean up doc target of Makefile
Rob Hoes [Wed, 26 Jan 2011 17:39:04 +0000 (17:39 +0000)]
Clean up doc target of Makefile

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
14 years agoCP-2137: Switch to the new xapi<->v6d RPC interface
Rob Hoes [Wed, 26 Jan 2011 17:39:04 +0000 (17:39 +0000)]
CP-2137: Switch to the new xapi<->v6d RPC interface

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
14 years agoUse pool.restrictions to define which features are enabled
Rob Hoes [Wed, 26 Jan 2011 17:39:04 +0000 (17:39 +0000)]
Use pool.restrictions to define which features are enabled

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
14 years agoCP-2137: Use rpc-light to implement the xapi<->v6d XMLRPC interface
Rob Hoes [Wed, 26 Jan 2011 17:39:04 +0000 (17:39 +0000)]
CP-2137: Use rpc-light to implement the xapi<->v6d XMLRPC interface

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
14 years agoCA-36391: Improve failure behaviour of xe host-apply-edition
Rob Hoes [Wed, 26 Jan 2011 17:39:04 +0000 (17:39 +0000)]
CA-36391: Improve failure behaviour of xe host-apply-edition

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
14 years agoFunction to check license expiry
Rob Hoes [Wed, 26 Jan 2011 17:39:04 +0000 (17:39 +0000)]
Function to check license expiry

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
14 years agoPackage v6d as a separate RPM
Rob Hoes [Wed, 26 Jan 2011 17:39:04 +0000 (17:39 +0000)]
Package v6d as a separate RPM

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
14 years agoInclude v6 modules in xapi-client
Rob Hoes [Wed, 26 Jan 2011 17:39:04 +0000 (17:39 +0000)]
Include v6 modules in xapi-client

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
14 years agoRemove some unused modules from v6d
Rob Hoes [Wed, 26 Jan 2011 17:39:04 +0000 (17:39 +0000)]
Remove some unused modules from v6d

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
14 years agoAdd RPC client to use with rpc-light
Rob Hoes [Wed, 26 Jan 2011 17:39:04 +0000 (17:39 +0000)]
Add RPC client to use with rpc-light

The RPC client is placed next to the original XMLRPC client and does not replace it. It can, however, already be used by xapi's helper daemons.

This patch was originally written by Thomas Gazagnaire <thomas@gazagnaire.org>.

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
14 years agoRemove unnecessary dependencies to build 'xsh'
Rob Hoes [Wed, 26 Jan 2011 17:39:04 +0000 (17:39 +0000)]
Remove unnecessary dependencies to build 'xsh'

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
14 years agoRemove no longer used module that was still lying around
Rob Hoes [Wed, 26 Jan 2011 17:39:04 +0000 (17:39 +0000)]
Remove no longer used module that was still lying around

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
14 years agoFix ocamldoc extensions for use with ocaml-3.12
Rob Hoes [Wed, 26 Jan 2011 17:39:04 +0000 (17:39 +0000)]
Fix ocamldoc extensions for use with ocaml-3.12

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
14 years agofix build
David Scott [Wed, 26 Jan 2011 17:39:04 +0000 (17:39 +0000)]
fix build
Signed-off-by: David Scott <dave.scott@eu.citrix.com>
14 years agoCA-48539-XAPI_call_vdi_deactivate_during_pool-ha-disable
Mike McClurg [Wed, 26 Jan 2011 17:39:04 +0000 (17:39 +0000)]
CA-48539-XAPI_call_vdi_deactivate_during_pool-ha-disable

Fixed whitespace (again) in a few files. Modified xapi_ha.ml to
deactivate statefile/metadata vdis before detaching them. Added helper
files in xha_*.ml to do this for us.

Signed-off-by: Mike McClurg <mike.mcclurg@citrix.com>
14 years ago[whitespace] CA-48539-fix_whitespace_in_xapi_ha_ml
Xen hg user [Wed, 26 Jan 2011 17:39:04 +0000 (17:39 +0000)]
[whitespace] CA-48539-fix_whitespace_in_xapi_ha_ml

Fixed whitespace usage in file in preparation for resolving actual issue in CA-48539, XAPI will need to call vdi_deactivate during pool-ha-disable.

Signed-off-by: Mike McClurg <mike.mcclurg@citrix.com>
14 years agoCA-46342: add ethtool GRO and LRO support to PIF other-config
Simon Rowe [Wed, 26 Jan 2011 17:39:04 +0000 (17:39 +0000)]
CA-46342: add ethtool GRO and LRO support to PIF other-config

Signed-off-by: Simon Rowe <simon.rowe@eu.citrix.com>
14 years agoCA-41553: Fix logic bugs in vm_install_real and do some code cleanup
Zheng Li [Wed, 26 Jan 2011 17:39:04 +0000 (17:39 +0000)]
CA-41553: Fix logic bugs in vm_install_real and do some code cleanup

There were two logic bugs in vm_install_real

* When user create a VM based on a snapshot (which is also considered as a template from XenServer point of view), and neither sr-name-lable or sr-uuid is specified (neither is wanted any way), the code will fail if the pool doesn't have default SR set (which is not necessary as well).  This is the problem spot in CA-41553.

* When both sr-uuid and sr-name-lable are specified in command line at the same time

  - If there is some contradiction, say the SR with sr-uuid doesn't have the name as specified in sr-name-label, XenServer will only take sr-name-label into consideration and ignore sr-uuid without a warning
  - If sr-name-label corresponding to several SRs in the system, instead of using the sr-uuid information to restrict the candidate to one, XenServer will simply fail and complain "Multiple SRs with that name-label found".

Signed-off-by: Zheng Li <zheng.li@eu.citrix.com>
14 years agoCR-151: relax the version requirements on XenServer tools inside Linux VM
Zheng Li [Wed, 26 Jan 2011 17:39:04 +0000 (17:39 +0000)]
CR-151: relax the version requirements on XenServer tools inside Linux VM

Now when checking the compatability of the XenServer tools inside a Linux VM, we'll only take the major number and minor number into account.

Signed-off-by: Zheng Li <zheng.li@eu.citrix.com>
14 years agoCA-40610: Fix lvhdrt/tc8713 vm cleanup path.
Daniel Stodden [Wed, 26 Jan 2011 17:39:04 +0000 (17:39 +0000)]
CA-40610: Fix lvhdrt/tc8713 vm cleanup path.

Signed-off-by: Daniel Stodden <daniel.stodden@citrix.com>
14 years agoCA-41976: Field type error --- create_template field problem. FIXED.
Rok Strnisa [Wed, 26 Jan 2011 17:39:04 +0000 (17:39 +0000)]
CA-41976: Field type error --- create_template field problem. FIXED.

Signed-off-by: Rok Strnisa <rok.strnisa@citrix.com>
14 years agoDeleted parse_commandline and renamed parse_commandline_2 to parse_commandline.
Mike McClurg [Wed, 26 Jan 2011 17:39:04 +0000 (17:39 +0000)]
Deleted parse_commandline and renamed parse_commandline_2 to parse_commandline.

parse_commandline was only used for compat-mode, which we just removed.

Signed-off-by: Mike McClurg <mike.mcclurg@citrix.com>
14 years agoCA-26252: Removed all traces of compat-mode. FIXED.
Mike McClurg [Wed, 26 Jan 2011 17:39:04 +0000 (17:39 +0000)]
CA-26252: Removed all traces of compat-mode. FIXED.

Signed-off-by: Mike McClurg <mike.mcclurg@citrix.com>
14 years agoCA-46656: A ha-restart-priority of any valid value means ha-always-run should be...
Thomas Sanders [Wed, 26 Jan 2011 17:39:04 +0000 (17:39 +0000)]
CA-46656: A ha-restart-priority of any valid value means ha-always-run should be set to true when the VM starts.

Signed-off-by: Thomas Sanders <thomas.sanders@citrix.com>
Acked-by: Jonathan Knowles <jonathan.knowles@eu.citrix.com>
14 years agoCA-34457 tab-completion for xe subject-role-add role-name=
Thomas Sanders [Wed, 26 Jan 2011 17:39:04 +0000 (17:39 +0000)]
CA-34457 tab-completion for xe subject-role-add role-name=

The bash-completion file now has a section for role-name.

Signed-off-by: Thomas Sanders <thomas.sanders@citrix.com>
14 years agoCA-32077: the minimal inventory needs a BUILD_NUMBER otherwise xapi will fail to...
David Scott [Wed, 26 Jan 2011 17:39:04 +0000 (17:39 +0000)]
CA-32077: the minimal inventory needs a BUILD_NUMBER otherwise xapi will fail to start.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
14 years agoCA-32077 Gracefully handle missing /etc/xensource-inventory file
Thomas Sanders [Wed, 26 Jan 2011 17:39:04 +0000 (17:39 +0000)]
CA-32077 Gracefully handle missing /etc/xensource-inventory file

xapi was failing nastily on start-up if the xensource-inventory file was
missing.  Now it generates a minimal one if none exists. This does not include
a build number, so version.ml now falls back to using a build number from the
Make environment if one is not available from the inventory, i.e. it falls
back to the behaviour from before Matthias's commit for CA-43574 (build number
from xensource-inventory).

Signed-off-by: Thomas Sanders <thomas.sanders@citrix.com>
14 years agoCall /opt/xensource/sm/mpathcount.py after xapi started if root disk is multipathed
Alex Zeffertt [Wed, 26 Jan 2011 17:39:04 +0000 (17:39 +0000)]
Call /opt/xensource/sm/mpathcount.py after xapi started if root disk is multipathed

mpathcount.py now updates the host object when the root disk is multipathed as well
as updating pbd objects.  (It writes values into other-config to show XenCenter
how many paths are active and how many are failed.)

Normally it is multipathd  that calls mpathcount.py, but in the case of the root
disk the /dev/mapper node is created by the initrd before multipathd is started.

Signed-off-by: Alex Zeffertt <alex.zeffertt@eu.citrix.com>
14 years agoCP-1791: Remove 36 redundant RHEL/OEL/CentOS 5.x templates
Alex Zeffertt [Wed, 26 Jan 2011 17:39:04 +0000 (17:39 +0000)]
CP-1791: Remove 36 redundant RHEL/OEL/CentOS 5.x templates

Signed-off-by: Alex Zeffertt <alex.zeffertt@eu.citrix.com>
14 years agoCP-1981: Hook in the reset-vdis script to HA
Jon Ludlam [Wed, 26 Jan 2011 17:39:04 +0000 (17:39 +0000)]
CP-1981: Hook in the reset-vdis script to HA

The 'locks' for the VDIs, which are maintained by the SM backends now, are stored in xapi's database. In the event of a master failover, the pool database may rev
ert to a previous backup, which is then resynced with reality. Unfortunately there's no logic to resync the SM backends' data, nor any hook point to do this. Idea
lly, the SM backends would store their critical data internally somehow, but until this happens xapi will have to contain the important logic to resynchronise the
se locks.

This patch adds a host-post-declare-dead script that causes the reset of the locks of VDIs that were present on a host that has been declared dead.

Signed-off-by: Jon Ludlam <jonathan.ludlam@eu.citrix.com>
14 years agoCP-1981: Resynchronise the locks in the sm_config maps of VDIs in dbsync_slave
Jon Ludlam [Wed, 26 Jan 2011 17:39:04 +0000 (17:39 +0000)]
CP-1981: Resynchronise the locks in the sm_config maps of VDIs in dbsync_slave

The 'locks' for the VDIs, which are maintained by the SM backends now, are stored in xapi's database. In the event of a master failover, the pool database may revert to a previous backup, which is then resynced with reality. Unfortunately there's no logic to resync the SM backends' data, nor any hook point to do this. Ideally, the SM backends would store their critical data internally somehow, but until this happens xapi will have to contain the important logic to resynchronise these locks.

This patch implements the logic to resynchronise the sm_config keys based on the information stored in the local database

Signed-off-by: Jon Ludlam <jonathan.ludlam@eu.citrix.com>
14 years agoCP-1981: Track the vdi_activations in the local database
Jon Ludlam [Wed, 26 Jan 2011 17:39:04 +0000 (17:39 +0000)]
CP-1981: Track the vdi_activations in the local database

The 'locks' for the VDIs, which are maintained by the SM backends now, are stored in xapi's database. In the event of a master failover, the pool database may revert to a previous backup, which is then resynced with reality. Unfortunately there's no logic to resync the SM backends' data, nor any hook point to do this. Ideally, the SM backends would store their critical data internally somehow, but until this happens xapi will have to contain the important logic to resynchronise these locks.

This patch maintains a list of the VDIs that have been activatedi (including RW/RO mode) in the local database.

Signed-off-by: Jon Ludlam <jonathan.ludlam@eu.citrix.com>
14 years agoRemove some unnecessary debug statements left in by accident and fix an annoying...
David Scott [Wed, 26 Jan 2011 17:39:04 +0000 (17:39 +0000)]
Remove some unnecessary debug statements left in by accident and fix an annoying spelling mistake in a log message.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
14 years ago[CA-46591] Prevents build_pre from overwriting xen_maxmem.
Jonathan Knowles [Wed, 26 Jan 2011 17:39:04 +0000 (17:39 +0000)]
[CA-46591] Prevents build_pre from overwriting xen_maxmem.

Signed-off-by: Jonathan Knowles <jonathan.knowles@eu.citrix.com>
Previously, during a VM.resume, both of the following functions would overwrite xen_maxmem:

  1. transfer_reservation_to_domain:
     xen_maxmex := reservation
  2. build_pre:
     xen_maxmem := static_max

However, only the first assignment was correct.

All domain creation operations trigger the transfer_reservation_to_domain function. Therefore it is safe to remove the second, faulty assignment.

14 years ago[whitespace] Conservatively adjusts the whitespace for a commonly-edited list --...
Xen hg user [Wed, 26 Jan 2011 17:39:04 +0000 (17:39 +0000)]
[whitespace] Conservatively adjusts the whitespace for a commonly-edited list -- reducing the chance that future patches will conflict.

Signed-off-by: Jonathan Knowles <jonathan.knowles@eu.citrix.com>
Proof that this patch introduces no semantic changes:

camlp4o -printer o -no_comments $file:

ocaml/idl/datamodel.ml
    70610bebd0a11ed8787fbbbefeaa20a6 -
    70610bebd0a11ed8787fbbbefeaa20a6 - PASS

14 years ago[whitespace] Conservatively corrects the whitespace for a small number of functions...
Xen hg user [Wed, 26 Jan 2011 17:39:04 +0000 (17:39 +0000)]
[whitespace] Conservatively corrects the whitespace for a small number of functions that invoke VM start, in preparation for further patches that will add parameters to VM start.

Signed-off-by: Jonathan Knowles <jonathan.knowles@eu.citrix.com>
Proof that this patch introduces no semantic changes:

camlp4o -printer o -no_comments $file:

ocaml/guest_installer/operations.ml
    398ff818ee6c030d38bc6b76fa7385a5 -
    398ff818ee6c030d38bc6b76fa7385a5 - PASS
ocaml/lvhdrt/tc_8682.ml
    7ed322d06bce9560709e6dbff008b92b -
    7ed322d06bce9560709e6dbff008b92b - PASS
ocaml/multipathrt/iscsi_utils.ml
    a13f2e09112de6bbc4573eb99d97a14e -
    a13f2e09112de6bbc4573eb99d97a14e - PASS
ocaml/perftest/createpool.ml
    c5d540752831a6f4ea90ebab927aebe0 -
    c5d540752831a6f4ea90ebab927aebe0 - PASS
ocaml/perftest/createVM.ml
    9c61c2e5a870bbb23fa4963e16d213f1 -
    9c61c2e5a870bbb23fa4963e16d213f1 - PASS
ocaml/perftest/tests.ml
    3f42d787e9d5453af839f073a203cdf2 -
    3f42d787e9d5453af839f073a203cdf2 - PASS
ocaml/toplevel/testscript.ml
    f5726b371208812719d271db11b175b5 -
    f5726b371208812719d271db11b175b5 - PASS
ocaml/toplevel/vm_start.ml
    0b438921a4e7d383f8227d39916d0a74 -
    0b438921a4e7d383f8227d39916d0a74 - PASS
ocaml/xapi/message_forwarding.ml
    0c15667c3ce05fd5a7b6b9c62c2b30cc -
    0c15667c3ce05fd5a7b6b9c62c2b30cc - PASS
ocaml/xapimon/xapimon.ml
    4ae10b335aac69bd38f2868c68e4daf6 -
    4ae10b335aac69bd38f2868c68e4daf6 - PASS
ocaml/xapi/quicktest_lifecycle.ml
    4cb982e5ef773a0b9e532cf63d113ea4 -
    4cb982e5ef773a0b9e532cf63d113ea4 - PASS
ocaml/xapi/quicktest.ml
    4ae53162b079db97eaafb4b5aeeaaae9 -
    4ae53162b079db97eaafb4b5aeeaaae9 - PASS
ocaml/xapi/xapi_ha_vm_failover.ml
    230ee174e12e54801b332ca06ed7b055 -
    230ee174e12e54801b332ca06ed7b055 - PASS
ocaml/xapi/xapi_vm.ml
    83642a93962b2ae7da82b0aad1389ec7 -
    83642a93962b2ae7da82b0aad1389ec7 - PASS

14 years ago[whitespace] Repairing whitespace within the Features module.
Xen hg user [Wed, 26 Jan 2011 17:39:04 +0000 (17:39 +0000)]
[whitespace] Repairing whitespace within the Features module.

Signed-off-by: Jonathan Knowles <jonathan.knowles@eu.citrix.com>
Proof that this patch introduces no semantic changes:

camlp4o -printer o -no_comments $file:

ocaml/license/features.ml
    26a618732a366e603aa87b3788f0e84e -
    26a618732a366e603aa87b3788f0e84e - PASS
ocaml/license/features.mli
    f778551b861102e29dbdbefe8c90329b -
    f778551b861102e29dbdbefe8c90329b - PASS

14 years ago[whitespace] Conservatively corrects whitespace in function "db_gc.single_pass".
Xen hg user [Wed, 26 Jan 2011 17:39:04 +0000 (17:39 +0000)]
[whitespace] Conservatively corrects whitespace in function "db_gc.single_pass".

Signed-off-by: Jonathan Knowles <jonathan.knowles@eu.citrix.com>
Proof that this patch introduces no semantic changes:

camlp4o -printer o -no_comments $file:

ocaml/xapi/db_gc.ml
    4be64da41163f1e65878ec53b9668b12 -
    4be64da41163f1e65878ec53b9668b12 - PASS

14 years ago[whitespace] Targeted whitespace tidying within datamodel.ml for the benefit of subse...
Xen hg user [Wed, 26 Jan 2011 17:39:04 +0000 (17:39 +0000)]
[whitespace] Targeted whitespace tidying within datamodel.ml for the benefit of subsequent patches.

Signed-off-by: Jonathan Knowles <jonathan.knowles@eu.citrix.com>
Proof that this patch introduces no semantic changes:

camlp4o -printer o -no_comments $file:

ocaml/idl/datamodel.ml
    70610bebd0a11ed8787fbbbefeaa20a6 -
    70610bebd0a11ed8787fbbbefeaa20a6 - PASS

14 years ago[whitespace] Conservatively repairing indentation with Xapi_vm_helpers.
Xen hg user [Wed, 26 Jan 2011 17:39:04 +0000 (17:39 +0000)]
[whitespace] Conservatively repairing indentation with Xapi_vm_helpers.

Signed-off-by: Jonathan Knowles <jonathan.knowles@eu.citrix.com>
Proof that this patch introduces no semantic changes:

camlp4o -printer o -no_comments $file:

ocaml/xapi/xapi_vm_helpers.ml
    ac91cef61e20e5dd5f426d60a6e2e3db -
    ac91cef61e20e5dd5f426d60a6e2e3db - PASS

14 years agoCA-10471: Map attached file VDIs to raw physical, not loopback nodes.
Daniel Stodden [Wed, 26 Jan 2011 17:39:04 +0000 (17:39 +0000)]
CA-10471: Map attached file VDIs to raw physical, not loopback nodes.

Thereby obsoleting the loopback code.

Signed-off-by: Daniel Stodden <daniel.stodden@citrix.com>
14 years agoCA-50172: Correct the spelling of a VM.import error message
Jonathan Davies [Wed, 26 Jan 2011 17:39:04 +0000 (17:39 +0000)]
CA-50172: Correct the spelling of a VM.import error message

Signed-off-by: Jonathan Davies <jonathan.davies@citrix.com>
14 years agoRemoved a small subset of compiler warnings.
Rok Strnisa [Wed, 26 Jan 2011 17:39:04 +0000 (17:39 +0000)]
Removed a small subset of compiler warnings.

Signed-off-by: Rok Strnisa <rok.strnisa@citrix.com>
14 years ago[CA-47369] Enables shadow memory by default for PV domains, with a hard-wired multipl...
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.

14 years agoSCTX-525: Use fewer RPCs in the VLAN resynchronisation code
David Scott [Wed, 26 Jan 2011 17:39:04 +0000 (17:39 +0000)]
SCTX-525: Use fewer RPCs in the VLAN resynchronisation code

Pool:
* 5 hosts
* 300 VLANs (none in use)
A full xapi restart is reduced from 100s to 82s.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
14 years agoSCTX-525: Reduce number of round-trips in the "PIF resynchronisation" logic
David Scott [Wed, 26 Jan 2011 17:39:04 +0000 (17:39 +0000)]
SCTX-525: Reduce number of round-trips in the "PIF resynchronisation" logic

Pool:
* 5 hosts
* 300 VLANs (none in use)
xapi start time decreased from 129s to 100s.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
14 years agoSCTX-525: only write the names of interfaces ("current interfaces") into the inventor...
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>
14 years agoReplace Xal.wait_release with Xs.monitor_paths, since the former ignores suspended...
David Scott [Wed, 26 Jan 2011 17:39:04 +0000 (17:39 +0000)]
Replace Xal.wait_release with Xs.monitor_paths, since the former ignores suspended domains (part of the checkpoint implementation)

This removes a constant 5s delay from the migrate downtime.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
14 years agoCA-48449: remove spurious VM_UNCOOPERATIVE alerts
David Scott [Wed, 26 Jan 2011 17:39:04 +0000 (17:39 +0000)]
CA-48449: remove spurious VM_UNCOOPERATIVE alerts

1. there are too many false-positive alerts; and
2. there is no obvious action to resolve the problem

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
14 years agoFix the xapi client library
Jon Ludlam [Wed, 26 Jan 2011 17:39:04 +0000 (17:39 +0000)]
Fix the xapi client library

Signed-off-by: Jon Ludlam <jonathan.ludlam@eu.citrix.com>
14 years agoIgnore ocamlspot-generated files
David Scott [Wed, 26 Jan 2011 17:39:04 +0000 (17:39 +0000)]
Ignore ocamlspot-generated files