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 kE7VLR+WBV8aYwAA0tVLHw (envelope-from ) for ; Wed, 08 Jul 2020 09:47: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 SIKAKR+WBV/jJAAAbx9fmQ (envelope-from ) for ; Wed, 08 Jul 2020 09:47: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 EDF2D940390 for ; Wed, 8 Jul 2020 09:47:10 +0000 (UTC) Received: from localhost ([::1]:35652 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jt6fV-0008Ur-Lf for larch@yhetil.org; Wed, 08 Jul 2020 05:47:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59610) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jt6fO-0008Ua-1Q for bug-guix@gnu.org; Wed, 08 Jul 2020 05:47:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:54103) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jt6fN-0008DO-Nq for bug-guix@gnu.org; Wed, 08 Jul 2020 05:47:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jt6fN-0002As-Lu for bug-guix@gnu.org; Wed, 08 Jul 2020 05:47:01 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#42252: Not possible to reliably port forward with "guix system vm" anymore Resent-From: Bengt Richter Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Wed, 08 Jul 2020 09:47:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42252 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Christopher Lemmer Webber Received: via spool by 42252-submit@debbugs.gnu.org id=B42252.15942016068336 (code B ref 42252); Wed, 08 Jul 2020 09:47:01 +0000 Received: (at 42252) by debbugs.gnu.org; 8 Jul 2020 09:46:46 +0000 Received: from localhost ([127.0.0.1]:37416 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jt6f8-0002AO-6t for submit@debbugs.gnu.org; Wed, 08 Jul 2020 05:46:46 -0400 Received: from imta-38.everyone.net ([216.200.145.38]:45954) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jt6f5-0002AE-6h for 42252@debbugs.gnu.org; Wed, 08 Jul 2020 05:46:44 -0400 Received: from pps.filterd (omta003.sj2.proofpoint.com [127.0.0.1]) by imta-38.everyone.net (8.16.0.27/8.16.0.27) with SMTP id 0689fPn8002390; Wed, 8 Jul 2020 02:46:41 -0700 X-Eon-Originating-Account: 3n4lEhwOdPwlqumsaTqiGA9Z-o2Vx0G_X6BTTs1FyDE X-Eon-Dm: m0116953.ppops.net Received: by m0116953.mta.everyone.net (EON-AUTHRELAY2 - 5a81cab6) id m0116953.5ef25221.192aaf; Wed, 8 Jul 2020 02:46:38 -0700 X-Eon-Sig: AQMHrIJfBZX+sALbUAIAAAAC,654530c4d1280b51f475c69518ca732f X-Eip: j470cjgYZ_tYjuwH4-6MLccKWGU8kO01ILyGgbEHEoM Date: Wed, 8 Jul 2020 11:46:28 +0200 From: Bengt Richter Message-ID: <20200708094628.GA9946@LionPure> References: <87r1tnf496.fsf@dustycloud.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <87r1tnf496.fsf@dustycloud.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235, 18.0.687 definitions=2020-07-08_07:2020-07-08, 2020-07-08 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1034 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-2004280000 definitions=main-2007080070 X-Spam-Score: -0.4 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -1.4 (-) X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Bengt Richter Cc: 42252@debbugs.gnu.org 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: -0.51 X-TUID: Zssxnm9WWM9O Hi On +2020-07-07 16:40:21 -0400, Christopher Lemmer Webber wrote: > 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. > This reminds a bit of doctors prescribing powerful medicine with side-effect so bad that they have to prescribe a medicine for that, which in turn has side-effects, in what I think is called prescription cascading, and people wind up on 25 pills a day. "First, do no harm." :) I wouldn't say anything, except ISTM your fix on top of a fix is not the first to remind me of cascading :) > 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 > > > I'm not saying your solution is bad, I'm just saying cascading fixes may be a symptom to diagnose, in case it indicates something like bad mutations involving bad genes that will compromise the health of the guix ecology. How is a "fix" judged with respect to the big picture? Is there a higher level layered[1] design for the use of guix, like e.g. [2] which a proposed fix might violate and therefore should be rejected, even though it makes something "work"? Well, it's probably in an old paper by Ludo in some form, but I wonder what concepts of layering guix developers are consciously using when putting stuff between the declarations at the top and the images at the bottom. [1] https://en.wikipedia.org/wiki/Abstraction_layer [2] https://en.wikipedia.org/wiki/OSI_model -- Regards, Bengt Richter