From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludovic.courtes@inria.fr (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: ~/.config/guix/current Date: Thu, 12 Jul 2018 10:26:53 +0200 Message-ID: <87601kyi42.fsf@inria.fr> References: <87o9foz7f4.fsf@eta.cs.prv> <877em4iq1g.fsf@gnu.org> <87d0vt3hcg.fsf@eta.cs.prv> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:34035) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fdWwG-0000Ll-PD for help-guix@gnu.org; Thu, 12 Jul 2018 04:27:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fdWwD-0006nQ-Ig for help-guix@gnu.org; Thu, 12 Jul 2018 04:27:00 -0400 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:15315) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fdWwD-0006iL-6K for help-guix@gnu.org; Thu, 12 Jul 2018 04:26:57 -0400 In-Reply-To: <87d0vt3hcg.fsf@eta.cs.prv> (Mikhail Kryshen's message of "Wed, 11 Jul 2018 18:46:55 +0300") List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org Sender: "Help-Guix" To: Mikhail Kryshen Cc: help-guix@gnu.org Hello Mikhail, Mikhail Kryshen skribis: > Ludovic Court=C3=A8s writes: > >>> a) master node running guix-daemon [1] >>> - will "guix gc" destroy guix/current profiles if /home is not >>> mounted on the master node? What if some users have local >>> home directories and some are on nfs? >> >>> [1] https://guix-hpc.bordeaux.inria.fr/blog/2017/11/installing-guix-on-= a-cluster/ >> >> This is what I would recommend, and as the post suggests, you=E2=80=99ll= have to >> make sure home directories are visible to guix-daemon, which means >> having them mounted on the master node. >> >> If you don=E2=80=99t do that, there=E2=80=99s a risk that user-pulled Gu= ixes will be >> reclaimed prematurely, simply because the GC won=E2=80=99t see that they= are >> still =E2=80=9Clive.=E2=80=9D > > But ~root is local on each machine, so root-pulled Guix will still not > be protected from gc. True, but in this configuration, only the root account of the master node really matters, and it=E2=80=99s protected from GC. > Btw, is option a) possible on GuixSD? I think so. Why wouldn=E2=80=99t it? >>> b) guix-daemon on every computer >>> - then /gnu/store and /var/guix/profiles will by local and user >>> profiles can be different on every computer, but >>> ~/.config/guix/current will link to nonexistent store item if >>> "guix pull" was invoked by the same user on a different machine. >> >> If this is a cluster, I would definitely recommend option a), which >> provides a single world view, shared storage, etc. > > It's for GNU/Linux workstations in university labs. I want to use Guix > to provide additional software that is not available in required > configuration in the host distro, and also give students an interesting > environment to experiment. > > I decided for now to go with the option b) for performance and > reliability. My previous attempts to deploy large software packages on > NFS (even with FS-Cache enabled) didn't work well. Also, it may be > possible to somehow exploit immutability of the store items to share and > cache them more efficiently. Yes, we use option a) on a cluster at Inria (and Roel and Ricardo have a similar setup at their institutes), and it works pretty well. >From a performance viewpoint, it=E2=80=99s important for the master node to= have the store on a local file system, so that things like GC and deduplication run quickly enough=E2=80=94these would be slow over NFS. For= the compute nodes, accessing packages over NFS is good enough. > The computers periodically run "guix pull" as root and I want to make > the updated Guix automatically available to all users, but > /usr/local/bin/guix can't be linked to > /root/.config/guix/current/bin/guix as the /root directory is normally > not searchable by other users =E2=80=94 another reason to keep pulled Guix > profiles in /var. I workaround this by having the script that runs > "guix pull" to symlink /usr/local/bin/guix directly into the new profile > in /gnu/store. I see. I=E2=80=99ll look into treating ~/.config/guix/current similarly to ~/.guix-profile. That would help for a setup like yours. >> I agree it would be useful (the way we do it on GuixSD is by having >> /etc/profile define INFOPATH systematically, for instance), but there=E2= =80=99s >> no clear way to have ~/.config/guix/current/etc/profile define them >> directly. > > It would be useful to have a similar script included in the guix package > to be symlinked into host distro's /etc/profile.d We could do that, though it wouldn=E2=80=99t help much: you=E2=80=99d have = to add one line to /etc/profile instead of adding two lines, essentially. Thanks, Ludo=E2=80=99.