unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Mathieu Othacehe <othacehe@gnu.org>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 44800@debbugs.gnu.org
Subject: [bug#44800] [PATCH v2 3/3] Use substitute servers on the local network.
Date: Sun, 29 Nov 2020 15:29:55 +0100	[thread overview]
Message-ID: <87blfgqlr0.fsf@gnu.org> (raw)
In-Reply-To: <87lfemr995.fsf@gnu.org> ("Ludovic Courtès"'s message of "Fri, 27 Nov 2020 18:37:42 +0100")


Hey,

> How about ‘--discover-substitute-servers’ or ‘--discover-substitutes’ or
> even ‘--discover’?

"--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; 
>
>   1. There are no security risks, only genuine substitutes will be used
>      (add cross-ref);
>
>   2. An attacker advertising ‘guix publish’ on your LAN cannot serve you
>      malicious binaries, but they can learn what software you’re
>      installing.
>
>   3. Servers may serve substitute over HTTP, unencrypted, so anyone on
>      the LAN can see what software you’re 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’re
> on.  (That can come later though.)

Yup, I agree.

> Aren’t we partly duplicating what avahi-daemon’s 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 ‘--cache’.  Hmm, maybe there’s 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’s enough.  You still
> need the second line so that (guix scripts substitute) knows whether it
> should read the thing.

Right, fixed.

> Imagine: you’re at GuixCon 2021, there are 500 participants all of which
> are running ‘guix publish --advertise’; every Guix operation leads to
> everyone’s Guix talking to every other person’s Guix, the whole thing
> gets slow as hell, 500 people staring at “updating list of substitutes”,
> 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 ‘guix substitute’ gracefully handles disconnects
> and servers still advertised but no longer around (timeouts etc.)
>
> We’ll need real world tests to see how it behaves I think.  In the
> meantime, we can describe it as a technology preview™ in the manual.

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




  reply	other threads:[~2020-11-29 14:31 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-22 15:56 [bug#44800] [PATCH 0/2] publish: Add Avahi support Mathieu Othacehe
2020-11-22 15:56 ` [bug#44802] [PATCH 1/2] " Mathieu Othacehe
2020-11-22 15:56 ` [bug#44801] [PATCH 2/2] publish: Add avahi support Mathieu Othacehe
2020-11-23 22:04 ` [bug#44800] [PATCH 0/2] publish: Add Avahi support zimoun
2020-11-24 13:35   ` Mathieu Othacehe
2020-11-24 13:21 ` [bug#44800] [PATCH v2 0/3] " Mathieu Othacehe
2020-11-24 13:21   ` [bug#44800] [PATCH v2 1/3] " Mathieu Othacehe
2020-11-27 17:04     ` Ludovic Courtès
2020-11-27 17:09       ` zimoun
2020-11-28 11:02         ` Ludovic Courtès
2020-11-28 18:59           ` zimoun
2020-11-29 14:18       ` Mathieu Othacehe
2020-11-24 13:21   ` [bug#44800] [PATCH v2 2/3] publish: Add avahi support Mathieu Othacehe
2020-11-27 17:12     ` Ludovic Courtès
2020-11-29 14:19       ` Mathieu Othacehe
2020-11-24 13:21   ` [bug#44800] [PATCH v2 3/3] Use substitute servers on the local network Mathieu Othacehe
2020-11-27 17:37     ` Ludovic Courtès
2020-11-29 14:29       ` Mathieu Othacehe [this message]
2020-11-30 13:46         ` Ludovic Courtès
2020-12-01  8:43           ` bug#44800: " Mathieu Othacehe
2020-11-27 16:54   ` [bug#44800] [PATCH v2 0/3] publish: Add Avahi support 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=87blfgqlr0.fsf@gnu.org \
    --to=othacehe@gnu.org \
    --cc=44800@debbugs.gnu.org \
    --cc=ludo@gnu.org \
    /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).