mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
xend: Fix removing /vm/UUID/device paths when device cannot be disconnected
This is a corrected version of a patch commited as c/s 19250 and reverted by c/s 19314. Thanks to "trap sigerr ERR" in xen-hotplug-common.sh the xen-hotplug-cleanup would exit when reading /local/domain/ID/vm fails thus skipping all the xenstore-rm lines in the rest of the script. Change deviceDestroy behavior to remove /vm/UUID/device/... path only when force was used (as it already does so for both frontend and backend) and do the removing from xen-hotplug-cleanup script when we are sure the device is really not attached to the guest any more. Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
This commit is contained in:
1 parent
677a041f1f
commit
0aef8a0311
2 files changed
+16
-2
No files matched your search
@@ -235,8 +235,8 @@ class DevController:
|
||||
xstransact.Remove(backpath)
|
||||
xstransact.Remove(frontpath)
|
||||
|
||||
# xstransact.Remove(self.devicePath()) ?? Below is the same ?
|
||||
self.vm._removeVm("device/%s/%d" % (self.deviceClass, dev))
|
||||
# xstransact.Remove(self.devicePath()) ?? Below is the same ?
|
||||
self.vm._removeVm("device/%s/%d" % (self.deviceClass, dev))
|
||||
|
||||
def configurations(self, transaction = None):
|
||||
return map(lambda x: self.configuration(x, transaction), self.deviceIDs(transaction))
|
||||
|
||||