Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
0437e752
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
0437e752
编写于
2月 07, 2009
作者:
G
Guido Günther
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Don't ignore errors to save domain status
上级
9a867164
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
23 addition
and
7 deletion
+23
-7
ChangeLog
ChangeLog
+7
-0
src/qemu_driver.c
src/qemu_driver.c
+16
-7
未找到文件。
ChangeLog
浏览文件 @
0437e752
Sat Feb 7 21:46:06 CET 2009 Guido Günther <agx@sigxcpu.org>
* src/qemu_driver.c (qemudStartVMDaemon, qemudDomainSuspend,
qemudDomainResume, qemudDomainAttachDevice, qemudDomainDetachDevice):
Don't ignore errors to save domain status.
(qemudShutdownVMDaemon): Warn if we fail to remove the status file.
Fri Feb 6 14:43:10 GMT 2009 Daniel P. Berrange <berrange@redhat.com>
Fri Feb 6 14:43:10 GMT 2009 Daniel P. Berrange <berrange@redhat.com>
Fix 100% CPU bound loop when libvirtd --timeout is used
Fix 100% CPU bound loop when libvirtd --timeout is used
...
...
src/qemu_driver.c
浏览文件 @
0437e752
...
@@ -1251,12 +1251,12 @@ static int qemudStartVMDaemon(virConnectPtr conn,
...
@@ -1251,12 +1251,12 @@ static int qemudStartVMDaemon(virConnectPtr conn,
if
((
qemudWaitForMonitor
(
conn
,
driver
,
vm
,
pos
)
<
0
)
||
if
((
qemudWaitForMonitor
(
conn
,
driver
,
vm
,
pos
)
<
0
)
||
(
qemudDetectVcpuPIDs
(
conn
,
vm
)
<
0
)
||
(
qemudDetectVcpuPIDs
(
conn
,
vm
)
<
0
)
||
(
qemudInitCpus
(
conn
,
vm
,
migrateFrom
)
<
0
)
||
(
qemudInitCpus
(
conn
,
vm
,
migrateFrom
)
<
0
)
||
(
qemudInitPasswords
(
conn
,
driver
,
vm
)
<
0
))
{
(
qemudInitPasswords
(
conn
,
driver
,
vm
)
<
0
)
||
(
qemudSaveDomainStatus
(
conn
,
qemu_driver
,
vm
)
<
0
))
{
qemudShutdownVMDaemon
(
conn
,
driver
,
vm
);
qemudShutdownVMDaemon
(
conn
,
driver
,
vm
);
return
-
1
;
return
-
1
;
}
}
}
}
qemudSaveDomainStatus
(
conn
,
qemu_driver
,
vm
);
return
ret
;
return
ret
;
}
}
...
@@ -1294,7 +1294,10 @@ static void qemudShutdownVMDaemon(virConnectPtr conn ATTRIBUTE_UNUSED,
...
@@ -1294,7 +1294,10 @@ static void qemudShutdownVMDaemon(virConnectPtr conn ATTRIBUTE_UNUSED,
/* shut it off for sure */
/* shut it off for sure */
virKillProcess
(
vm
->
pid
,
SIGKILL
);
virKillProcess
(
vm
->
pid
,
SIGKILL
);
qemudRemoveDomainStatus
(
conn
,
driver
,
vm
);
if
(
qemudRemoveDomainStatus
(
conn
,
driver
,
vm
)
<
0
)
{
qemudLog
(
QEMUD_WARN
,
_
(
"Failed to remove domain status for %s"
),
vm
->
def
->
name
);
}
vm
->
pid
=
-
1
;
vm
->
pid
=
-
1
;
vm
->
def
->
id
=
-
1
;
vm
->
def
->
id
=
-
1
;
vm
->
state
=
VIR_DOMAIN_SHUTOFF
;
vm
->
state
=
VIR_DOMAIN_SHUTOFF
;
...
@@ -1951,7 +1954,8 @@ static int qemudDomainSuspend(virDomainPtr dom) {
...
@@ -1951,7 +1954,8 @@ static int qemudDomainSuspend(virDomainPtr dom) {
VIR_DOMAIN_EVENT_SUSPENDED_PAUSED
);
VIR_DOMAIN_EVENT_SUSPENDED_PAUSED
);
VIR_FREE
(
info
);
VIR_FREE
(
info
);
}
}
qemudSaveDomainStatus
(
dom
->
conn
,
driver
,
vm
);
if
(
qemudSaveDomainStatus
(
dom
->
conn
,
driver
,
vm
)
<
0
)
goto
cleanup
;
ret
=
0
;
ret
=
0
;
cleanup:
cleanup:
...
@@ -2001,7 +2005,8 @@ static int qemudDomainResume(virDomainPtr dom) {
...
@@ -2001,7 +2005,8 @@ static int qemudDomainResume(virDomainPtr dom) {
VIR_DOMAIN_EVENT_RESUMED_UNPAUSED
);
VIR_DOMAIN_EVENT_RESUMED_UNPAUSED
);
VIR_FREE
(
info
);
VIR_FREE
(
info
);
}
}
qemudSaveDomainStatus
(
dom
->
conn
,
driver
,
vm
);
if
(
qemudSaveDomainStatus
(
dom
->
conn
,
driver
,
vm
)
<
0
)
goto
cleanup
;
ret
=
0
;
ret
=
0
;
cleanup:
cleanup:
...
@@ -3435,7 +3440,9 @@ static int qemudDomainAttachDevice(virDomainPtr dom,
...
@@ -3435,7 +3440,9 @@ static int qemudDomainAttachDevice(virDomainPtr dom,
goto
cleanup
;
goto
cleanup
;
}
}
qemudSaveDomainStatus
(
dom
->
conn
,
driver
,
vm
);
if
(
!
ret
&&
qemudSaveDomainStatus
(
dom
->
conn
,
driver
,
vm
)
<
0
)
ret
=
-
1
;
cleanup:
cleanup:
if
(
ret
<
0
)
if
(
ret
<
0
)
virDomainDeviceDefFree
(
dev
);
virDomainDeviceDefFree
(
dev
);
...
@@ -3552,7 +3559,9 @@ static int qemudDomainDetachDevice(virDomainPtr dom,
...
@@ -3552,7 +3559,9 @@ static int qemudDomainDetachDevice(virDomainPtr dom,
qemudReportError
(
dom
->
conn
,
dom
,
NULL
,
VIR_ERR_NO_SUPPORT
,
qemudReportError
(
dom
->
conn
,
dom
,
NULL
,
VIR_ERR_NO_SUPPORT
,
"%s"
,
_
(
"only SCSI or virtio disk device can be detached dynamically"
));
"%s"
,
_
(
"only SCSI or virtio disk device can be detached dynamically"
));
qemudSaveDomainStatus
(
dom
->
conn
,
driver
,
vm
);
if
(
!
ret
&&
qemudSaveDomainStatus
(
dom
->
conn
,
driver
,
vm
)
<
0
)
ret
=
-
1
;
cleanup:
cleanup:
virDomainDeviceDefFree
(
dev
);
virDomainDeviceDefFree
(
dev
);
if
(
vm
)
if
(
vm
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录