Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
tp-libvirt
提交
87029d18
T
tp-libvirt
项目概览
openeuler
/
tp-libvirt
通知
5
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
tp-libvirt
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
未验证
提交
87029d18
编写于
8月 17, 2020
作者:
D
dzhengfy
提交者:
GitHub
8月 17, 2020
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #2829 from qiankehan/wait_event
virtual_disks: Apply wait_remove_event for disk hot unplug
上级
c18c8290
2fc9d489
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
13 addition
and
12 deletion
+13
-12
libvirt/tests/src/virtual_disks/at_dt_iscsi_disk.py
libvirt/tests/src/virtual_disks/at_dt_iscsi_disk.py
+1
-1
libvirt/tests/src/virtual_disks/virtual_disks_ceph.py
libvirt/tests/src/virtual_disks/virtual_disks_ceph.py
+3
-3
libvirt/tests/src/virtual_disks/virtual_disks_encryption.py
libvirt/tests/src/virtual_disks/virtual_disks_encryption.py
+1
-1
libvirt/tests/src/virtual_disks/virtual_disks_gluster.py
libvirt/tests/src/virtual_disks/virtual_disks_gluster.py
+1
-1
libvirt/tests/src/virtual_disks/virtual_disks_multidisks.py
libvirt/tests/src/virtual_disks/virtual_disks_multidisks.py
+4
-3
libvirt/tests/src/virtual_disks/virtual_disks_nbd.py
libvirt/tests/src/virtual_disks/virtual_disks_nbd.py
+1
-1
libvirt/tests/src/virtual_disks/virtual_disks_scsi3_persistent_reservation.py
...rtual_disks/virtual_disks_scsi3_persistent_reservation.py
+1
-1
libvirt/tests/src/virtual_disks/virtual_disks_usb.py
libvirt/tests/src/virtual_disks/virtual_disks_usb.py
+1
-1
未找到文件。
libvirt/tests/src/virtual_disks/at_dt_iscsi_disk.py
浏览文件 @
87029d18
...
...
@@ -359,7 +359,7 @@ def run(test, params, env):
find_attach_disk
(
not
status_error
)
# Detach disk
cmd_result
=
virsh
.
detach_disk
(
vm_name
,
disk_target
)
cmd_result
=
virsh
.
detach_disk
(
vm_name
,
disk_target
,
wait_remove_event
=
True
)
libvirt
.
check_exit_status
(
cmd_result
,
status_error
)
# Check disk inside the VM
...
...
libvirt/tests/src/virtual_disks/virtual_disks_ceph.py
浏览文件 @
87029d18
...
...
@@ -954,13 +954,13 @@ def run(test, params, env):
# Detach the device.
if
attach_device
:
xml_file
=
libvirt
.
create_disk_xml
(
params
)
ret
=
virsh
.
detach_device
(
vm_name
,
xml_file
)
ret
=
virsh
.
detach_device
(
vm_name
,
xml_file
,
wait_remove_event
=
True
)
libvirt
.
check_exit_status
(
ret
)
if
additional_guest
:
ret
=
virsh
.
detach_device
(
guest_name
,
xml_file
)
ret
=
virsh
.
detach_device
(
guest_name
,
xml_file
,
wait_remove_event
=
True
)
libvirt
.
check_exit_status
(
ret
)
elif
attach_disk
:
ret
=
virsh
.
detach_disk
(
vm_name
,
targetdev
)
ret
=
virsh
.
detach_disk
(
vm_name
,
targetdev
,
wait_remove_event
=
True
)
libvirt
.
check_exit_status
(
ret
)
# Check disk in vm after detachment.
...
...
libvirt/tests/src/virtual_disks/virtual_disks_encryption.py
浏览文件 @
87029d18
...
...
@@ -332,7 +332,7 @@ def run(test, params, env):
if
not
check_in_vm
(
vm
,
device_target
,
old_parts
):
test
.
fail
(
"Check encryption disk in VM failed"
)
result
=
virsh
.
detach_device
(
vm_name
,
disk_xml
.
xml
,
debug
=
True
)
debug
=
True
,
wait_remove_event
=
True
)
libvirt
.
check_exit_status
(
result
)
else
:
if
not
check_in_vm
(
vm
,
device_target
,
old_parts
):
...
...
libvirt/tests/src/virtual_disks/virtual_disks_gluster.py
浏览文件 @
87029d18
...
...
@@ -262,7 +262,7 @@ def run(test, params, env):
if
start_vm
and
not
default_pool
:
if
gluster_disk
:
ret
=
virsh
.
detach_device
(
vm_name
,
custom_disk
.
xml
,
flagstr
=
attach_option
,
dargs
=
virsh_dargs
)
flagstr
=
attach_option
,
dargs
=
virsh_dargs
,
wait_remove_event
=
True
)
libvirt
.
check_exit_status
(
ret
)
finally
:
...
...
libvirt/tests/src/virtual_disks/virtual_disks_multidisks.py
浏览文件 @
87029d18
...
...
@@ -1884,7 +1884,8 @@ def run(test, params, env):
if
devices
[
i
]
==
"cdrom"
:
dt_options
=
"--config"
ret
=
virsh
.
detach_disk
(
vm_name
,
device_targets
[
i
],
dt_options
,
**
virsh_dargs
)
dt_options
,
wait_remove_event
=
True
,
**
virsh_dargs
)
disk_detach_error
=
False
if
len
(
device_attach_error
)
>
i
:
disk_detach_error
=
"yes"
==
device_attach_error
[
i
]
...
...
@@ -1933,7 +1934,7 @@ def run(test, params, env):
for
counter
in
range
(
0
,
iteration_times
):
logging
.
info
(
"Begin to execute attach or detach %d operations"
,
counter
)
ret
=
virsh
.
detach_device
(
vm_name
,
disks_xml
[
0
].
xml
,
flagstr
=
attach_option
,
debug
=
True
)
flagstr
=
attach_option
,
debug
=
True
,
wait_remove_event
=
True
)
libvirt
.
check_exit_status
(
ret
)
# Sleep 10 seconds to let VM really cleanup devices.
time
.
sleep
(
10
)
...
...
@@ -1952,7 +1953,7 @@ def run(test, params, env):
if
device_attach_error
[
i
]
==
"yes"
:
continue
ret
=
virsh
.
detach_device
(
vm_name
,
disks_xml
[
i
].
xml
,
flagstr
=
attach_option
,
**
virsh_dargs
)
flagstr
=
attach_option
,
wait_remove_event
=
True
,
**
virsh_dargs
)
os
.
remove
(
disks_xml
[
i
].
xml
)
libvirt
.
check_exit_status
(
ret
)
...
...
libvirt/tests/src/virtual_disks/virtual_disks_nbd.py
浏览文件 @
87029d18
...
...
@@ -258,7 +258,7 @@ def run(test, params, env):
# Unplug disk.
if
hotplug_disk
:
result
=
virsh
.
detach_device
(
vm_name
,
disk_xml
.
xml
,
ignore_status
=
True
,
debug
=
True
)
ignore_status
=
True
,
debug
=
True
,
wait_remove_event
=
True
)
libvirt
.
check_exit_status
(
result
,
status_error
)
finally
:
# Clean up backend storage and TLS
...
...
libvirt/tests/src/virtual_disks/virtual_disks_scsi3_persistent_reservation.py
浏览文件 @
87029d18
...
...
@@ -234,7 +234,7 @@ def run(test, params, env):
new_part
=
new_parts
[
0
]
check_pr_cmds
(
vm
,
new_part
)
result
=
virsh
.
detach_device
(
vm_name
,
disk_xml
.
xml
,
ignore_status
=
True
,
debug
=
True
)
ignore_status
=
True
,
debug
=
True
,
wait_remove_event
=
True
)
libvirt
.
check_exit_status
(
result
)
except
virt_vm
.
VMStartError
as
e
:
test
.
fail
(
"VM failed to start."
...
...
libvirt/tests/src/virtual_disks/virtual_disks_usb.py
浏览文件 @
87029d18
...
...
@@ -231,7 +231,7 @@ def run(test, params, env):
# Detach the disk from vm
result
=
virsh
.
detach_device
(
vm_name
,
disk_xml
.
xml
,
flagstr
=
attach_options
,
ignore_status
=
True
,
debug
=
True
)
ignore_status
=
True
,
debug
=
True
,
wait_remove_event
=
True
)
libvirt
.
check_exit_status
(
result
,
status_error
)
# Check the detached disk in vm
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录