Go to file
Fiona Ebner 556cc662ab qmeventd: go back to extracting vmid from commandline instead of cgroup file
In spirit, this is a revert of 502870a0 ("qmeventd: extract vmid from
cgroup file instead of cmdline"), but instead of relying on the custom
'id' commandline option that's added by a Proxmox VE patch to QEMU,
rely on the standard 'pidfile' option to extract the VM ID.

As reported in the community forum [0], at least during stop mode
backup, it seems to be possible to end up with the VM process having
> 0::/system.slice/pvescheduler.service
as its single cgroup entry. It's not clear what exactly happens and
there was no success to reproduce the issue. Might be a rare bug in
systemd or in pve-common's enter_systemd_scope() code.

This was not the first time relying on the cgroup entry caused issues,
see d0b58753 ("qmeventd: improve getting VMID from PID in presence of
legacy cgroup entries").

To avoid such edge cases and issues in the future, go back to
extracting the VM ID from the process's commandline.

It's enough to care about the first occurrence of the 'pidfile'
option, because that's the one added by Proxmox VE, so the 'continue's
in the loop turn into 'break's. Even though a later option would
override the first for QEMU itself to use, that's not supported
anyways and the important part is the VM ID which is present in the
first.

[0]: https://forum.proxmox.com/threads/147409/

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
Link: https://lore.proxmox.com/20240614092134.18729-1-f.ebner@proxmox.com
2025-04-07 22:08:13 +02:00
debian cfg2cmd: replace deprecated 'reconnect' option with 'reconnect-ms' 2025-04-07 09:45:56 +02:00
PVE vmstatus_return_properties: add missing serial property 2025-04-07 21:55:22 +02:00
qemu-configs move qemu-configs to own directory 2019-09-24 18:59:35 +02:00
qmeventd qmeventd: go back to extracting vmid from commandline instead of cgroup file 2025-04-07 22:08:13 +02:00
query-machine-capabilities add pve prefix to query-machine-capabilities.service 2024-11-18 21:56:15 +01:00
test tests: fix config to command expected outputs 2025-04-07 17:30:16 +02:00
vm-network-scripts vm-network-scripts: move scripts to /usr/libexec 2025-04-07 16:01:21 +02:00
.gitignore gitignore: sort content 2023-11-17 15:54:24 +01:00
bootsplash.jpg add seabios bootsplash and use it 2016-09-08 12:22:01 +02:00
bootsplash.xcf add seabios bootsplash and use it 2016-09-08 12:22:01 +02:00
Makefile add C program to get hardware capabilities from CPUID 2024-11-17 18:37:03 +01:00
modules-load.conf remove unnecessary init.d, postint, postrm and qmupdate scripts 2015-02-27 16:09:41 +01:00
qm convert qmrestore into a PVE::CLI class 2015-10-05 13:10:24 +02:00
qmextract remove legacy sparsecp 2017-08-23 10:03:37 +02:00
qmrestore convert qmrestore into a PVE::CLI class 2015-10-05 13:10:24 +02:00