于 2011年05月21日 14:43, Osier Yang 写道:
于 2011年05月20日 22:31, Daniel P. Berrange 写道:
On Wed, May 18, 2011 at 04:57:53PM +0800, Osier Yang wrote:
This patch seperate the domain config loading just as qemu driver
does, first loading config of running or trasient domains, then
of persistent inactive domains. And only try to reconnect the
monitor of running domains, so that it won't always throws errors
saying can't connect to domain monitor.

And as "virDomainLoadConfig->virDomainAssignDef->virDomainObjAssignDef",
already do things like "vm->newDef = def", removed the codes
in "lxcReconnectVM" that does the same work.
---
src/lxc/lxc_driver.c | 30 +++++++++++++++---------------
1 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c
index 2bb592d..ccf20e4 100644
--- a/src/lxc/lxc_driver.c
+++ b/src/lxc/lxc_driver.c
@@ -1521,6 +1521,10 @@ static int lxcVmStart(virConnectPtr conn,
if (virDomainObjSetDefTransient(driver->caps, vm, false)< 0)
goto cleanup;

+ /* Write domain status to disk. */
+ if (virDomainSaveStatus(driver->caps, driver->stateDir, vm)< 0)
+ goto cleanup;
+
rc = 0;


If we introduce that, then I think you need to have the inverse
in lxcVmCleanup to delete it.

Doesn't it already deleted in lxcVmCleanup?

<snip>
virFileDeletePid(driver->stateDir, vm->def->name);
virDomainDeleteConfig(driver->stateDir, NULL, vm);
</snip>




Hi, Daniel

I rebased the patch, if above reason looks good to you,
I'd like push it.

Regards
Osier

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to