Re: [PATCH v2] logging: Don't inhibit shutdown in system daemon

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
> ---
> 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@xxxxxxxxxx>


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 :|

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux