rpms/xen/devel xen-xs-transactions.patch, 1.1, 1.1.2.1 xen.spec, 1.194.2.2, 1.194.2.3
Daniel P. Berrange (berrange)
fedora-extras-commits at redhat.com
Mon Oct 29 18:31:55 UTC 2007
- Previous message (by thread): rpms/compiz-manager/F-8 compiz-manager-0.6.0.diff, NONE, 1.1 compiz-manager.license, NONE, 1.1 compiz-manager.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
- Next message (by thread): rpms/PackageKit/devel PackageKit.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: berrange
Update of /cvs/pkgs/rpms/xen/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv21063
Modified Files:
Tag: private-berrange-xen-unstable
xen-xs-transactions.patch xen.spec
Log Message:
Re-diff & enable XS transactions patch
xen-xs-transactions.patch:
Index: xen-xs-transactions.patch
===================================================================
RCS file: /cvs/pkgs/rpms/xen/devel/xen-xs-transactions.patch,v
retrieving revision 1.1
retrieving revision 1.1.2.1
diff -u -r1.1 -r1.1.2.1
--- xen-xs-transactions.patch 1 May 2007 02:27:22 -0000 1.1
+++ xen-xs-transactions.patch 29 Oct 2007 18:31:52 -0000 1.1.2.1
@@ -1,15 +1,216 @@
-diff -r 8ca89a9e54a7 tools/python/xen/xend/XendConfig.py
---- a/tools/python/xen/xend/XendConfig.py Wed Apr 25 09:44:20 2007 +0100
-+++ b/tools/python/xen/xend/XendConfig.py Wed Apr 25 12:52:29 2007 -0400
-@@ -26,6 +26,7 @@ from xen.xend.XendDevices import XendDev
+diff -rup xen-unstable.hg-16125.orig/tools/python/xen/xend/server/blkif.py xen-unstable.hg-16125.new/tools/python/xen/xend/server/blkif.py
+--- xen-unstable.hg-16125.orig/tools/python/xen/xend/server/blkif.py 2007-10-19 09:51:32.000000000 -0400
++++ xen-unstable.hg-16125.new/tools/python/xen/xend/server/blkif.py 2007-10-29 14:21:03.000000000 -0400
+@@ -124,19 +124,26 @@ class BlkifController(DevController):
+ (self.deviceClass, devid, config))
+
+
+- def getDeviceConfiguration(self, devid):
++ def getDeviceConfiguration(self, devid, transaction = None):
+ """Returns the configuration of a device.
+
+ @note: Similar to L{configuration} except it returns a dict.
+ @return: dict
+ """
+- config = DevController.getDeviceConfiguration(self, devid)
+- devinfo = self.readBackend(devid, 'dev', 'type', 'params', 'mode',
+- 'uuid')
++ config = DevController.getDeviceConfiguration(self, devid, transaction)
++ if transaction is None:
++ devinfo = self.readBackend(devid, 'dev', 'type', 'params', 'mode',
++ 'uuid')
++ else:
++ devinfo = self.readBackendTxn(transaction, devid,
++ 'dev', 'type', 'params', 'mode', 'uuid')
+ dev, typ, params, mode, uuid = devinfo
+
+ if dev:
+- dev_type = self.readFrontend(devid, 'device-type')
++ if transaction is None:
++ dev_type = self.readFrontend(devid, 'device-type')
++ else:
++ dev_type = self.readFrontendTxn(transaction, devid, 'device-type')
+ if dev_type:
+ dev += ':' + dev_type
+ config['dev'] = dev
+diff -rup xen-unstable.hg-16125.orig/tools/python/xen/xend/server/ConsoleController.py xen-unstable.hg-16125.new/tools/python/xen/xend/server/ConsoleController.py
+--- xen-unstable.hg-16125.orig/tools/python/xen/xend/server/ConsoleController.py 2007-10-19 09:51:32.000000000 -0400
++++ xen-unstable.hg-16125.new/tools/python/xen/xend/server/ConsoleController.py 2007-10-29 14:21:03.000000000 -0400
+@@ -19,9 +19,12 @@ class ConsoleController(DevController):
+ return (self.allocateDeviceID(), back, {})
+
+
+- def getDeviceConfiguration(self, devid):
+- result = DevController.getDeviceConfiguration(self, devid)
+- devinfo = self.readBackend(devid, *self.valid_cfg)
++ def getDeviceConfiguration(self, devid, transaction = None):
++ result = DevController.getDeviceConfiguration(self, devid, transaction)
++ if transaction is None:
++ devinfo = self.readBackend(devid, *self.valid_cfg)
++ else:
++ devinfo = self.readBackendTxn(transaction, devid, *self.valid_cfg)
+ config = dict(zip(self.valid_cfg, devinfo))
+ config = dict([(key, val) for key, val in config.items()
+ if val != None])
+diff -rup xen-unstable.hg-16125.orig/tools/python/xen/xend/server/DevController.py xen-unstable.hg-16125.new/tools/python/xen/xend/server/DevController.py
+--- xen-unstable.hg-16125.orig/tools/python/xen/xend/server/DevController.py 2007-10-19 09:51:32.000000000 -0400
++++ xen-unstable.hg-16125.new/tools/python/xen/xend/server/DevController.py 2007-10-29 14:21:03.000000000 -0400
+@@ -239,15 +239,15 @@ class DevController:
+
+ self.vm._removeVm("device/%s/%d" % (self.deviceClass, dev))
+
+- def configurations(self):
+- return map(self.configuration, self.deviceIDs())
++ def configurations(self, transaction = None):
++ return map(lambda x: self.configuration(x, transaction), self.deviceIDs(transaction))
+
+
+- def configuration(self, devid):
++ def configuration(self, devid, transaction = None):
+ """@return an s-expression giving the current configuration of the
+ specified device. This would be suitable for giving to {@link
+ #createDevice} in order to recreate that device."""
+- configDict = self.getDeviceConfiguration(devid)
++ configDict = self.getDeviceConfiguration(devid, transaction)
+ sxpr = [self.deviceClass]
+ for key, val in configDict.items():
+ if isinstance(val, (types.ListType, types.TupleType)):
+@@ -273,13 +273,16 @@ class DevController:
+ 'id', devid]]
+
+
+- def getDeviceConfiguration(self, devid):
++ def getDeviceConfiguration(self, devid, transaction = None):
+ """Returns the configuration of a device.
+
+ @note: Similar to L{configuration} except it returns a dict.
+ @return: dict
+ """
+- backdomid = xstransact.Read(self.frontendPath(devid), "backend-id")
++ if transaction is None:
++ backdomid = xstransact.Read(self.frontendPath(devid), "backend-id")
++ else:
++ backdomid = transaction.read(self.frontendPath(devid) + "/backend-id")
+ if backdomid is None:
+ raise VmError("Device %s not connected" % devid)
+
+@@ -416,14 +419,28 @@ class DevController:
+ else:
+ raise VmError("Device %s not connected" % devid)
+
++ def readBackendTxn(self, transaction, devid, *args):
++ frontpath = self.frontendPath(devid)
++ backpath = transaction.read(frontpath + "/backend")
++ if backpath:
++ paths = map(lambda x: backpath + "/" + x, args)
++ return transaction.read(*paths)
++ else:
++ raise VmError("Device %s not connected" % devid)
++
+ def readFrontend(self, devid, *args):
+ return xstransact.Read(self.frontendPath(devid), *args)
+
++ def readFrontendTxn(self, transaction, devid, *args):
++ paths = map(lambda x: self.frontendPath(devid) + "/" + x, args)
++ return transaction.read(*paths)
++
+ def deviceIDs(self, transaction = None):
+ """@return The IDs of each of the devices currently configured for
+ this instance's deviceClass.
+ """
+ fe = self.backendRoot()
++
+ if transaction:
+ return map(lambda x: int(x.split('/')[-1]), transaction.list(fe))
+ else:
+diff -rup xen-unstable.hg-16125.orig/tools/python/xen/xend/server/netif.py xen-unstable.hg-16125.new/tools/python/xen/xend/server/netif.py
+--- xen-unstable.hg-16125.orig/tools/python/xen/xend/server/netif.py 2007-10-19 09:51:32.000000000 -0400
++++ xen-unstable.hg-16125.new/tools/python/xen/xend/server/netif.py 2007-10-29 14:22:32.000000000 -0400
+@@ -183,17 +183,20 @@ class NetifController(DevController):
+ "network device")
+
+
+- def getDeviceConfiguration(self, devid):
++ def getDeviceConfiguration(self, devid, transaction = None):
+ """@see DevController.configuration"""
+
+- result = DevController.getDeviceConfiguration(self, devid)
++ result = DevController.getDeviceConfiguration(self, devid, transaction)
+
+ config_path = "device/%s/%d/" % (self.deviceClass, devid)
+ devinfo = ()
+ for x in ( 'script', 'ip', 'bridge', 'mac',
+ 'type', 'vifname', 'rate', 'uuid', 'model', 'accel',
+ 'security_label'):
+- y = self.vm._readVm(config_path + x)
++ if transaction is None:
++ y = self.vm._readVm(config_path + x)
++ else:
++ y = self.vm._readVmTxn(transaction, config_path + x)
+ devinfo += (y,)
+ (script, ip, bridge, mac, typ, vifname, rate, uuid,
+ model, accel, security_label) = devinfo
+diff -rup xen-unstable.hg-16125.orig/tools/python/xen/xend/server/pciif.py xen-unstable.hg-16125.new/tools/python/xen/xend/server/pciif.py
+--- xen-unstable.hg-16125.orig/tools/python/xen/xend/server/pciif.py 2007-10-19 09:51:32.000000000 -0400
++++ xen-unstable.hg-16125.new/tools/python/xen/xend/server/pciif.py 2007-10-29 14:21:03.000000000 -0400
+@@ -78,8 +78,8 @@ class PciController(DevController):
+ back['uuid'] = config.get('uuid','')
+ return (0, back, {})
+
+- def getDeviceConfiguration(self, devid):
+- result = DevController.getDeviceConfiguration(self, devid)
++ def getDeviceConfiguration(self, devid, transaction = None):
++ result = DevController.getDeviceConfiguration(self, devid, transaction)
+ num_devs = self.readBackend(devid, 'num_devs')
+ pci_devs = []
+
+diff -rup xen-unstable.hg-16125.orig/tools/python/xen/xend/server/tpmif.py xen-unstable.hg-16125.new/tools/python/xen/xend/server/tpmif.py
+--- xen-unstable.hg-16125.orig/tools/python/xen/xend/server/tpmif.py 2007-10-19 09:51:32.000000000 -0400
++++ xen-unstable.hg-16125.new/tools/python/xen/xend/server/tpmif.py 2007-10-29 14:21:03.000000000 -0400
+@@ -75,9 +75,9 @@ class TPMifController(DevController):
+
+ return (devid, back, front)
+
+- def getDeviceConfiguration(self, devid):
++ def getDeviceConfiguration(self, devid, transaction = None):
+ """Returns the configuration of a device"""
+- result = DevController.getDeviceConfiguration(self, devid)
++ result = DevController.getDeviceConfiguration(self, devid, transaction)
+
+ (instance, uuid, type) = \
+ self.readBackend(devid, 'instance',
+diff -rup xen-unstable.hg-16125.orig/tools/python/xen/xend/server/vfbif.py xen-unstable.hg-16125.new/tools/python/xen/xend/server/vfbif.py
+--- xen-unstable.hg-16125.orig/tools/python/xen/xend/server/vfbif.py 2007-10-29 14:05:20.000000000 -0400
++++ xen-unstable.hg-16125.new/tools/python/xen/xend/server/vfbif.py 2007-10-29 14:21:03.000000000 -0400
+@@ -27,10 +27,13 @@ class VfbifController(DevController):
+ return (devid, back, {})
+
+
+- def getDeviceConfiguration(self, devid):
+- result = DevController.getDeviceConfiguration(self, devid)
++ def getDeviceConfiguration(self, devid, transaction = None):
++ result = DevController.getDeviceConfiguration(self, devid, transaction)
+
+- devinfo = self.readBackend(devid, *CONFIG_ENTRIES)
++ if transaction is None:
++ devinfo = self.readBackend(devid, *CONFIG_ENTRIES)
++ else:
++ devinfo = self.readBackendTxn(transaction, devid, *CONFIG_ENTRIES)
+ return dict([(CONFIG_ENTRIES[i], devinfo[i])
+ for i in range(len(CONFIG_ENTRIES))
+ if devinfo[i] is not None])
+diff -rup xen-unstable.hg-16125.orig/tools/python/xen/xend/XendConfig.py xen-unstable.hg-16125.new/tools/python/xen/xend/XendConfig.py
+--- xen-unstable.hg-16125.orig/tools/python/xen/xend/XendConfig.py 2007-10-29 14:05:20.000000000 -0400
++++ xen-unstable.hg-16125.new/tools/python/xen/xend/XendConfig.py 2007-10-29 14:21:36.000000000 -0400
+@@ -28,6 +28,7 @@ from xen.xend.XendError import VmError
from xen.xend.XendDevices import XendDevices
from xen.xend.PrettyPrint import prettyprintstring
from xen.xend.XendConstants import DOM_STATE_HALTED
+from xen.xend.xenstore.xstransact import xstransact
-
- log = logging.getLogger("xend.XendConfig")
- log.setLevel(logging.WARN)
-@@ -884,36 +885,43 @@ class XendConfig(dict):
+ from xen.xend.server.BlktapController import blktap_disk_types
+ from xen.xend.server.netif import randomMAC
+ from xen.util.blkif import blkdev_name_to_number
+@@ -941,36 +942,43 @@ class XendConfig(dict):
# Marshall devices (running or from configuration)
if not ignore_devices:
@@ -81,37 +282,10 @@
return sxpr
-diff -r 8ca89a9e54a7 tools/python/xen/xend/XendDomain.py
---- a/tools/python/xen/xend/XendDomain.py Wed Apr 25 09:44:20 2007 +0100
-+++ b/tools/python/xen/xend/XendDomain.py Wed Apr 25 12:53:38 2007 -0400
-@@ -391,13 +391,22 @@ class XendDomain:
- @rtype: None
- """
-
-+ txn = xstransact()
-+ try:
-+ self._refreshTxn(txn, refresh_shutdown)
-+ txn.commit()
-+ except:
-+ txn.abort()
-+ raise
-+
-+ def _refreshTxn(self, transaction, refresh_shutdown):
- running = self._running_domains()
- # Add domains that are not already tracked but running in Xen,
- # and update domain state for those that are running and tracked.
- for dom in running:
- domid = dom['domid']
- if domid in self.domains:
-- self.domains[domid].update(dom, refresh_shutdown)
-+ self.domains[domid].update(dom, refresh_shutdown, transaction)
- elif domid not in self.domains and dom['dying'] != 1:
- try:
- new_dom = XendDomainInfo.recreate(dom, False)
-diff -r 8ca89a9e54a7 tools/python/xen/xend/XendDomainInfo.py
---- a/tools/python/xen/xend/XendDomainInfo.py Wed Apr 25 09:44:20 2007 +0100
-+++ b/tools/python/xen/xend/XendDomainInfo.py Wed Apr 25 12:55:05 2007 -0400
-@@ -704,12 +704,15 @@ class XendDomainInfo:
+diff -rup xen-unstable.hg-16125.orig/tools/python/xen/xend/XendDomainInfo.py xen-unstable.hg-16125.new/tools/python/xen/xend/XendDomainInfo.py
+--- xen-unstable.hg-16125.orig/tools/python/xen/xend/XendDomainInfo.py 2007-10-29 14:05:20.000000000 -0400
++++ xen-unstable.hg-16125.new/tools/python/xen/xend/XendDomainInfo.py 2007-10-29 14:21:03.000000000 -0400
+@@ -819,12 +819,15 @@ class XendDomainInfo:
self._update_consoles()
@@ -129,7 +303,7 @@
if self.console_port is not None:
serial_consoles = self.info.console_get_all('vt100')
if not serial_consoles:
-@@ -722,7 +725,10 @@ class XendDomainInfo:
+@@ -837,7 +840,10 @@ class XendDomainInfo:
# Update VNC port if it exists and write to xenstore
@@ -141,7 +315,7 @@
if vnc_port is not None:
for dev_uuid, (dev_type, dev_info) in self.info['devices'].items():
if dev_type == 'vfb':
-@@ -757,6 +763,27 @@ class XendDomainInfo:
+@@ -872,6 +878,27 @@ class XendDomainInfo:
def storeVm(self, *args):
return xstransact.Store(self.vmpath, *args)
@@ -169,11 +343,10 @@
#
# Function to update xenstore /dom/*
#
-@@ -775,6 +802,28 @@ class XendDomainInfo:
-
+@@ -891,6 +918,28 @@ class XendDomainInfo:
def storeDom(self, *args):
return xstransact.Store(self.dompath, *args)
-+
+
+
+ def readDomTxn(self, transaction, *args):
+ paths = map(lambda x: self.vmpath + "/" + x, args)
@@ -195,10 +368,11 @@
+ paths = map(lambda x: self.vmpath + "/" + x, args)
+ return transaction.store(*paths)
+
-
++
def _recreateDom(self):
complete(self.dompath, lambda t: self._recreateDomFunc(t))
-@@ -2062,7 +2111,7 @@ class XendDomainInfo:
+
+@@ -2204,7 +2253,7 @@ class XendDomainInfo:
(" as domain %s" % str(dom.domid)) or ""))
@@ -207,7 +381,7 @@
"""Update with info from xc.domain_getinfo().
"""
log.trace("XendDomainInfo.update(%s) on domain %s", info,
-@@ -2094,7 +2143,7 @@ class XendDomainInfo:
+@@ -2227,7 +2276,7 @@ class XendDomainInfo:
# TODO: we should eventually get rid of old_dom_states
self.info.update_config(info)
@@ -216,205 +390,30 @@
if refresh:
self.refreshShutdown(info)
-diff -r 8ca89a9e54a7 tools/python/xen/xend/server/ConsoleController.py
---- a/tools/python/xen/xend/server/ConsoleController.py Wed Apr 25 09:44:20 2007 +0100
-+++ b/tools/python/xen/xend/server/ConsoleController.py Wed Apr 25 12:57:05 2007 -0400
-@@ -19,9 +19,12 @@ class ConsoleController(DevController):
- return (self.allocateDeviceID(), back, {})
-
-
-- def getDeviceConfiguration(self, devid):
-- result = DevController.getDeviceConfiguration(self, devid)
-- devinfo = self.readBackend(devid, *self.valid_cfg)
-+ def getDeviceConfiguration(self, devid, transaction = None):
-+ result = DevController.getDeviceConfiguration(self, devid, transaction)
-+ if transaction is None:
-+ devinfo = self.readBackend(devid, *self.valid_cfg)
-+ else:
-+ devinfo = self.readBackendTxn(transaction, devid, *self.valid_cfg)
- config = dict(zip(self.valid_cfg, devinfo))
- config = dict([(key, val) for key, val in config.items()
- if val != None])
-diff -r 8ca89a9e54a7 tools/python/xen/xend/server/DevController.py
---- a/tools/python/xen/xend/server/DevController.py Wed Apr 25 09:44:20 2007 +0100
-+++ b/tools/python/xen/xend/server/DevController.py Wed Apr 25 12:57:05 2007 -0400
-@@ -225,15 +225,15 @@ class DevController:
-
- self.vm._removeVm("device/%s/%d" % (self.deviceClass, devid))
-
-- def configurations(self):
-- return map(self.configuration, self.deviceIDs())
--
--
-- def configuration(self, devid):
-+ def configurations(self, transaction = None):
-+ return map(lambda x: self.configuration(x, transaction), self.deviceIDs(transaction))
-+
-+
-+ def configuration(self, devid, transaction = None):
- """@return an s-expression giving the current configuration of the
- specified device. This would be suitable for giving to {@link
- #createDevice} in order to recreate that device."""
-- configDict = self.getDeviceConfiguration(devid)
-+ configDict = self.getDeviceConfiguration(devid, transaction)
- sxpr = [self.deviceClass]
- for key, val in configDict.items():
- if isinstance(val, (types.ListType, types.TupleType)):
-@@ -259,13 +259,16 @@ class DevController:
- 'id', devid]]
-
-
-- def getDeviceConfiguration(self, devid):
-+ def getDeviceConfiguration(self, devid, transaction = None):
- """Returns the configuration of a device.
-
- @note: Similar to L{configuration} except it returns a dict.
- @return: dict
+diff -rup xen-unstable.hg-16125.orig/tools/python/xen/xend/XendDomain.py xen-unstable.hg-16125.new/tools/python/xen/xend/XendDomain.py
+--- xen-unstable.hg-16125.orig/tools/python/xen/xend/XendDomain.py 2007-10-19 09:51:32.000000000 -0400
++++ xen-unstable.hg-16125.new/tools/python/xen/xend/XendDomain.py 2007-10-29 14:21:03.000000000 -0400
+@@ -393,13 +393,22 @@ class XendDomain:
+ @rtype: None
"""
-- backdomid = xstransact.Read(self.frontendPath(devid), "backend-id")
-+ if transaction is None:
-+ backdomid = xstransact.Read(self.frontendPath(devid), "backend-id")
-+ else:
-+ backdomid = transaction.read(self.frontendPath(devid) + "/backend-id")
- if backdomid is None:
- raise VmError("Device %s not connected" % devid)
-
-@@ -393,14 +396,28 @@ class DevController:
- else:
- raise VmError("Device %s not connected" % devid)
-
-+ def readBackendTxn(self, transaction, devid, *args):
-+ frontpath = self.frontendPath(devid)
-+ backpath = transaction.read(frontpath + "/backend")
-+ if backpath:
-+ paths = map(lambda x: backpath + "/" + x, args)
-+ return transaction.read(*paths)
-+ else:
-+ raise VmError("Device %s not connected" % devid)
-+
- def readFrontend(self, devid, *args):
- return xstransact.Read(self.frontendPath(devid), *args)
-+
-+ def readFrontendTxn(self, transaction, devid, *args):
-+ paths = map(lambda x: self.frontendPath(devid) + "/" + x, args)
-+ return transaction.read(*paths)
- def deviceIDs(self, transaction = None):
- """@return The IDs of each of the devices currently configured for
- this instance's deviceClass.
- """
- fe = self.backendRoot()
++ txn = xstransact()
++ try:
++ self._refreshTxn(txn, refresh_shutdown)
++ txn.commit()
++ except:
++ txn.abort()
++ raise
+
- if transaction:
- return map(lambda x: int(x.split('/')[-1]), transaction.list(fe))
- else:
-diff -r 8ca89a9e54a7 tools/python/xen/xend/server/blkif.py
---- a/tools/python/xen/xend/server/blkif.py Wed Apr 25 09:44:20 2007 +0100
-+++ b/tools/python/xen/xend/server/blkif.py Wed Apr 25 12:57:05 2007 -0400
-@@ -107,19 +107,26 @@ class BlkifController(DevController):
- (self.deviceClass, devid, config))
-
-
-- def getDeviceConfiguration(self, devid):
-+ def getDeviceConfiguration(self, devid, transaction = None):
- """Returns the configuration of a device.
-
- @note: Similar to L{configuration} except it returns a dict.
- @return: dict
- """
-- config = DevController.getDeviceConfiguration(self, devid)
-- devinfo = self.readBackend(devid, 'dev', 'type', 'params', 'mode',
-- 'uuid')
-+ config = DevController.getDeviceConfiguration(self, devid, transaction)
-+ if transaction is None:
-+ devinfo = self.readBackend(devid, 'dev', 'type', 'params', 'mode',
-+ 'uuid')
-+ else:
-+ devinfo = self.readBackendTxn(transaction, devid,
-+ 'dev', 'type', 'params', 'mode', 'uuid')
- dev, typ, params, mode, uuid = devinfo
-
- if dev:
-- dev_type = self.readFrontend(devid, 'device-type')
-+ if transaction is None:
-+ dev_type = self.readFrontend(devid, 'device-type')
-+ else:
-+ dev_type = self.readFrontendTxn(transaction, devid, 'device-type')
- if dev_type:
- dev += ':' + dev_type
- config['dev'] = dev
-diff -r 8ca89a9e54a7 tools/python/xen/xend/server/netif.py
---- a/tools/python/xen/xend/server/netif.py Wed Apr 25 09:44:20 2007 +0100
-+++ b/tools/python/xen/xend/server/netif.py Wed Apr 25 12:57:05 2007 -0400
-@@ -149,16 +149,19 @@ class NetifController(DevController):
- return (devid, back, front)
-
-
-- def getDeviceConfiguration(self, devid):
-+ def getDeviceConfiguration(self, devid, transaction = None):
- """@see DevController.configuration"""
-
-- result = DevController.getDeviceConfiguration(self, devid)
-+ result = DevController.getDeviceConfiguration(self, devid, transaction)
-
- config_path = "device/%s/%d/" % (self.deviceClass, devid)
- devinfo = ()
- for x in ( 'script', 'ip', 'bridge', 'mac',
- 'type', 'vifname', 'rate', 'uuid', 'model' ):
-- y = self.vm._readVm(config_path + x)
-+ if transaction is None:
-+ y = self.vm._readVm(config_path + x)
-+ else:
-+ y = self.vm._readVmTxn(transaction, config_path + x)
- devinfo += (y,)
- (script, ip, bridge, mac, typ, vifname, rate, uuid, model) = devinfo
-
-diff -r 8ca89a9e54a7 tools/python/xen/xend/server/pciif.py
---- a/tools/python/xen/xend/server/pciif.py Wed Apr 25 09:44:20 2007 +0100
-+++ b/tools/python/xen/xend/server/pciif.py Wed Apr 25 12:57:05 2007 -0400
-@@ -78,8 +78,8 @@ class PciController(DevController):
- back['uuid'] = config.get('uuid','')
- return (0, back, {})
-
-- def getDeviceConfiguration(self, devid):
-- result = DevController.getDeviceConfiguration(self, devid)
-+ def getDeviceConfiguration(self, devid, transaction = None):
-+ result = DevController.getDeviceConfiguration(self, devid, transaction)
- num_devs = self.readBackend(devid, 'num_devs')
- pci_devs = []
-
-diff -r 8ca89a9e54a7 tools/python/xen/xend/server/tpmif.py
---- a/tools/python/xen/xend/server/tpmif.py Wed Apr 25 09:44:20 2007 +0100
-+++ b/tools/python/xen/xend/server/tpmif.py Wed Apr 25 12:57:05 2007 -0400
-@@ -67,9 +67,9 @@ class TPMifController(DevController):
-
- return (devid, back, front)
-
-- def getDeviceConfiguration(self, devid):
-+ def getDeviceConfiguration(self, devid, transaction = None):
- """Returns the configuration of a device"""
-- result = DevController.getDeviceConfiguration(self, devid)
-+ result = DevController.getDeviceConfiguration(self, devid, transaction)
-
- (instance, uuid, type) = \
- self.readBackend(devid, 'instance',
-diff -r 8ca89a9e54a7 tools/python/xen/xend/server/vfbif.py
---- a/tools/python/xen/xend/server/vfbif.py Wed Apr 25 09:44:20 2007 +0100
-+++ b/tools/python/xen/xend/server/vfbif.py Wed Apr 25 12:57:05 2007 -0400
-@@ -35,10 +35,13 @@ class VfbifController(DevController):
- return (devid, back, {})
-
-
-- def getDeviceConfiguration(self, devid):
-- result = DevController.getDeviceConfiguration(self, devid)
-+ def getDeviceConfiguration(self, devid, transaction = None):
-+ result = DevController.getDeviceConfiguration(self, devid, transaction)
-
-- devinfo = self.readBackend(devid, *CONFIG_ENTRIES)
-+ if transaction is None:
-+ devinfo = self.readBackend(devid, *CONFIG_ENTRIES)
-+ else:
-+ devinfo = self.readBackendTxn(transaction, devid, *CONFIG_ENTRIES)
- return dict([(CONFIG_ENTRIES[i], devinfo[i])
- for i in range(len(CONFIG_ENTRIES))
- if devinfo[i] is not None])
++ def _refreshTxn(self, transaction, refresh_shutdown):
+ running = self._running_domains()
+ # Add domains that are not already tracked but running in Xen,
+ # and update domain state for those that are running and tracked.
+ for dom in running:
+ domid = dom['domid']
+ if domid in self.domains:
+- self.domains[domid].update(dom, refresh_shutdown)
++ self.domains[domid].update(dom, refresh_shutdown, transaction)
+ elif domid not in self.domains and dom['dying'] != 1:
+ try:
+ new_dom = XendDomainInfo.recreate(dom, False)
Index: xen.spec
===================================================================
RCS file: /cvs/pkgs/rpms/xen/devel/xen.spec,v
retrieving revision 1.194.2.2
retrieving revision 1.194.2.3
diff -u -r1.194.2.2 -r1.194.2.3
--- xen.spec 24 Oct 2007 20:02:57 -0000 1.194.2.2
+++ xen.spec 29 Oct 2007 18:31:52 -0000 1.194.2.3
@@ -5,7 +5,7 @@
Summary: Xen is a virtual machine monitor
Name: xen
Version: 3.1.1
-Release: 0%{?dist}.3unstable
+Release: 0%{?dist}.4unstable
Group: Development/Libraries
License: GPL
URL: http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html
@@ -147,7 +147,7 @@
%patch251 -p1
# performance patch
-#patch280 -p1
+%patch280 -p1
%build
CFLAGS="$RPM_OPT_FLAGS" %{__make} XENFB_TOOLS=y XEN_PYTHON_NATIVE_INSTALL=1 DESTDIR=%{buildroot} tools docs
- Previous message (by thread): rpms/compiz-manager/F-8 compiz-manager-0.6.0.diff, NONE, 1.1 compiz-manager.license, NONE, 1.1 compiz-manager.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
- Next message (by thread): rpms/PackageKit/devel PackageKit.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list