On 12/17/24 12:15, Daniel P. Berrangé wrote:
> We recently wired up inhibitors in the network driver to prevent
> auto-shutdown of libvirtd/virtnetworkd when virtual networks are
> active. This is to prevent the repeated re-creation of firewall
> rules which happens on daemon startup.
>
> Unfortunately we forgot that an inhibition on libvirt daemon
> shutdown *also* gets unconditionally turned into an inhibition
> on OS shutdown :-(
>
> In fixing this I realized this is actually the second such
> mistakes, because a few years ago we made the virtsecretd daemon
> inhibit when ephemeral secrets are present, and that really has
> no justification for blocking system shutdown either.
>
> Daniel P. Berrangé (3):
> util: introduce object for holding a system inhibitor lock
> src: convert drivers over to new virInhibitor APIs
> rpc: remove logind support for virNetDaemon
>
> po/POTFILES | 1 +
> src/libvirt_private.syms | 7 +
> src/libxl/libxl_conf.h | 9 +-
> src/libxl/libxl_domain.c | 6 +-
> src/libxl/libxl_driver.c | 15 ++-
> src/lxc/lxc_conf.h | 9 +-
> src/lxc/lxc_driver.c | 13 +-
> src/lxc/lxc_process.c | 9 +-
> src/network/bridge_driver.c | 20 +--
> src/network/bridge_driver_conf.h | 9 +-
> src/qemu/qemu_conf.h | 9 +-
> src/qemu/qemu_driver.c | 12 +-
> src/qemu/qemu_process.c | 9 +-
> src/rpc/virnetdaemon.c | 78 -----------
> src/secret/secret_driver.c | 46 +++----
> src/util/meson.build | 1 +
> src/util/virinhibitor.c | 214 +++++++++++++++++++++++++++++++
> src/util/virinhibitor.h | 58 +++++++++
> 18 files changed, 361 insertions(+), 164 deletions(-)
> create mode 100644 src/util/virinhibitor.c
> create mode 100644 src/util/virinhibitor.h
>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Michal