Re: [PATCH] lxc: Seperate domain config loading

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



ä 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@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]