Re: [PATCH v2] qemu: add a monitor to /proc/$pid when killing times out

2024-07-19 Thread Boris Fiuczynski
On 7/19/24 3:29 PM, Daniel P. Berrangé wrote: +static int +qemuProcessInShutdownStartMonitor(virDomainObj *vm) +{ +qemuDomainObjPrivate *priv = vm->privateData; +qemuProcessInShutdownEventData *data; +int pidfd; +int ret = -1; + +VIR_DEBUG("vm=%p name=%s pid=%lld pidMonitored=

[PATCH v3] qemu: add a monitor to /proc/$pid when killing times out

2024-07-19 Thread Boris Fiuczynski
In cases when a QEMU process takes longer than the time sigterm and sigkill are issued to kill the process do not simply fail and leave the VM in state VIR_DOMAIN_SHUTDOWN until the daemon stops. Instead set up an fd on /proc/$pid and get notified when the QEMU process finally has terminated to cle

Re: [PATCH v2] qemu: add a monitor to /proc/$pid when killing times out

2024-07-19 Thread Daniel P . Berrangé
On Fri, Jul 19, 2024 at 02:58:23PM +0200, Boris Fiuczynski wrote: > In cases when a QEMU process takes longer than the time sigterm and > sigkill are issued to kill the process do not simply fail and leave the > VM in state VIR_DOMAIN_SHUTDOWN until the daemon stops. Instead set up > an fd on /proc

[PATCH] vmx: Ensure unique disk targets when parsing

2024-07-19 Thread Adam Julis
Disk targets were generated in virVMXParseConfig() with virVMXGenerateDiskTarget(). It works on combination of controller, fix offset, unit and prefix. While SCSI and SATA have same prefix "sd", function virVMXGenerateDiskTarget() could returned in some cases same targets. In this patch, after loa

Re: [PATCH] security: AppArmor allow write when os loader readonly=no

2024-07-19 Thread Andrea Bolognani
On Thu, Jul 11, 2024 at 06:26:31AM GMT, Andrea Bolognani wrote: > On Tue, Jul 09, 2024 at 08:41:17AM GMT, mirlos--- via Devel wrote: > > My reply by email has not arrived by now, hence I'll post it via > > the archive site. Sorry for the potential double post. > > No double post as far as I can tel

[PATCH v2] qemu: add a monitor to /proc/$pid when killing times out

2024-07-19 Thread Boris Fiuczynski
In cases when a QEMU process takes longer than the time sigterm and sigkill are issued to kill the process do not simply fail and leave the VM in state VIR_DOMAIN_SHUTDOWN until the daemon stops. Instead set up an fd on /proc/$pid and get notified when the QEMU process finally has terminated to cle

[PATCH] qemuProcessStop: Don't unlock domain until most of the cleanup is done

2024-07-19 Thread Michal Privoznik
Imagine two threads. Thread A is executing qemuProcessStop() and thread B is executing qemuDomainCreateXML(). To make things more interesting, the domain XML passed to qemuDomainCreateXML matches name + UUID of that the virDomainObj that qemuProcessStop() is currently working with. Here's what happ