From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Thompson, David" Subject: building "guix deploy" Date: Sat, 9 Mar 2019 23:29:04 +0000 Message-ID: References: <87k2wx6t1e.fsf@fsf.org> <87h8da5u5k.fsf@dustycloud.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([209.51.188.92]:35808) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h2lPN-0002Mv-Iv for guix-devel@gnu.org; Sat, 09 Mar 2019 18:29:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h2lPM-0006uo-8k for guix-devel@gnu.org; Sat, 09 Mar 2019 18:29:37 -0500 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]:36524) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h2lPG-0006k3-SW for guix-devel@gnu.org; Sat, 09 Mar 2019 18:29:32 -0500 Received: by mail-wr1-x436.google.com with SMTP id o17so1215860wrw.3 for ; Sat, 09 Mar 2019 15:29:17 -0800 (PST) In-Reply-To: <87h8da5u5k.fsf@dustycloud.org> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: guix-devel Hello everyone! Chris Webber and I spent the morning chatting about how we want to approach making "guix deploy" a reality and then started hacking on it in the afternoon. Although we weren't able to complete a working prototype by the end of the day, we were able to get pretty close. We created a 'guix deploy' CLI to build derivations for any number of remote systems on a local workstation and initiate the transfer to the remote systems, but we encountered a difficult to debug SSH error that blocked our progress: sending 85 store items (0 MiB) to 'test.activitypub.rocks'... exporting path `/gnu/store/ylcdmrj3vf00ixdcjvkl3mbs8f5i9w8l-git-minimal-2.2= 0.1.drv' ;;; [2019/03/09 17:32:48.792589, 0] write_to_channel_port: [GSSH ERROR] Remote channel is closed: # Backtrace: 10 (apply-smob/1 #) In ice-9/boot-9.scm: 705:2 9 (call-with-prompt _ _ #) In ice-9/eval.scm: 619:8 8 (_ #(#(#))) In guix/ui.scm: 1654:12 7 (run-guix-command _ . _) In guix/scripts/deploy.scm: 72:8 6 (guix-deploy . _) In srfi/srfi-1.scm: 640:9 5 (for-each # =E2=80=A6) In guix/scripts/deploy.scm: 74:20 4 (_ _) In gnu/machine.scm: 58:22 3 (_ _ _ _) In guix/ssh.scm: 313:4 2 (send-files # _ _ # _ # =E2= =80=A6) In guix/store.scm: 1504:7 1 (export-paths # _ # =E2=80=A6) In unknown file: 0 (put-bytevector # =E2=80= =A6) ERROR: In procedure put-bytevector: Throw to key `guile-ssh-error' with args `("write_to_channel_port" "Remote channel is closed" # #f)'. If anyone knows what might be going on here and how we could resolve it, your input would be much appreciated! We verified via the sshd logs that we were indeed successfully establishing a connection. Once we're past this blocking issue and are able to transfer OS closures to remote systems, we plan to write a modified version of switch-to-system that uses guile-ssh to switch remote symlinks for the active system and run the activation script. We'll save upgrade-shepherd-services for later, as it is quite a bit more complex. There's not a lot of code yet, but you can check it out in the wip-deploy2 branch. Currently, the only supported use-case is running the equivalent of 'guix system reconfigure' on machines already running GuixSD that have an OpenSSH daemon running, but the basic design allows for additional use-cases to be supported in the future. Thanks to Ricardo for his install-berlin.scm script that provided a basis for most of our code, and to Ludovic for the (guix ssh) module that I wish I had when I attempted to write 'guix deploy' all those years ago. Until next time... - Dave