Message ID | 87frjays3p.fsf@sarg.org.ru |
---|---|
State | New |
Headers |
Return-Path: <guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org> X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id C24B527BBEA; Tue, 18 Mar 2025 20:59:23 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.3 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED,URIBL_SBL_A autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 46A2827BBE2 for <patchwork@mira.cbaines.net>; Tue, 18 Mar 2025 20:59:22 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <guix-patches-bounces@gnu.org>) id 1tue0m-0007Ot-O3; Tue, 18 Mar 2025 16:58:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1tue0h-0007OG-8S for guix-patches@gnu.org; Tue, 18 Mar 2025 16:58:03 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1tue0g-0005u1-Uy for guix-patches@gnu.org; Tue, 18 Mar 2025 16:58:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=ciHijTLr8/GUaBIfnUlipDS6ri0Gupe8Wd4EbOZdQ/A=; b=l0AMz1fiOjkN3JsZzp+7FCpECKSTOcqoSQ+ACzrdz/Ff/b7keDdhZt1L2OJYgher4CvEb2FeWXlTb5/a9yg+4PfaWVbaOE9wV6pKA31/3lwYxrz9cqBLPBh3h0oXxp2ElfyyiYwHq9KQqQJ3fd9vyEo4u6tHSWVQUDtgc8Qj4sVmhvjsCCZ/4IYOlnYLRSnXwd15TBRxqTxbXJWko9HbE9mjAhnOAKvDLDUMgpjGR7ssaEaTnkZuybpzXJxI0lPpWEHNzBKZSBuVcNDRmzyuA3A1y1u8mkSodeIK57oLFYWW4t+gyRc+phkrxcr6Q/nSBxcMibtb5YJzvlIdWkrcvQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1tue0g-0003TF-Ox for guix-patches@gnu.org; Tue, 18 Mar 2025 16:58:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#77033] [PATCH] deploy: Support --target and --system. Resent-From: Sergey Trofimov <sarg@sarg.org.ru> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org> Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 18 Mar 2025 20:58:02 +0000 Resent-Message-ID: <handler.77033.B77033.174233146613198@debbugs.gnu.org> Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 77033 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Roman Scherer <roman.scherer@burningswell.com> Cc: ludo@gnu.org, 77033@debbugs.gnu.org Received: via spool by 77033-submit@debbugs.gnu.org id=B77033.174233146613198 (code B ref 77033); Tue, 18 Mar 2025 20:58:02 +0000 Received: (at 77033) by debbugs.gnu.org; 18 Mar 2025 20:57:46 +0000 Received: from localhost ([127.0.0.1]:43530 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>) id 1tue0M-0003QL-QP for submit@debbugs.gnu.org; Tue, 18 Mar 2025 16:57:45 -0400 Received: from mail-ej1-x635.google.com ([2a00:1450:4864:20::635]:57700) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <sarg@sarg.org.ru>) id 1tue0J-0003PC-Lc for 77033@debbugs.gnu.org; Tue, 18 Mar 2025 16:57:40 -0400 Received: by mail-ej1-x635.google.com with SMTP id a640c23a62f3a-ac25520a289so1063913966b.3 for <77033@debbugs.gnu.org>; Tue, 18 Mar 2025 13:57:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sarg.org.ru; s=google; t=1742331453; x=1742936253; darn=debbugs.gnu.org; h=mime-version:message-id:date:user-agent:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=ciHijTLr8/GUaBIfnUlipDS6ri0Gupe8Wd4EbOZdQ/A=; b=aeMcX4kCewpWjgSyVeUC62j0kYaRKtZZ63ajtWIwyMGkieDvZFjkOpTMTjbzW8ikNi oroVGqteIv6a94mbWAnCL+EaU1B59dZoHLfl2yNNw+R0icJ4abGjsehV1LYOIHCybQYM lkPAttRCFr96TBck0DmTUllewFbp9EJ7TpfSrcKFiSaYNDZ3LNw2AsWY+u+hXoTp1sfC J8w/AT82L0UBxEX9D+8kdf3NpMNynjsYwHkZgi/s2mQOHyfV/2qoXGA6cyQdlXWlYkGZ flmN7ODi5F7rT+KO2mBFUFbthDNv3NU77cvAYKwaCRRp1LmBXgkt33GAES79gcokmYPZ MpbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742331453; x=1742936253; h=mime-version:message-id:date:user-agent:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=ciHijTLr8/GUaBIfnUlipDS6ri0Gupe8Wd4EbOZdQ/A=; b=rd/jxVM8PgrZkdcxKsVgVaqTZVHNDb5pqVkRl1p3tOfVFKAQqP3C4/nzg6nCjwdGos FBiiVxjS47FeFluk5F+tqEeLYn4K0CcGQRM8vv7fhLe0OYqLYNhowONEChXUVyWLhoH6 HJIfRes7ERB3GSh6OYUpJffahl2tVyG6oO4l0Be3UHxnBRa47lGKmjbMtm6ufztUsFEc ij0DXC7vjvrtvb0yI8A1QU89+ZxEvOH7SPfLtfG6eD/i4KDno0XEJ/cIB7hyxPvkV8bO xiHfgn3OgoVzHAqSvWdfdth2DkBxTbnCPUK+6WfMk96Hdzn7hHgo2Y7v4yvBH50ytkZN UL+Q== X-Gm-Message-State: AOJu0Ywdmak6fM7pcVxXKLBCKrYzvmMmGpobwEVjkr0SQ6zK0UnY8V8n qyH/8aC2xo9OpUpt428WKhHPEBzPwsCte3Zkdf0Qsn5Hli9Nd+7tFycnYvSjTeo= X-Gm-Gg: ASbGncvy7atK1pMmY2ghvwcx8pFem+fyeOg1iZ0l6YojiBmgILpIG/Elnvc4ojLdv9P d4mwWeqtTJX78JpeKEc0ha7y/UrS+/2keK3kK6Z1wxKlTja8oGgaaIVFfRVuPYNPHTLQhTPGk9s e9aG4L/4PjXYWP2/p3v5tQrTvnSpPmuKbjviPLaK4xljmEX1aFtPfY9jSWaluc1/zW5JSvbvOoy j65u4o3kRGc4w34ovvGTG9UKMxycRO4hFOZIlIO2SMGN6InhsK/WMCUVUjbNueFLGqqlnYFQSmU 3FaiyPiokix0WNJs7vyDXCdFxqqwiKttZ52NK2Bvog== X-Google-Smtp-Source: AGHT+IHFu9e8FNNP2/IuZUV9I4EGPv4NhjoaV4VOVyhtsYw6gsMjOG3Vwyuud3OwSv5iEcm8/yYDkw== X-Received: by 2002:a17:907:7e5e:b0:ac1:ddaa:2c03 with SMTP id a640c23a62f3a-ac3b73e0c7fmr16784666b.0.1742331452768; Tue, 18 Mar 2025 13:57:32 -0700 (PDT) Received: from thinkpad ([2a02:2454:a0a5:2400:a64e:31ff:fe38:fd6c]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ac314858a8fsm886546766b.80.2025.03.18.13.57.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Mar 2025 13:57:31 -0700 (PDT) In-Reply-To: <87bju1yzfq.fsf@burningswell.com> (Roman Scherer's message of "Sun, 16 Mar 2025 12:42:17 +0100") References: <87bju1yzfq.fsf@burningswell.com> User-Agent: mu4e 1.12.9; emacs 30.0.92 Date: Tue, 18 Mar 2025 21:57:30 +0100 Message-ID: <87frjays3p.fsf@sarg.org.ru> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: <guix-patches.gnu.org> List-Unsubscribe: <https://lists.gnu.org/mailman/options/guix-patches>, <mailto:guix-patches-request@gnu.org?subject=unsubscribe> List-Archive: <https://lists.gnu.org/archive/html/guix-patches> List-Post: <mailto:guix-patches@gnu.org> List-Help: <mailto:guix-patches-request@gnu.org?subject=help> List-Subscribe: <https://lists.gnu.org/mailman/listinfo/guix-patches>, <mailto:guix-patches-request@gnu.org?subject=subscribe> Reply-to: Sergey Trofimov <sarg@sarg.org.ru> X-ACL-Warn: , Sergey Trofimov via Guix-patches <guix-patches@gnu.org> From: Sergey Trofimov via Guix-patches via <guix-patches@gnu.org> Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches |
Series |
[bug#77033] deploy: Support --target and --system.
|
|
Commit Message
Sergey Trofimov
March 18, 2025, 8:57 p.m. UTC
Roman Scherer <roman.scherer@burningswell.com> writes: > Hello Sergey, > > this looks good to me and is better than what we have now. I'm testing > this right now and will report back when it went through ... > I think this patch is not necessary at all, your code already sets the `system` field of `machine-ssh-configuration` to the value appropriate to one returned by hetzner-api. It looks to me that the bug is in incorrect parameterization, see the following patch. I've been able to deploy using it (again `build-locally?` set to #f as it takes too long otherwise). Please test this one. --8<---------------cut here---------------start------------->8--- From 988d192cfe4833761d0714aa8a53392c09dd5c9d Mon Sep 17 00:00:00 2001 Message-ID: <988d192cfe4833761d0714aa8a53392c09dd5c9d.1742331137.git.sarg@sarg.org.ru> From: Sergey Trofimov <sarg@sarg.org.ru> Subject: [PATCH] machine: ssh: Use monadic parameterize for monads. * gnu/machine/ssh (deploy-managed-host): Use store-parameterize in monadic context. Change-Id: I6441a5dac856633f2c2a00b77f21a385bf3a9510 --- gnu/machine/ssh.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) base-commit: df799a61ef73451e587cb81942c7bfcbbade9e7e -- 2.48.1 --8<---------------cut here---------------end--------------->8---
Comments
Hi Sergey, Sergey Trofimov <sarg@sarg.org.ru> writes: > Roman Scherer <roman.scherer@burningswell.com> writes: > >> Hello Sergey, >> >> this looks good to me and is better than what we have now. I'm testing >> this right now and will report back when it went through ... >> > > I think this patch is not necessary at all, your code already sets the > `system` field of `machine-ssh-configuration` to the value appropriate > to one returned by hetzner-api. Oops, looks like I forgot about this. I was looking at this at the machine and/or OS level. > It looks to me that the bug is in incorrect parameterization, see the > following patch. I've been able to deploy using it (again > `build-locally?` set to #f as it takes too long otherwise). Please test > this one. I give it a try and will report back. > > --8<---------------cut here---------------start------------->8--- > From 988d192cfe4833761d0714aa8a53392c09dd5c9d Mon Sep 17 00:00:00 2001 > Message-ID: <988d192cfe4833761d0714aa8a53392c09dd5c9d.1742331137.git.sarg@sarg.org.ru> > From: Sergey Trofimov <sarg@sarg.org.ru> > Subject: [PATCH] machine: ssh: Use monadic parameterize for monads. > > * gnu/machine/ssh (deploy-managed-host): Use store-parameterize in > monadic context. > > Change-Id: I6441a5dac856633f2c2a00b77f21a385bf3a9510 > --- > gnu/machine/ssh.scm | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/gnu/machine/ssh.scm b/gnu/machine/ssh.scm > index 73d5dc513e..0ce2860236 100644 > --- a/gnu/machine/ssh.scm > +++ b/gnu/machine/ssh.scm > @@ -542,8 +542,8 @@ (define (deploy-managed-host machine) > host > (inferior-exception-arguments c)))) > os)) > - (parameterize ((%current-system system) > - (%current-target-system #f)) > + (store-parameterize ((%current-system system) > + (%current-target-system #f)) > (with-roll-back #t > (mbegin %store-monad > (upgrade-shepherd-services (eval/error-handling c > > base-commit: df799a61ef73451e587cb81942c7bfcbbade9e7e
Hi Sergey, I just tried this patch with the following machine config: ``` (use-modules (gnu machine) (gnu machine hetzner)) (list (machine (operating-system %hetzner-os-x86) (environment hetzner-environment-type) (configuration (hetzner-configuration (server-type "cpx41") (ssh-key "/home/roman/workspace/guix/id_rsa"))))) ``` I deployed it with the following command: ``` ./pre-inst-env guix deploy hetzner-minimal.scm --no-offload --timeout=864000 --max-silent-time=864000 ``` The server gets created, the Guix bootstrap system is installed on it, but when it tries to apply the final operating system config it "hangs" at applying grafts: ``` ... guix system: bootloader successfully installed on /dev/sda successfully installed guix operating system on 'guix-x86' rebooting server for 'guix-x86'... successfully rebooted server for 'guix-x86' connecting via SSH to '138.201.175.151' using '/home/roman/workspace/guix/id_rsa'... SSH connection to '138.201.175.151' port 22 failed: Timeout connecting to 138.201.175.151 guix deploy: warning: <machine-ssh-configuration> without a 'host-key' is deprecated substitute: looking for substitutes on 'https://substitutes.asahi-guix.org'... 100.0% substitute: looking for substitutes on 'https://substitutes.nonguix.org'... 100.0% substitute: looking for substitutes on 'https://bordeaux.guix.gnu.org'... 100.0% substitute: looking for substitutes on 'https://ci.guix.gnu.org'... 100.0% The following derivations will be built: /gnu/store/f3s4as9imjy6mbpgq8796q64hm82ykaf-remote-assertion.scm.drv /gnu/store/14cba7yngalx7375gdh5325ba5ss1igh-module-import-compiled.drv /gnu/store/ipqcb48n8jhc11y7b1pbxaf4nxdv27iv-remote-assertion.scm.drv /gnu/store/q49sc3kk2f3430dmcsd4lbqgran1w8il-remote-assertion.scm.drv /gnu/store/8wdvxf30pn3m0i7six8s5v02iw0h8hl4-remote-exp.scm.drv applying 2 grafts for bash-minimal-5.1.16 ... - ``` SSHing into the machine doesn't show much activity. The "-" on the last line is also not spinning, so I'm wondering if it actually does something or if it waits on something. The "-" not spinning I also observed when I did the cross build with your other patch. Applying grafts doesn't take so long in what I have observed. Deploying this arm machine from an aarch64 system works with your patch though. ``` (list (machine (operating-system %hetzner-os-arm) (environment hetzner-environment-type) (configuration (hetzner-configuration (server-type "cax21") (ssh-key "/home/roman/workspace/guix/id_rsa"))))) ``` Any ideas why it is hanging at applying the grafts? Roman Sergey Trofimov <sarg@sarg.org.ru> writes: > Roman Scherer <roman.scherer@burningswell.com> writes: > >> Hello Sergey, >> >> this looks good to me and is better than what we have now. I'm testing >> this right now and will report back when it went through ... >> > > I think this patch is not necessary at all, your code already sets the > `system` field of `machine-ssh-configuration` to the value appropriate > to one returned by hetzner-api. > > It looks to me that the bug is in incorrect parameterization, see the > following patch. I've been able to deploy using it (again > `build-locally?` set to #f as it takes too long otherwise). Please test > this one. > > --8<---------------cut here---------------start------------->8--- > From 988d192cfe4833761d0714aa8a53392c09dd5c9d Mon Sep 17 00:00:00 2001 > Message-ID: <988d192cfe4833761d0714aa8a53392c09dd5c9d.1742331137.git.sarg@sarg.org.ru> > From: Sergey Trofimov <sarg@sarg.org.ru> > Subject: [PATCH] machine: ssh: Use monadic parameterize for monads. > > * gnu/machine/ssh (deploy-managed-host): Use store-parameterize in > monadic context. > > Change-Id: I6441a5dac856633f2c2a00b77f21a385bf3a9510 > --- > gnu/machine/ssh.scm | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/gnu/machine/ssh.scm b/gnu/machine/ssh.scm > index 73d5dc513e..0ce2860236 100644 > --- a/gnu/machine/ssh.scm > +++ b/gnu/machine/ssh.scm > @@ -542,8 +542,8 @@ (define (deploy-managed-host machine) > host > (inferior-exception-arguments c)))) > os)) > - (parameterize ((%current-system system) > - (%current-target-system #f)) > + (store-parameterize ((%current-system system) > + (%current-target-system #f)) > (with-roll-back #t > (mbegin %store-monad > (upgrade-shepherd-services (eval/error-handling c > > base-commit: df799a61ef73451e587cb81942c7bfcbbade9e7e
diff --git a/gnu/machine/ssh.scm b/gnu/machine/ssh.scm index 73d5dc513e..0ce2860236 100644 --- a/gnu/machine/ssh.scm +++ b/gnu/machine/ssh.scm @@ -542,8 +542,8 @@ (define (deploy-managed-host machine) host (inferior-exception-arguments c)))) os)) - (parameterize ((%current-system system) - (%current-target-system #f)) + (store-parameterize ((%current-system system) + (%current-target-system #f)) (with-roll-back #t (mbegin %store-monad (upgrade-shepherd-services (eval/error-handling c