xen/xen-domUloader.diff

118 lines
4.8 KiB
Diff
Raw Normal View History

Index: xen-4.1.0-testing/tools/python/xen/xend/server/DevController.py
===================================================================
--- xen-4.1.0-testing.orig/tools/python/xen/xend/server/DevController.py
+++ xen-4.1.0-testing/tools/python/xen/xend/server/DevController.py
- bnc#564406 - Make the new PV drivers work with older hosts that do not understand the new PV driver protocol. - Upstream Xen version renamed to 4.0.0 in changeset 20624 & 20625. - fate#307594: HP-MCBS: XEN: support NR_CPUS=256 This is a spec file change (xen.spec) - bnc#555152 - "NAME" column in xentop (SLES11) output limited to 10 characters unlike SLES10 The update to c/s 20572 includes this fix (at c/s 20567). - Modify xen-paths.diff - Merge xend-tap-fix.patch to xen-domUloader.diff remove part of it which accepted by upstream - Load gntdev module in xend init script similar to blkbk, netbk, etc. - Backport dmmd from sles11/xen block-dmmd xen-qemu-iscsi-fix.patch xen.spec - Fix regression when create_vbd for tap xend-tap-fix.patch - Temporarily disable libxl because of libconfig dependency. - fate#302864 domUloader support lvm in disk domUloader.py Note: for test in Beta1, if not good, remove it - fate#302864 domUloader support fs on whole disk domUloader.py - Turn KMPs back on now that kernel side fix is checked in. - fate#304415 VMM: ability to switch networking mode Add vif-route-ifup to handle routed configurations using sysconfig scripts. vif-route-ifup.patch - fate#307540 USB for Xen VMs usb-add.patch - fate#305545 XEN extra descriptive field within xenstore add_des.patch - Update to Xen version 3.5.0 for the following features. fate#304226 XEN: FlexMigration feature of VT-x2 support fate#305004 Add SR-IOV PF and VF drivers to Vt-d enabled Xen fate#306830 T states in Xen controlling by MSR fate#306832 Fix for xen panic on new processors fate#306833 Westmere and Nehalem-EX: Add support for Pause Loop exiting feature for Xen fate#306835 Xen: server virtual power management enhacement fate#306837 VT-d2 - PCI SIG ATS support fate#306872 Xen: Node manager support P/T-states change when Vt-d enable fate#306873 Xen: SMP guest live migration may fail with hap=1 on NHM fate#306875 Westmere: LT-SX (Xen) fate#306891 RAS features for Xen: Add support for Machine Check and CPU/Memory online/offline features fate#307322 1GB page support in Xen fate#307324 Xen IOMMU support OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=26
2010-01-16 01:12:54 +01:00
@@ -592,6 +592,31 @@ class DevController:
return (Missing, None)
+ def waitForFrontend(self, devid):
+ def frontendStatusCallback(statusPath, ev, result):
+ status = xstransact.Read(statusPath)
+ log.debug("frontendStatusCallback %s = %s" % (statusPath, status))
+ try:
+ status = int(status)
+ if status == xenbusState['Connected']:
+ result['status'] = Connected
+ elif status == xenbusState['Closed']:
+ result['status'] = Error
+ else:
+ raise
+ except:
+ return 1
+ ev.set()
+ return 0
+ frontpath = self.frontendPath(devid)
+ statusPath = frontpath + '/state'
+ ev = Event()
+ result = { 'status': Timeout }
+ xswatch(statusPath, frontendStatusCallback, ev, result)
+ ev.wait(5)
+ return result['status']
+
+
def backendPath(self, backdom, devid):
"""Construct backend path given the backend domain and device id.
Index: xen-4.1.0-testing/tools/python/xen/xend/XendBootloader.py
===================================================================
--- xen-4.1.0-testing.orig/tools/python/xen/xend/XendBootloader.py
+++ xen-4.1.0-testing/tools/python/xen/xend/XendBootloader.py
@@ -12,7 +12,7 @@
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
-import os, select, errno, stat, signal, tty
+import os, select, errno, stat, signal, tty, time
import random
import shlex
from xen.xend import sxp
- bnc#564406 - Make the new PV drivers work with older hosts that do not understand the new PV driver protocol. - Upstream Xen version renamed to 4.0.0 in changeset 20624 & 20625. - fate#307594: HP-MCBS: XEN: support NR_CPUS=256 This is a spec file change (xen.spec) - bnc#555152 - "NAME" column in xentop (SLES11) output limited to 10 characters unlike SLES10 The update to c/s 20572 includes this fix (at c/s 20567). - Modify xen-paths.diff - Merge xend-tap-fix.patch to xen-domUloader.diff remove part of it which accepted by upstream - Load gntdev module in xend init script similar to blkbk, netbk, etc. - Backport dmmd from sles11/xen block-dmmd xen-qemu-iscsi-fix.patch xen.spec - Fix regression when create_vbd for tap xend-tap-fix.patch - Temporarily disable libxl because of libconfig dependency. - fate#302864 domUloader support lvm in disk domUloader.py Note: for test in Beta1, if not good, remove it - fate#302864 domUloader support fs on whole disk domUloader.py - Turn KMPs back on now that kernel side fix is checked in. - fate#304415 VMM: ability to switch networking mode Add vif-route-ifup to handle routed configurations using sysconfig scripts. vif-route-ifup.patch - fate#307540 USB for Xen VMs usb-add.patch - fate#305545 XEN extra descriptive field within xenstore add_des.patch - Update to Xen version 3.5.0 for the following features. fate#304226 XEN: FlexMigration feature of VT-x2 support fate#305004 Add SR-IOV PF and VF drivers to Vt-d enabled Xen fate#306830 T states in Xen controlling by MSR fate#306832 Fix for xen panic on new processors fate#306833 Westmere and Nehalem-EX: Add support for Pause Loop exiting feature for Xen fate#306835 Xen: server virtual power management enhacement fate#306837 VT-d2 - PCI SIG ATS support fate#306872 Xen: Node manager support P/T-states change when Vt-d enable fate#306873 Xen: SMP guest live migration may fail with hap=1 on NHM fate#306875 Westmere: LT-SX (Xen) fate#306891 RAS features for Xen: Add support for Machine Check and CPU/Memory online/offline features fate#307322 1GB page support in Xen fate#307324 Xen IOMMU support OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=26
2010-01-16 01:12:54 +01:00
@@ -38,8 +38,25 @@ def bootloader(blexec, disk, dom, quiet
msg = "Bootloader isn't executable"
log.error(msg)
raise VmError(msg)
- if not os.access(disk, os.R_OK):
- msg = "Disk isn't accessible"
+
+ # domUloader requires '--entry=foo' in blargs, which is derived from
+ # 'bootargs' entry in domain configuration file. Ensure it exists
+ # here so a reasonable error message can be returned.
+ if blexec.find('domUloader.py') != -1:
+ if blargs.find('entry') == -1:
+ msg = "domUloader requires specification of bootargs"
+ log.error(msg)
+ raise VmError(msg)
+
+ avail = False
+ for i in xrange(1, 100):
+ avail = os.access(disk, os.R_OK)
+ if avail:
+ break
+ time.sleep(.1)
+
+ if not avail:
+ msg = "Disk '%s' isn't accessible" % disk
log.error(msg)
raise VmError(msg)
Index: xen-4.1.0-testing/tools/python/xen/xend/XendDomainInfo.py
===================================================================
--- xen-4.1.0-testing.orig/tools/python/xen/xend/XendDomainInfo.py
+++ xen-4.1.0-testing/tools/python/xen/xend/XendDomainInfo.py
@@ -2332,6 +2332,10 @@ class XendDomainInfo:
deviceClass, config = self.info['devices'].get(dev_uuid)
self._waitForDevice(deviceClass, config['devid'])
+ def _waitForDeviceFrontUUID(self, dev_uuid):
+ deviceClass, config = self.info['devices'].get(dev_uuid)
+ self.getDeviceController(deviceClass).waitForFrontend(config['devid'])
+
def _waitForDevice_destroy(self, deviceClass, devid, backpath):
return self.getDeviceController(deviceClass).waitForDevice_destroy(
devid, backpath)
@@ -3277,7 +3281,8 @@ class XendDomainInfo:
from xen.xend import XendDomain
dom0 = XendDomain.instance().privilegedDomain()
mounted_vbd_uuid = dom0.create_vbd(vbd, disk);
- dom0._waitForDeviceUUID(mounted_vbd_uuid)
+ vbd_uuid = dom0.create_vbd(vbd, disk)
+ dom0._waitForDeviceFrontUUID(vbd_uuid)
fn = BOOTLOADER_LOOPBACK_DEVICE
try:
@@ -3287,10 +3292,10 @@ class XendDomainInfo:
if mounted:
log.info("Unmounting %s from %s." %
(fn, BOOTLOADER_LOOPBACK_DEVICE))
- _, vbd_info = dom0.info['devices'][mounted_vbd_uuid]
- dom0.destroyDevice(dom0.getBlockDeviceClass(vbd_info['devid']),
- BOOTLOADER_LOOPBACK_DEVICE, force = True)
-
- bnc#564406 - Make the new PV drivers work with older hosts that do not understand the new PV driver protocol. - Upstream Xen version renamed to 4.0.0 in changeset 20624 & 20625. - fate#307594: HP-MCBS: XEN: support NR_CPUS=256 This is a spec file change (xen.spec) - bnc#555152 - "NAME" column in xentop (SLES11) output limited to 10 characters unlike SLES10 The update to c/s 20572 includes this fix (at c/s 20567). - Modify xen-paths.diff - Merge xend-tap-fix.patch to xen-domUloader.diff remove part of it which accepted by upstream - Load gntdev module in xend init script similar to blkbk, netbk, etc. - Backport dmmd from sles11/xen block-dmmd xen-qemu-iscsi-fix.patch xen.spec - Fix regression when create_vbd for tap xend-tap-fix.patch - Temporarily disable libxl because of libconfig dependency. - fate#302864 domUloader support lvm in disk domUloader.py Note: for test in Beta1, if not good, remove it - fate#302864 domUloader support fs on whole disk domUloader.py - Turn KMPs back on now that kernel side fix is checked in. - fate#304415 VMM: ability to switch networking mode Add vif-route-ifup to handle routed configurations using sysconfig scripts. vif-route-ifup.patch - fate#307540 USB for Xen VMs usb-add.patch - fate#305545 XEN extra descriptive field within xenstore add_des.patch - Update to Xen version 3.5.0 for the following features. fate#304226 XEN: FlexMigration feature of VT-x2 support fate#305004 Add SR-IOV PF and VF drivers to Vt-d enabled Xen fate#306830 T states in Xen controlling by MSR fate#306832 Fix for xen panic on new processors fate#306833 Westmere and Nehalem-EX: Add support for Pause Loop exiting feature for Xen fate#306835 Xen: server virtual power management enhacement fate#306837 VT-d2 - PCI SIG ATS support fate#306872 Xen: Node manager support P/T-states change when Vt-d enable fate#306873 Xen: SMP guest live migration may fail with hap=1 on NHM fate#306875 Westmere: LT-SX (Xen) fate#306891 RAS features for Xen: Add support for Machine Check and CPU/Memory online/offline features fate#307322 1GB page support in Xen fate#307324 Xen IOMMU support OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=26
2010-01-16 01:12:54 +01:00
+ if devtype in ['tap', 'tap2']:
+ dom0.destroyDevice('tap', BOOTLOADER_LOOPBACK_DEVICE, rm_cfg = True)
+ else:
- bnc#564406 - Make the new PV drivers work with older hosts that do not understand the new PV driver protocol. - Upstream Xen version renamed to 4.0.0 in changeset 20624 & 20625. - fate#307594: HP-MCBS: XEN: support NR_CPUS=256 This is a spec file change (xen.spec) - bnc#555152 - "NAME" column in xentop (SLES11) output limited to 10 characters unlike SLES10 The update to c/s 20572 includes this fix (at c/s 20567). - Modify xen-paths.diff - Merge xend-tap-fix.patch to xen-domUloader.diff remove part of it which accepted by upstream - Load gntdev module in xend init script similar to blkbk, netbk, etc. - Backport dmmd from sles11/xen block-dmmd xen-qemu-iscsi-fix.patch xen.spec - Fix regression when create_vbd for tap xend-tap-fix.patch - Temporarily disable libxl because of libconfig dependency. - fate#302864 domUloader support lvm in disk domUloader.py Note: for test in Beta1, if not good, remove it - fate#302864 domUloader support fs on whole disk domUloader.py - Turn KMPs back on now that kernel side fix is checked in. - fate#304415 VMM: ability to switch networking mode Add vif-route-ifup to handle routed configurations using sysconfig scripts. vif-route-ifup.patch - fate#307540 USB for Xen VMs usb-add.patch - fate#305545 XEN extra descriptive field within xenstore add_des.patch - Update to Xen version 3.5.0 for the following features. fate#304226 XEN: FlexMigration feature of VT-x2 support fate#305004 Add SR-IOV PF and VF drivers to Vt-d enabled Xen fate#306830 T states in Xen controlling by MSR fate#306832 Fix for xen panic on new processors fate#306833 Westmere and Nehalem-EX: Add support for Pause Loop exiting feature for Xen fate#306835 Xen: server virtual power management enhacement fate#306837 VT-d2 - PCI SIG ATS support fate#306872 Xen: Node manager support P/T-states change when Vt-d enable fate#306873 Xen: SMP guest live migration may fail with hap=1 on NHM fate#306875 Westmere: LT-SX (Xen) fate#306891 RAS features for Xen: Add support for Machine Check and CPU/Memory online/offline features fate#307322 1GB page support in Xen fate#307324 Xen IOMMU support OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=26
2010-01-16 01:12:54 +01:00
+ dom0.destroyDevice('vbd', BOOTLOADER_LOOPBACK_DEVICE, rm_cfg = True)
if blcfg is None:
msg = "Had a bootloader specified, but can't find disk"
log.error(msg)