From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 2AqeFbCww192EQAA0tVLHw (envelope-from ) for ; Sun, 29 Nov 2020 14:31:12 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id OId1EbCww1/qSAAA1q6Kng (envelope-from ) for ; Sun, 29 Nov 2020 14:31:12 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 13CCE940466 for ; Sun, 29 Nov 2020 14:31:12 +0000 (UTC) Received: from localhost ([::1]:53880 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kjNjK-0004Ac-UY for larch@yhetil.org; Sun, 29 Nov 2020 09:31:11 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:47566) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kjNjC-00048x-Nz for guix-patches@gnu.org; Sun, 29 Nov 2020 09:31:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:38564) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kjNjC-0005MJ-ER for guix-patches@gnu.org; Sun, 29 Nov 2020 09:31:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kjNjC-00022J-8m for guix-patches@gnu.org; Sun, 29 Nov 2020 09:31:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#44800] [PATCH v2 3/3] Use substitute servers on the local network. Resent-From: Mathieu Othacehe Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 29 Nov 2020 14:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44800 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 44800@debbugs.gnu.org Received: via spool by 44800-submit@debbugs.gnu.org id=B44800.16066602077681 (code B ref 44800); Sun, 29 Nov 2020 14:31:02 +0000 Received: (at 44800) by debbugs.gnu.org; 29 Nov 2020 14:30:07 +0000 Received: from localhost ([127.0.0.1]:50110 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kjNiI-0001zn-8R for submit@debbugs.gnu.org; Sun, 29 Nov 2020 09:30:06 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57382) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kjNiF-0001yy-Vd for 44800@debbugs.gnu.org; Sun, 29 Nov 2020 09:30:04 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:34030) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kjNiA-0004t3-8w; Sun, 29 Nov 2020 09:29:58 -0500 Received: from [2a01:e0a:19b:d9a0:1000:9314:5b51:f241] (port=41468 helo=cervin) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kjNi8-00088R-TA; Sun, 29 Nov 2020 09:29:57 -0500 From: Mathieu Othacehe References: <20201124132145.217751-1-othacehe@gnu.org> <20201124132145.217751-4-othacehe@gnu.org> <87lfemr995.fsf@gnu.org> Date: Sun, 29 Nov 2020 15:29:55 +0100 In-Reply-To: <87lfemr995.fsf@gnu.org> ("Ludovic =?UTF-8?Q?Court=C3=A8s?="'s message of "Fri, 27 Nov 2020 18:37:42 +0100") Message-ID: <87blfgqlr0.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -3.3 (---) X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -2.78 X-Scanner: ns3122888.ip-94-23-21.eu Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-TUID: WV/C6dfG5MWo Hey, > How about =E2=80=98--discover-substitute-servers=E2=80=99 or =E2=80=98--d= iscover-substitutes=E2=80=99 or > even =E2=80=98--discover=E2=80=99? "--discover" seems nice. > I think we need a note about the performance, security, and privacy > implications of this here, namely: > > 0. It might be faster/less expensive than fetching from remote > servers;=20 > > 1. There are no security risks, only genuine substitutes will be used > (add cross-ref); > > 2. An attacker advertising =E2=80=98guix publish=E2=80=99 on your LAN c= annot serve you > malicious binaries, but they can learn what software you=E2=80=99re > installing. > > 3. Servers may serve substitute over HTTP, unencrypted, so anyone on > the LAN can see what software you=E2=80=99re installing. I added a variant of this snippet to the documentation. > IWBN to have an action of the Shepherd service to turn it on and off; > you might want to do that depending on how much you trust the LAN you=E2= =80=99re > on. (That can come later though.) Yup, I agree. > Aren=E2=80=99t we partly duplicating what avahi-daemon=E2=80=99s already = doing? > avahi-daemon maintains a list of currently valid advertisements, which > can be seen with: > > avahi-browse --cache _workstation._tcp > > However, that cache first needs to be initialized by running the same > command without =E2=80=98--cache=E2=80=99. Hmm, maybe there=E2=80=99s no= other choice. I > wonder how others deal with that. If the local network machines are connected with multiple interfaces such as Wifi and Ethernet, then the discovered services will appear multiple times, regardless of the "cache" option I think. Couldn't find any useful resources about that, someone maybe? > Just set a variable local to this file and that=E2=80=99s enough. You st= ill > need the second line so that (guix scripts substitute) knows whether it > should read the thing. Right, fixed. > Imagine: you=E2=80=99re at GuixCon 2021, there are 500 participants all o= f which > are running =E2=80=98guix publish --advertise=E2=80=99; every Guix operat= ion leads to > everyone=E2=80=99s Guix talking to every other person=E2=80=99s Guix, the= whole thing > gets slow as hell, 500 people staring at =E2=80=9Cupdating list of substi= tutes=E2=80=9D, > 500 people eventually giving up and signing up for CONDACon. Haha, that would be a shame. I limited the number of local substitute servers to 50. Maybe that's too high. I think that we will be able to fine tune this value once we have more experience with it. Deploying this mechanism on berlin will probably help. > Also, we must make sure =E2=80=98guix substitute=E2=80=99 gracefully hand= les disconnects > and servers still advertised but no longer around (timeouts etc.) > > We=E2=80=99ll need real world tests to see how it behaves I think. In the > meantime, we can describe it as a technology preview=E2=84=A2 in the manu= al. Sure, I described this option as "experimental" in the documentation. Regarding the disconnections and timeouts, there's probably some work, but I think it's transverse to this development. Pushed the whole patchset, taking your remarks into account. Thanks again for reviewing. Thanks, Mathieu