From: Roel Janssen <roel@gnu.org>
To: Ricardo Wurmus <rekado@elephly.net>
Cc: guix-devel@gnu.org
Subject: Re: “guix gc”, auto gcroots, cluster deployments
Date: Mon, 10 May 2021 17:45:30 +0200 [thread overview]
Message-ID: <7c642c5ca7a0986e6877cdefb6b1f872942f03ba.camel@gnu.org> (raw)
In-Reply-To: <87a6p2pzok.fsf@elephly.net>
On Mon, 2021-05-10 at 13:59 +0200, Ricardo Wurmus wrote:
>
> Hi Roel,
>
> thanks for your feedback!
>
> > Would it be possible to add an option to retrospectively apply
> > this
> > transformation? Maybe that could work somewhat like this:
> >
> > $ ls -lha
> > ... /home/me/projects/mrg1_chipseq/.guix-profile-1-link ->
> > /gnu/store/ap0vrfxjdj57iqdapg8q83l4f7aylqzm-profile
>
> This wouldn’t work, because we can’t read
> /home/me/projects/mrg1_chipseq/.guix-profile-1-link centrally. In
> this particular case only the user “me” could resolve the link and
> thus migrate the link. (I would do this semi-manually by
> impersonating the users to read their links.)
>
Indeed we cannot resolve /home/me/projects/mrg1_chipseq/.guix-profile-
1-link as another user than "me". So "me" would have to run the
hypothetical "guix gc --synchronize-profiles-to-gcroots".
From my point of view, that would be fine. We can simply ask the users
on the cluster to execute that command once.
This could work if we have a mechanism to determine how complete the
garbage-collection picture for "root" is, and only continue GCing when
the picture is complete. A starting point for this is
$localstatedir/gcroots/auto which provides an overview of all profiles
that have been created. Perhaps we can reuse the filename of the
symlink. So in the example given in the previous e-mail we could add
another link like so, but in a different directory:
8ypp8dmwnydgbsgjcms2wyb32mng0wri -> /gnu/store/...-profile
For which this already existed in $localstatedir/gcroots/auto:
8ypp8dmwnydgbsgjcms2wyb32mng0wri ->
/home/me/projects/mrg1_chipseq/.guix-profile-1-link
And then a one-time transition can be made by looking up
8ypp8dmwnydgbsgjcms2wyb32mng0wri in both places.
Maybe I'm making things needlessly complex, but I would really like a
solution that can be applied to an existing cluster setup. :)
So, your initial proposal sounds good to me already. How it could be
made more useful for the retrospective matching of unreachable symlinks
to /gnu/store paths can be considered a separate issue to solve.
> ~ ~ ~
>
> Another related problem I found is that the names of the links in
> unreadable space may have names that only make sense on the system
> where they were created. For example, on the server “beast” we
> may mount the cluster home directory as “/clusterhome/me”, whereas
> on cluster nodes it would be mounted as “/home/me”. When I have
> Guix record a gcroot while working on “beast” I would get a link
> that is no longer valid when I work on the cluster.
>
Yes, I agree that this is another reason to implement your suggested
change. :)
Kind regards,
Roel Janssen
next prev parent reply other threads:[~2021-05-10 15:46 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-10 9:59 “guix gc”, auto gcroots, cluster deployments Ricardo Wurmus
2021-05-10 10:59 ` Roel Janssen
2021-05-10 11:59 ` Ricardo Wurmus
2021-05-10 15:45 ` Roel Janssen [this message]
2021-05-10 16:23 ` Ricardo Wurmus
2021-05-11 20:42 ` Ludovic Courtès
2021-05-10 13:40 ` Sébastien Lerique
2021-05-10 13:59 ` Guix on NFS Ricardo Wurmus
2021-05-11 20:50 ` “guix gc”, auto gcroots, cluster deployments Ludovic Courtès
2021-05-14 10:21 ` Ricardo Wurmus
2021-06-08 12:55 ` Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7c642c5ca7a0986e6877cdefb6b1f872942f03ba.camel@gnu.org \
--to=roel@gnu.org \
--cc=guix-devel@gnu.org \
--cc=rekado@elephly.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).