Re: [PATCH] lxc: Cleanup after failed startup

2020-11-06 Thread Martin Kletzander
On Fri, Nov 06, 2020 at 02:30:13PM +0100, Michal Privoznik wrote: If starting an container fails, the virLXCProcessStop() is called. But since vm->def->id is not set until libvirt_lxc is spawned (the domain's ID is PID of that process), virLXCProcessStop() returns early as virDomainObjIsActive()

[PATCH] lxc: Cleanup after failed startup

2020-11-06 Thread Michal Privoznik
If starting an container fails, the virLXCProcessStop() is called. But since vm->def->id is not set until libvirt_lxc is spawned (the domain's ID is PID of that process), virLXCProcessStop() returns early as virDomainObjIsActive() returns false. But doing so leaves behind resources reserved for