[libvirt] [PATCH v2] logging: Don't inhibit shutdown in system daemon
Daniel P. Berrangé
berrange at redhat.com
Thu Apr 26 10:37:29 UTC 2018
On Thu, Apr 26, 2018 at 12:32:27PM +0200, Martin Kletzander wrote:
> That is a job of libvirtd and virtlogd has a dependency on it, so that will
> prevent it properly. Doing it one extra time in virtlogd might also cause AVC
> denials because it is not allowed to call that dbus method.
>
> Caused by commit df34363d58bb.
>
> Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1547250
>
> Signed-off-by: Martin Kletzander <mkletzan at redhat.com>
> ---
> I have an idea how to make this way nicer, but it requires a rework and maybe
> people will not like it as much, so for now this is the preferred fix.
>
> v2:
> - Don't revert the shutdown inhibition for all instances, only for the system
> one.
>
> v1:
> - https://www.redhat.com/archives/libvir-list/2018-April/msg02381.html
>
> src/logging/log_daemon.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/src/logging/log_daemon.c b/src/logging/log_daemon.c
> index 35d7ebb6d2bb..91bd9d0b9052 100644
> --- a/src/logging/log_daemon.c
> +++ b/src/logging/log_daemon.c
> @@ -128,6 +128,12 @@ virLogDaemonInhibitor(bool inhibit, void *opaque)
> {
> virLogDaemonPtr dmn = opaque;
>
> + /* virtlogd uses inhibition only to stop session daemon being killed after
> + * the specified timeout, for the system daemon this is taken care of by
> + * libvirtd and the dependencies between the services. */
> + if (virNetDaemonIsPrivileged(dmn->dmn))
> + return;
> +
> if (inhibit)
> virNetDaemonAddShutdownInhibition(dmn->dmn);
> else
Reviewed-by: Daniel P. Berrangé <berrange at redhat.com>
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
More information about the libvir-list
mailing list