mirror of
https://github.com/xen-project/xen.git
synced 2026-10-30 03:00:05 +01:00
An error occurs if the first detach was successful and the 2nd one is
not (of course). Return if the 1st detach is successful, try the 2nd one if it was not successful. Throw an error if the 2nd one fails. This should also fix problems I am currently seeing in the xm-test suite. Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
This commit is contained in:
1 parent
24a6ed484b
commit
324ad7a4a8
1 file changed
+5
-1
@@ -1556,7 +1556,11 @@ def detach(args, command, deviceClass):
|
||||
|
||||
|
||||
def xm_block_detach(args):
|
||||
detach(args, 'block-detach', 'vbd')
|
||||
try:
|
||||
detach(args, 'block-detach', 'vbd')
|
||||
return
|
||||
except:
|
||||
pass
|
||||
detach(args, 'block-detach', 'tap')
|
||||
|
||||
|
||||
|
||||