guix-devel
[Top][All Lists]
Advanced

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

Re: “guix gc”, auto gcroots, cluster deployments


From: Ludovic Courtès
Subject: Re: “guix gc”, auto gcroots, cluster deployments
Date: Tue, 11 May 2021 22:50:37 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)

Hi!

Ricardo Wurmus <rekado@elephly.net> skribis:

> There are two problems here:
>
> 1) I don’t think “guix gc --list-dead” (or “--list-live”, or more
> generally “findRoots” in nix/libstore/gc.cc) should delete 
> anything.  It should just list and not clean up.

Maybe ‘findRoots’ could populate the list of stale roots and it’d be up
to the caller to decide whether to delete them or not?

> 2) For cluster installations with remote file systems perhaps there’s
> something else we can do to record gcroots.  We now have this
> excursion into unreadable space because we use a symlink, but the
> start ($localstatedir/gcroots/auto) and endpoints (/gnu/store/…) are
> both accessible by the daemon.  Since these intermediate locations are
> tied to user accounts, could we not store them in a per-user
> directory?
>
> This problem does not exist for user profiles, because the link in
> unreadable home directories is not all that important; it merely 
> points to $localstatedir, which is always readable by the
> daemon. Perhaps we could do the same for temporary roots and let
> *users* decide when to let go of them by giving them a command to
> erase the important links in $localstatedir.
>
> So instead of having a link from
> /gnu/var/guix/gcroots/auto/8ypp8dmwnydgbsgjcms2wyb32mng0wri to 
> /home/me/projects/mrg1_chipseq/.guix-profile-1-link pointing to
> /gnu/store/ap0vrfxjdj57iqdapg8q83l4f7aylqzm-profile, we would 
> record
> /var/guix/profiles/per-user/me/auto/8ypp8dmwnydgbsgjcms2wyb32mng0wri 
> pointing to /gnu/store/ap0vrfxjdj57iqdapg8q83l4f7aylqzm-profile, and
> then point /home/me/projects/mrg1_chipseq/.guix-profile-1-link at
> that.  Yes, removing
> /home/me/projects/mrg1_chipseq/.guix-profile-1-link would no 
> longer free up the profile for garbage collection, but removing
> $(readlink /home/me/projects/mrg1_chipseq/.guix-profile-1-link) 
> would.

Yes, but how would per-user/me/auto/* be cleaned up?

It seems to be that as long as the final symlink can live the home
directories, the GC needs to have access to those home directories to
determine whether that symlink is still a GC root.

Tricky!

Ludo’.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]