From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id kOZdIefdBF+/RQAA0tVLHw (envelope-from ) for ; Tue, 07 Jul 2020 20:41:11 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id mKEmHefdBF8nDwAAbx9fmQ (envelope-from ) for ; Tue, 07 Jul 2020 20:41:11 +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 151369403C7 for ; Tue, 7 Jul 2020 20:41:10 +0000 (UTC) Received: from localhost ([::1]:38804 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jsuOr-00087o-T2 for larch@yhetil.org; Tue, 07 Jul 2020 16:41:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38690) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jsuOk-00087g-B4 for bug-guix@gnu.org; Tue, 07 Jul 2020 16:41:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:53445) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jsuOk-0007va-1c for bug-guix@gnu.org; Tue, 07 Jul 2020 16:41:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jsuOj-00085Q-Uy for bug-guix@gnu.org; Tue, 07 Jul 2020 16:41:01 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#42252: Not possible to reliably port forward with "guix system vm" anymore Resent-From: Christopher Lemmer Webber Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Tue, 07 Jul 2020 20:41:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 42252 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 42252@debbugs.gnu.org X-Debbugs-Original-To: bug-guix@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.159415442931032 (code B ref -1); Tue, 07 Jul 2020 20:41:01 +0000 Received: (at submit) by debbugs.gnu.org; 7 Jul 2020 20:40:29 +0000 Received: from localhost ([127.0.0.1]:36758 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jsuOC-00084S-UV for submit@debbugs.gnu.org; Tue, 07 Jul 2020 16:40:29 -0400 Received: from lists.gnu.org ([209.51.188.17]:37444) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jsuO9-00084G-9y for submit@debbugs.gnu.org; Tue, 07 Jul 2020 16:40:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38558) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jsuO9-000825-2U for bug-guix@gnu.org; Tue, 07 Jul 2020 16:40:25 -0400 Received: from dustycloud.org ([50.116.34.160]:35100) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jsuO7-0007mt-BW for bug-guix@gnu.org; Tue, 07 Jul 2020 16:40:24 -0400 Received: from twig (localhost [127.0.0.1]) by dustycloud.org (Postfix) with ESMTPS id 42C7B26617 for ; Tue, 7 Jul 2020 16:40:22 -0400 (EDT) User-agent: mu4e 1.4.9; emacs 26.3 From: Christopher Lemmer Webber Date: Tue, 07 Jul 2020 16:40:21 -0400 Message-ID: <87r1tnf496.fsf@dustycloud.org> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=50.116.34.160; envelope-from=cwebber@dustycloud.org; helo=dustycloud.org X-detected-operating-system: by eggs.gnu.org: First seen = 2020/07/07 16:18:54 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-Spam-Score: -1.3 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -2.3 (--) X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Spam-Score: -1.01 X-TUID: 61kjdtCLlPJh In commit 5379392731b52eef22b4936637eb592b93e04318, the following change was introduced: modified gnu/system/vm.scm @@ -941,6 +941,7 @@ with '-virtfs' options for the host file systems listed in SHARED-FS." '()) "-no-reboot" + "-nic" "user,model=virtio-net-pci" "-object" "rng-random,filename=/dev/urandom,id=guixsd-vm-rng" "-device" "virtio-rng-pci,rng=guixsd-vm-rng" Unfortunately, this means that in our docs where we suggest doing the following: `guix system vm config.scm` -nic user,model=virtio-net-pci,hostfwd=tcp::10022-:22 Since we now provide our own similar "-nic" field this creates a *second* network interface at the same address and there is a race as in terms of which handles connections. Depending on the race result, connections to the forwarded port may hang indefinitely. Ironically, this regression was introduced to solve another regression! >From the commit message: This fixes a regression introduced in 8e53fe2b91d2776bc1529e7b34967c8f1d9edc32 where 'guix system vm' would no longer be using virtio. What's the right solution? One could be that "guix system vm" itself could take an argument that sets up port forwarding in the generated shell script. Eg: guix system vm config.scm --hostfwd=tcp::10022-:22 --hostfwd=tcp::8888-:80 kind of ugly, but it could work. WDYT? - Chris