Skip to content
Snippets Groups Projects
Commit fa6ecf65 authored by Andrea Bolognani's avatar Andrea Bolognani
Browse files

dirs: Don't ship channels directory

Starting with libvirt 9.7.0, channels are created under
/run/libvirt instead of /var/lib/libvirt, so we no longer need
to ship any directory as part of the package.

The migration between the two locations happens seamlessly:
domains that are running when the upgrade is performed keep
using the old directory, while domains that are started
afterwards use the new one.

As a result of that, if there are any running domains during
the upgrade, dpkg will refuse to delete the old directories.
Add a postint snippet that will take care of cleaning up
during a future upgrade, once all domains have been restarted
and are thus using the new location.
parent c421e715
1 merge request!203Release 9.7.0-1
......@@ -8,7 +8,6 @@ var/cache/libvirt/qemu
var/lib/libvirt/boot
var/lib/libvirt/images
var/lib/libvirt/qemu
var/lib/libvirt/qemu/channel/target
var/lib/libvirt/sanlock
var/log/libvirt/lxc
var/log/libvirt/qemu
......@@ -74,8 +74,6 @@ add_statoverrides()
QEMU_DIRS="
/var/lib/libvirt/qemu/
/var/lib/libvirt/qemu/channel/
/var/lib/libvirt/qemu/channel/target/
"
SANLOCK_DIR="/var/lib/libvirt/sanlock"
......@@ -124,6 +122,14 @@ case "$1" in
rmdir --ignore-fail-on-non-empty /var/log/libvirt/uml
fi
# Directories used for channels until 9.7.0-1
if [ -d /var/lib/libvirt/qemu/channel/target ]; then
rmdir --ignore-fail-on-non-empty /var/lib/libvirt/qemu/channel/target
fi
if [ -d /var/lib/libvirt/qemu/channel ]; then
rmdir --ignore-fail-on-non-empty /var/lib/libvirt/qemu/channel
fi
# Force refresh of capabilities (#731815)
rm -f /var/cache/libvirt/qemu/capabilities/*.xml
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment