]> xenbits.xensource.com Git - libvirt.git/commit
qemu: Move channelTargetDir into stateDir
authorMichal Privoznik <mprivozn@redhat.com>
Thu, 20 Apr 2023 08:16:43 +0000 (10:16 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 17 Aug 2023 15:22:09 +0000 (17:22 +0200)
commit8abc979bb09ca4b93123e8f75f3d28cc421a0bb6
tree0df53a30ee7b62b6cc6ef276ca17ce239690d8d3
parentd3759d3674ab9453e5fb5a27ab6c28b8ff8d5569
qemu: Move channelTargetDir into stateDir

For historical reasons (i.e. unknown reason) we put channel
sockets into a path derived from cfg->libDir which is a path that
survives host reboots (e.g. /var/lib/libvirt/...). This is not
necessary and in fact for session daemon creates a longer prefix:

  XDG_CONFIG_HOME -> /home/user/.config
  XDG_RUNTIME_DIR -> /run/user/1000

Worse, if host is rebooted suddenly (e.g. due to power loss) then
we leave files behind and nobody will ever remove them.

Therefore, place the channel target dir into state dir.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2173980
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
libvirt.spec.in
src/qemu/qemu_conf.c
src/qemu/qemu_domain.c
tests/qemuhotplugtestdevices/qemuhotplug-qemu-agent-detach.xml
tests/qemuhotplugtestdomains/qemuhotplug-base-live+qemu-agent-detach.xml
tests/qemuhotplugtestdomains/qemuhotplug-base-live+qemu-agent.xml
tests/qemuxml2argvdata/channel-unix-source-path.xml
tests/qemuxml2xmloutdata/channel-unix-source-path-active.xml
tests/qemuxml2xmloutdata/channel-unix-source-path-inactive.xml
tests/testutilsqemu.c