** Description changed: + [Impact] + + * The feature of qemu-guest agent to run freeze hooks is used rarely but + where used important to get data consistency right. Due to a path error + when packaging the script (from upstream) it is currently not working + at all (it calls a non existing path and even if you'd use the current + path it would fail to find the potential drop-ins in its .d directory). + + * Without the fix users need to fix up things manually, but with it this + would finally "just work". So move it to the place qemu-guest-agent + expects the script. + + [Test Case] + + * 1. check the systemd service that no options are set (the default) + /lib/systemd/system/qemu-guest-agent.service + It will look like: + ExecStart=-/usr/sbin/qemu-ga + 2. without options set at #1 it will look for the script at the path: + /etc/qemu/fsfreeze-hook + => check that the executable script is at that path + + Before fix: it is a directory of the same name with the file in it + After fix: location of the file is now as expected + + Extended test (optional): + If you set up qemu guest agent [1] then you can drop executable snippets + in /etc/qemu/fsfreeze-hook.d + Those have to be executed when you trigger them from the host e.g. via + $ virsh domfsfreeze <domainname> + + [1]: https://wiki.libvirt.org/page/Qemu_guest_agent + + [Regression Potential] + + * If users have manually fixed this up in unexpected ways then placing it + at the correct place might affect their fixup. Chances are high that + they will then see at least a conffile prompt (chosen the new path) or + that the fixup code in the maintainer scripts will take an early exit + (old path not existing) - both cases are safe. + In general qemu-guest-agent is rarely used and even if it is, then + freeze hooks again only affect a sub-portion of these users. For those + it is important to work, but even if it would be broken it will not + affect a major share of our overall qemu users and use-cases. + + [Other Info] + + * The fact that the new and required path of the file is in the old + version a directory breaks some requirements of mv_conffile and makes + this slightly more complex than one would think at first. + + --- + The fsfreeze-hook in the package is installed on the path /etc/qemu /fsfreeze-hook/fsfreeze-hook but the default path is /etc/qemu/fsfreeze- hook. This means that to make it work, I had to: - add "-F/etc/qemu/fsfreeze-hook/fsfreeze-hook" to the DAEMON_ARGS in /etc/default/qemu-guest-agent - create a symlink /etc/qemu/fsfreeze-hook/fsfreeze-hook.d -> /etc/qemu/fsfreeze-hook.d to allow the fsfreeze-hook to find the scripts (it looks for them in FSFREEZE_D=$(dirname -- "$0")/fsfreeze-hook.d) - - To fix this I propose to either move the fsfreeze-hook to /etc/qemu/fsfreeze-hook as qemu-guest-agent expects it or add "-F/etc/qemu/fsfreeze-hook/fsfreeze-hook" to the init script and change the fsfreeze-hook accordingly. + To fix this I propose to either move the fsfreeze-hook to /etc/qemu + /fsfreeze-hook as qemu-guest-agent expects it or add "-F/etc/qemu + /fsfreeze-hook/fsfreeze-hook" to the init script and change the + fsfreeze-hook accordingly.
-- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1820291 Title: fsfreeze-hook script is misplaced in qemu-guest-agent To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/qemu/+bug/1820291/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
