Re: [PATCH RFC] util: pick a better runtime directory when XDG_RUNTIME_DIR isn't set

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

 



On Mon, Feb 17, 2025 at 02:14:49AM -0500, Laine Stump wrote:
> But sometimes XDG_RUNTIME_DIR isn't set in the user's environment.

Do you have examples of scenarios in which this happens, and
yet the /run/user/NNNN directory is still being created, as
that rather sounds like something is broken outside of libvirt.

>                libvirt actually depends on the directory being cleared
> out during a reboot - otherwise it might think that stale status files
> are indicating active guests when in fact the guests were shutdown
> during the reboot).

We could make our status files robust against host reboots by
storing "/proc/sys/kernel/random/boot_id" in them. If boot_id
has changed, we know the pidfile is stale.


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



[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