Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
1e626437
L
libvirt
项目概览
openeuler
/
libvirt
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
L
libvirt
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
1e626437
编写于
9月 16, 2011
作者:
J
Jiri Denemark
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
qemu: Add support for keepalive messages during p2p migration
上级
6e945da5
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
48 addition
and
0 deletion
+48
-0
src/qemu/libvirtd_qemu.aug
src/qemu/libvirtd_qemu.aug
+2
-0
src/qemu/qemu.conf
src/qemu/qemu.conf
+22
-0
src/qemu/qemu_conf.c
src/qemu/qemu_conf.c
+11
-0
src/qemu/qemu_conf.h
src/qemu/qemu_conf.h
+3
-0
src/qemu/qemu_migration.c
src/qemu/qemu_migration.c
+4
-0
src/qemu/test_libvirtd_qemu.aug
src/qemu/test_libvirtd_qemu.aug
+6
-0
未找到文件。
src/qemu/libvirtd_qemu.aug
浏览文件 @
1e626437
...
...
@@ -52,6 +52,8 @@ module Libvirtd_qemu =
|
int_entry
"max_processes"
|
str_entry
"lock_manager"
|
int_entry
"max_queued"
|
int_entry
"keepalive_interval"
|
int_entry
"keepalive_count"
(* Each enty in the config is one of the following three ... *)
let
entry
=
vnc_entry
...
...
src/qemu/qemu.conf
浏览文件 @
1e626437
...
...
@@ -317,3 +317,25 @@
# Note, that job lock is per domain.
#
# max_queued = 0
###################################################################
# Keepalive protocol:
# This allows qemu driver to detect broken connections to remote
# libvirtd during peer-to-peer migration. A keepalive message is
# sent to the deamon after keepalive_interval seconds of inactivity
# to check if the deamon is still responding; keepalive_count is a
# maximum number of keepalive messages that are allowed to be sent
# to the deamon without getting any response before the connection
# is considered broken. In other words, the connection is
# automatically closed approximately after
# keepalive_interval * (keepalive_count + 1) seconds since the last
# message received from the deamon. If keepalive_interval is set to
# -1, qemu driver will not send keepalive requests during
# peer-to-peer migration; however, the remote libvirtd can still
# send them and source libvirtd will send responses. When
# keepalive_count is set to 0, connections will be automatically
# closed after keepalive_interval seconds of inactivity without
# sending any keepalive messages.
#
#keepalive_interval = 5
#keepalive_count = 5
src/qemu/qemu_conf.c
浏览文件 @
1e626437
...
...
@@ -115,6 +115,9 @@ int qemudLoadDriverConfig(struct qemud_driver *driver,
virLockManagerPluginNew
(
"nop"
,
NULL
,
0
)))
return
-
1
;
driver
->
keepAliveInterval
=
5
;
driver
->
keepAliveCount
=
5
;
/* Just check the file is readable before opening it, otherwise
* libvirt emits an error.
*/
...
...
@@ -460,6 +463,14 @@ int qemudLoadDriverConfig(struct qemud_driver *driver,
CHECK_TYPE
(
"max_queued"
,
VIR_CONF_LONG
);
if
(
p
)
driver
->
max_queued
=
p
->
l
;
p
=
virConfGetValue
(
conf
,
"keepalive_interval"
);
CHECK_TYPE
(
"keepalive_interval"
,
VIR_CONF_LONG
);
if
(
p
)
driver
->
keepAliveInterval
=
p
->
l
;
p
=
virConfGetValue
(
conf
,
"keepalive_count"
);
CHECK_TYPE
(
"keepalive_count"
,
VIR_CONF_LONG
);
if
(
p
)
driver
->
keepAliveCount
=
p
->
l
;
virConfFree
(
conf
);
return
0
;
}
src/qemu/qemu_conf.h
浏览文件 @
1e626437
...
...
@@ -135,6 +135,9 @@ struct qemud_driver {
* of guests which will be automatically killed
* when the virConnectPtr is closed*/
virHashTablePtr
autodestroy
;
int
keepAliveInterval
;
unsigned
int
keepAliveCount
;
};
typedef
struct
_qemuDomainCmdlineDef
qemuDomainCmdlineDef
;
...
...
src/qemu/qemu_migration.c
浏览文件 @
1e626437
...
...
@@ -2222,6 +2222,10 @@ static int doPeer2PeerMigrate(struct qemud_driver *driver,
return
-
1
;
}
if
(
virConnectSetKeepAlive
(
dconn
,
driver
->
keepAliveInterval
,
driver
->
keepAliveCount
)
<
0
)
goto
cleanup
;
qemuDomainObjEnterRemoteWithDriver
(
driver
,
vm
);
p2p
=
VIR_DRV_SUPPORTS_FEATURE
(
dconn
->
driver
,
dconn
,
VIR_DRV_FEATURE_MIGRATION_P2P
);
...
...
src/qemu/test_libvirtd_qemu.aug
浏览文件 @
1e626437
...
...
@@ -115,6 +115,9 @@ vnc_auto_unix_socket = 1
max_processes = 12345
lock_manager =
\"
fcntl
\"
keepalive_interval = 1
keepalive_count = 42
"
test
Libvirtd_qemu
.
lns
get
conf
=
...
...
@@ -240,3 +243,6 @@ lock_manager = \"fcntl\"
{
"max_processes"
=
"12345"
}
{
"#empty"
}
{
"lock_manager"
=
"fcntl"
}
{
"#empty"
}
{
"keepalive_interval"
=
"1"
}
{
"keepalive_count"
=
"42"
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录