summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorBob Ball <bob.ball@citrix.com>2013-03-22 10:23:22 +0000
committerGerrit Code Review <review@openstack.org>2013-05-07 14:39:59 +0000
commite507094eef9a7b4a54a04faade8aa95a36fa6d93 (patch)
treecbe4b482c4885b7154960e654b999e1c66e0ae71 /plugins
parentd9be77ddd487c71729387a2b31f470be56738bd8 (diff)
downloadnova-e507094eef9a7b4a54a04faade8aa95a36fa6d93.tar.gz
nova-e507094eef9a7b4a54a04faade8aa95a36fa6d93.tar.xz
nova-e507094eef9a7b4a54a04faade8aa95a36fa6d93.zip
Enable live block migration when using iSCSI volumes
Fix for bug 1160323. DocImpact Depends on a version of XAPI supporting relax-xsm-sr-check. Currently no release versions support this, so the change at https://github.com/xen-org/xen-api/pull/1116 would need to be applied to the source to enable this. XenServer 6.2 is expected to support this mode, and possibly some future hotfixes for XenServer 6.1. It also depends on a configuration change which must be documented and added to devstack: * Set "relax-xsm-sr-check = true" in /etc/xapi.conf This commit makes the following changes: * Attach the SR on the destination host prior to migrate * Returns the SR-ref from the pre_migrate call (API change) * Populates the XS VDI map with the sr-ref on the destination host * Removes the connection to the SR from the source host post-migrate * Added plugin to determine if iSCSI block migration is enabled Associated tempest test at https://review.openstack.org/#/c/26478/ Change-Id: I917d9cf094190d636f4b9e14f6c8e728ff85af0e Fixes: bug 1160323
Diffstat (limited to 'plugins')
-rw-r--r--plugins/xenserver/xenapi/contrib/rpmbuild/SPECS/openstack-xen-plugins.spec1
-rwxr-xr-xplugins/xenserver/xenapi/etc/xapi.d/plugins/config_file19
2 files changed, 20 insertions, 0 deletions
diff --git a/plugins/xenserver/xenapi/contrib/rpmbuild/SPECS/openstack-xen-plugins.spec b/plugins/xenserver/xenapi/contrib/rpmbuild/SPECS/openstack-xen-plugins.spec
index 66c13967e..b93c7b071 100644
--- a/plugins/xenserver/xenapi/contrib/rpmbuild/SPECS/openstack-xen-plugins.spec
+++ b/plugins/xenserver/xenapi/contrib/rpmbuild/SPECS/openstack-xen-plugins.spec
@@ -31,6 +31,7 @@ rm -rf $RPM_BUILD_ROOT
/etc/xapi.d/plugins/agent
/etc/xapi.d/plugins/bandwidth
/etc/xapi.d/plugins/bittorrent
+/etc/xapi.d/plugins/config_file
/etc/xapi.d/plugins/glance
/etc/xapi.d/plugins/kernel
/etc/xapi.d/plugins/migration
diff --git a/plugins/xenserver/xenapi/etc/xapi.d/plugins/config_file b/plugins/xenserver/xenapi/etc/xapi.d/plugins/config_file
new file mode 100755
index 000000000..417c477b4
--- /dev/null
+++ b/plugins/xenserver/xenapi/etc/xapi.d/plugins/config_file
@@ -0,0 +1,19 @@
+#!/usr/bin/env python
+
+import XenAPIPlugin
+
+
+def get_val(session, args):
+ config_key = args['key']
+ config_file = open('/etc/xapi.conf')
+ try:
+ for line in config_file:
+ split = line.split('=')
+ if (len(split) == 2) and (split[0].strip() == config_key):
+ return split[1].strip()
+ return ""
+ finally:
+ config_file.close()
+
+if __name__ == '__main__':
+ XenAPIPlugin.dispatch({"get_val": get_val})