From unknown Fri Sep 05 07:33:11 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#40149 <40149@debbugs.gnu.org> To: bug#40149 <40149@debbugs.gnu.org> Subject: Status: [PATCH 0/5] Assorted 'guix deploy' improvements Reply-To: bug#40149 <40149@debbugs.gnu.org> Date: Fri, 05 Sep 2025 14:33:11 +0000 retitle 40149 [PATCH 0/5] Assorted 'guix deploy' improvements reassign 40149 guix-patches submitter 40149 Ludovic Court=C3=A8s severity 40149 normal tag 40149 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 20 10:04:47 2020 Received: (at submit) by debbugs.gnu.org; 20 Mar 2020 14:04:47 +0000 Received: from localhost ([127.0.0.1]:45310 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jFIGV-0007Em-Iq for submit@debbugs.gnu.org; Fri, 20 Mar 2020 10:04:47 -0400 Received: from lists.gnu.org ([209.51.188.17]:55743) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jFIGT-0007Ee-Ac for submit@debbugs.gnu.org; Fri, 20 Mar 2020 10:04:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45931) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jFIGR-00006S-JM for guix-patches@gnu.org; Fri, 20 Mar 2020 10:04:45 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.2 required=5.0 tests=ALL_TRUSTED,BAYES_50 autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:470:142:3::e]:51179) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1jFIGQ-0006pE-Us; Fri, 20 Mar 2020 10:04:43 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=54264 helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jFIGP-0005R6-17; Fri, 20 Mar 2020 10:04:41 -0400 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= To: guix-patches@gnu.org Subject: [PATCH 0/5] Assorted 'guix deploy' improvements Date: Fri, 20 Mar 2020 15:04:33 +0100 Message-Id: <20200320140433.27868-1-ludo@gnu.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: submit Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Hello! The first patch arranges so that a single round trip is enough to perform all the sanity checks on the remote machine. Previously, we’d build N derivations, send their results, and perform N remote evaluation (with N typically in the 3–5 range depending on details of the OS config.) (There’s a more general optimization pattern lurking here: I’d really like to find a way to somehow gather operations like ‘remote-eval’ that are more efficiently done as a batch, and then scatter results back to their continuations. I’ve been thinking about this for some time and it still hasn’t clicked. Ideas welcome!) The remaining patches are basic UI improvements. Feedback welcome! Ludo’. Ludovic Courtès (5): machine: ssh: Make sanity checks in a single round trip. ui: Add 'indented-string'. deploy: Show what machines will be deployed. deploy: Write a message upon successful deployment. machine: ssh: Better report missing initrd modules. gnu/machine/ssh.scm | 138 +++++++++++++++++++++++----------------- guix/scripts/deploy.scm | 23 ++++++- guix/scripts/pull.scm | 17 +---- guix/ui.scm | 18 ++++++ 4 files changed, 123 insertions(+), 73 deletions(-) -- 2.25.1 From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 20 10:09:25 2020 Received: (at 40149) by debbugs.gnu.org; 20 Mar 2020 14:09:25 +0000 Received: from localhost ([127.0.0.1]:45315 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jFIKz-0007ME-6F for submit@debbugs.gnu.org; Fri, 20 Mar 2020 10:09:25 -0400 Received: from eggs.gnu.org ([209.51.188.92]:59629) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jFIKy-0007Ly-CI for 40149@debbugs.gnu.org; Fri, 20 Mar 2020 10:09:24 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:51220) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1jFIKt-0003RQ-9c; Fri, 20 Mar 2020 10:09:19 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=54272 helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jFIKs-0004AC-A5; Fri, 20 Mar 2020 10:09:19 -0400 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= To: 40149@debbugs.gnu.org Subject: [PATCH 1/5] machine: ssh: Make sanity checks in a single round trip. Date: Fri, 20 Mar 2020 15:09:06 +0100 Message-Id: <20200320140910.28439-1-ludo@gnu.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 40149 Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) * gnu/machine/ssh.scm (): New record type. (remote-let): New macro. (machine-check-file-system-availability): Rewrite to use 'remote-let' instead of 'mlet' and 'machine-remote-eval'. (machine-check-initrd-modules): Likewise. (machine-check-building-for-appropriate-system): Make non-monadic. (check-deployment-sanity): Rewrite to gather all the assertions as a single gexp and pass it to 'machine-remote-eval'. --- gnu/machine/ssh.scm | 138 ++++++++++++++++++++++++++------------------ 1 file changed, 81 insertions(+), 57 deletions(-) diff --git a/gnu/machine/ssh.scm b/gnu/machine/ssh.scm index 6374373e22..85ecbb6d14 100644 --- a/gnu/machine/ssh.scm +++ b/gnu/machine/ssh.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2019 Jakob L. Kreuze +;;; Copyright © 2020 Ludovic Courtès ;;; ;;; This file is part of GNU Guix. ;;; @@ -39,6 +40,7 @@ #:use-module (ice-9 match) #:use-module (ice-9 textual-ports) #:use-module (srfi srfi-1) + #:use-module (srfi srfi-9) #:use-module (srfi srfi-19) #:use-module (srfi srfi-26) #:use-module (srfi srfi-34) @@ -142,9 +144,24 @@ an environment type of 'managed-host." ;;; Safety checks. ;;; +;; Assertion to be executed remotely. This abstraction exists to allow us to +;; gather a list of expressions to be evaluated and eventually evaluate them +;; all at once instead of one by one. (This is pretty much a monad.) +(define-record-type + (remote-assertion exp proc) + remote-assertion? + (exp remote-assertion-expression) + (proc remote-assertion-procedure)) + +(define-syntax-rule (remote-let ((var exp)) body ...) + "Return a that binds VAR to the result of evaluating EXP, +a gexp, remotely, and evaluate BODY in that context." + (remote-assertion exp (lambda (var) body ...))) + (define (machine-check-file-system-availability machine) - "Raise a '&message' error condition if any of the file-systems specified in -MACHINE's 'system' declaration do not exist on the machine." + "Return a list of that raise a '&message' error condition +if any of the file-systems specified in MACHINE's 'system' declaration do not +exist on the machine." (define file-systems (filter (lambda (fs) (and (file-system-mount? fs) @@ -154,22 +171,18 @@ MACHINE's 'system' declaration do not exist on the machine." (operating-system-file-systems (machine-operating-system machine)))) (define (check-literal-file-system fs) - (define remote-exp - #~(catch 'system-error - (lambda () - (stat #$(file-system-device fs)) - #t) - (lambda args - (system-error-errno args)))) - - (mlet %store-monad ((errno (machine-remote-eval machine remote-exp))) + (remote-let ((errno #~(catch 'system-error + (lambda () + (stat #$(file-system-device fs)) + #t) + (lambda args + (system-error-errno args))))) (when (number? errno) (raise (condition (&message (message (format #f (G_ "device '~a' not found: ~a") (file-system-device fs) - (strerror errno))))))) - (return #t))) + (strerror errno))))))))) (define (check-labeled-file-system fs) (define remote-exp @@ -180,14 +193,13 @@ MACHINE's 'system' declaration do not exist on the machine." (find-partition-by-label #$(file-system-label->string (file-system-device fs)))))) - (mlet %store-monad ((result (machine-remote-eval machine remote-exp))) + (remote-let ((result remote-exp)) (unless result (raise (condition (&message (message (format #f (G_ "no file system with label '~a'") (file-system-label->string - (file-system-device fs)))))))) - (return #t))) + (file-system-device fs)))))))))) (define (check-uuid-file-system fs) (define remote-exp @@ -203,31 +215,30 @@ MACHINE's 'system' declaration do not exist on the machine." (find-partition-by-uuid uuid)))) - (mlet %store-monad ((result (machine-remote-eval machine remote-exp))) + (remote-let ((result remote-exp)) (unless result (raise (condition (&message (message (format #f (G_ "no file system with UUID '~a'") - (uuid->string (file-system-device fs)))))))) - (return #t))) + (uuid->string (file-system-device fs)))))))))) - (mbegin %store-monad - (mapm %store-monad check-literal-file-system - (filter (lambda (fs) - (string? (file-system-device fs))) - file-systems)) - (mapm %store-monad check-labeled-file-system - (filter (lambda (fs) - (file-system-label? (file-system-device fs))) - file-systems)) - (mapm %store-monad check-uuid-file-system - (filter (lambda (fs) - (uuid? (file-system-device fs))) - file-systems)))) + (append (map check-literal-file-system + (filter (lambda (fs) + (string? (file-system-device fs))) + file-systems)) + (map check-labeled-file-system + (filter (lambda (fs) + (file-system-label? (file-system-device fs))) + file-systems)) + (map check-uuid-file-system + (filter (lambda (fs) + (uuid? (file-system-device fs))) + file-systems)))) (define (machine-check-initrd-modules machine) - "Raise a '&message' error condition if any of the modules needed by -'needed-for-boot' file systems in MACHINE are not available in the initrd." + "Return a list of that raise a '&message' error condition +if any of the modules needed by 'needed-for-boot' file systems in MACHINE are +not available in the initrd." (define file-systems (filter file-system-needed-for-boot? (operating-system-file-systems (machine-operating-system machine)))) @@ -255,20 +266,16 @@ MACHINE's 'system' declaration do not exist on the machine." (missing-modules dev '#$(operating-system-initrd-modules (machine-operating-system machine))))))) - (mlet %store-monad ((missing (machine-remote-eval machine remote-exp))) - (return (list fs missing)))) - (mlet %store-monad ((device (mapm %store-monad missing-modules file-systems))) - (for-each (match-lambda - ((fs missing) - (unless (null? missing) - (raise (condition - (&message - (message (format #f (G_ "~a missing modules ~{ ~a~}~%") - (file-system-device fs) - missing)))))))) - device) - (return #t))) + (remote-let ((missing remote-exp)) + (unless (null? missing) + (raise (condition + (&message + (message (format #f (G_ "~a missing modules ~{ ~a~}~%") + (file-system-device fs) + missing)))))))) + + (map missing-modules file-systems)) (define (machine-check-building-for-appropriate-system machine) "Raise a '&message' error condition if MACHINE is configured to be built @@ -280,21 +287,38 @@ by MACHINE." (not (string= system (machine-ssh-configuration-system config)))) (raise (condition (&message - (message (format #f (G_ "incorrect target system \ -('~a' was given, while the system reports that it is '~a')~%") + (message (format #f (G_ "incorrect target system\ + ('~a' was given, while the system reports that it is '~a')~%") (machine-ssh-configuration-system config) - system))))))) - (with-monad %store-monad (return #t))) + system)))))))) (define (check-deployment-sanity machine) "Raise a '&message' error condition if it is clear that deploying MACHINE's 'system' declaration would fail." - ;; Order is important here -- an incorrect value for 'system' will cause - ;; invocations of 'remote-eval' to fail. - (mbegin %store-monad - (machine-check-building-for-appropriate-system machine) - (machine-check-file-system-availability machine) - (machine-check-initrd-modules machine))) + (define assertions + (append (machine-check-file-system-availability machine) + (machine-check-initrd-modules machine))) + + (define aggregate-exp + ;; Gather all the expressions so that a single round-trip is enough to + ;; evaluate all the ASSERTIONS remotely. + #~(map (lambda (file) + (false-if-exception (primitive-load file))) + '#$(map (lambda (assertion) + (scheme-file "remote-assertion.scm" + (remote-assertion-expression assertion))) + assertions))) + + ;; First check MACHINE's system type--an incorrect value for 'system' would + ;; cause subsequent invocations of 'remote-eval' to fail. + (machine-check-building-for-appropriate-system machine) + + (mlet %store-monad ((values (machine-remote-eval machine aggregate-exp))) + (for-each (lambda (proc value) + (proc value)) + (map remote-assertion-procedure assertions) + values) + (return #t))) ;;; -- 2.25.1 From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 20 10:09:28 2020 Received: (at 40149) by debbugs.gnu.org; 20 Mar 2020 14:09:28 +0000 Received: from localhost ([127.0.0.1]:45319 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jFIL1-0007MY-MO for submit@debbugs.gnu.org; Fri, 20 Mar 2020 10:09:27 -0400 Received: from eggs.gnu.org ([209.51.188.92]:59637) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jFIKz-0007M0-Ke for 40149@debbugs.gnu.org; Fri, 20 Mar 2020 10:09:26 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:51221) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1jFIKu-0003Ri-Ia; Fri, 20 Mar 2020 10:09:20 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=54272 helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jFIKt-0004AC-Uk; Fri, 20 Mar 2020 10:09:20 -0400 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= To: 40149@debbugs.gnu.org Subject: [PATCH 2/5] ui: Add 'indented-string'. Date: Fri, 20 Mar 2020 15:09:07 +0100 Message-Id: <20200320140910.28439-2-ludo@gnu.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200320140910.28439-1-ludo@gnu.org> References: <20200320140910.28439-1-ludo@gnu.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 40149 Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) * guix/scripts/pull.scm (display-news-entry): Remove extra space in format string for 'indented-string'. (indented-string): Remove. (display-new/upgraded-packages)[pretty]: Pass #:initial-indent? to 'indented-string'. * guix/ui.scm (indented-string): New procedure. --- guix/scripts/pull.scm | 17 ++--------------- guix/ui.scm | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+), 15 deletions(-) diff --git a/guix/scripts/pull.scm b/guix/scripts/pull.scm index 51d4da209a..1db5ab7237 100644 --- a/guix/scripts/pull.scm +++ b/guix/scripts/pull.scm @@ -269,7 +269,7 @@ code, to PORT." (let ((body (or (assoc-ref body language) (assoc-ref body (%default-message-language)) ""))) - (format port " ~a~%" + (format port "~a~%" (indented-string (parameterize ((%text-width (- (%text-width) 4))) (string-trim-right @@ -523,19 +523,6 @@ true, display what would be built without actually building it." ;;; Queries. ;;; -(define (indented-string str indent) - "Return STR with each newline preceded by IDENT spaces." - (define indent-string - (make-list indent #\space)) - - (list->string - (string-fold-right (lambda (chr result) - (if (eqv? chr #\newline) - (cons chr (append indent-string result)) - (cons chr result))) - '() - str))) - (define profile-package-alist (mlambda (profile) "Return a name/version alist representing the packages in PROFILE." @@ -592,7 +579,7 @@ Return true when there is more package info to display." (define (pretty str column) (indented-string (fill-paragraph str (- (%text-width) 4) column) - 4)) + 4 #:initial-indent? #f)) (define concise/max-item-count ;; Maximum number of items to display when CONCISE? is true. diff --git a/guix/ui.scm b/guix/ui.scm index 6f1ca9c0b2..698111dd9a 100644 --- a/guix/ui.scm +++ b/guix/ui.scm @@ -103,6 +103,7 @@ read/eval read/eval-package-expression check-available-space + indented-string fill-paragraph %text-width texi->plain-text @@ -1163,6 +1164,23 @@ replacement if PORT is not Unicode-capable." (lambda () body ...))))) +(define* (indented-string str indent + #:key (initial-indent? #t)) + "Return STR with each newline preceded by IDENT spaces. When +INITIAL-INDENT? is true, the first line is also indented." + (define indent-string + (make-list indent #\space)) + + (list->string + (string-fold-right (lambda (chr result) + (if (eqv? chr #\newline) + (cons chr (append indent-string result)) + (cons chr result))) + '() + (if initial-indent? + (string-append (list->string indent-string) str) + str)))) + (define* (fill-paragraph str width #:optional (column 0)) "Fill STR such that each line contains at most WIDTH characters, assuming that the first character is at COLUMN. -- 2.25.1 From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 20 10:09:30 2020 Received: (at 40149) by debbugs.gnu.org; 20 Mar 2020 14:09:30 +0000 Received: from localhost ([127.0.0.1]:45323 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jFIL4-0007Mm-0e for submit@debbugs.gnu.org; Fri, 20 Mar 2020 10:09:30 -0400 Received: from eggs.gnu.org ([209.51.188.92]:59640) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jFIL0-0007M2-Ve for 40149@debbugs.gnu.org; Fri, 20 Mar 2020 10:09:27 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:51222) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1jFIKv-0003Rz-TA; Fri, 20 Mar 2020 10:09:21 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=54272 helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jFIKv-0004AC-7S; Fri, 20 Mar 2020 10:09:21 -0400 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= To: 40149@debbugs.gnu.org Subject: [PATCH 3/5] deploy: Show what machines will be deployed. Date: Fri, 20 Mar 2020 15:09:08 +0100 Message-Id: <20200320140910.28439-3-ludo@gnu.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200320140910.28439-1-ludo@gnu.org> References: <20200320140910.28439-1-ludo@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 40149 Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) * guix/scripts/deploy.scm (show-what-to-deploy): New procedure. (guix-deploy): Call it. --- guix/scripts/deploy.scm | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/guix/scripts/deploy.scm b/guix/scripts/deploy.scm index ad05c333dc..1f1ca58476 100644 --- a/guix/scripts/deploy.scm +++ b/guix/scripts/deploy.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2019 David Thompson ;;; Copyright © 2019 Jakob L. Kreuze +;;; Copyright © 2020 Ludovic Courtès ;;; ;;; This file is part of GNU Guix. ;;; @@ -97,6 +98,22 @@ Perform the deployment specified by FILE.\n")) environment-modules)))) (load* file module))) +(define (show-what-to-deploy machines) + "Show the list of machines to deploy, MACHINES." + (let ((count (length machines))) + (format (current-error-port) + (N_ "The following ~*machine will be deployed:~%" + "The following ~d machines will be deployed:~%" + count) + count) + (display (indented-string + (fill-paragraph (string-join (map machine-display-name machines) + ", ") + (- (%text-width) 2) 2) + 2) + (current-error-port)) + (display "\n\n" (current-error-port)))) + (define (guix-deploy . args) (define (handle-argument arg result) (alist-cons 'file arg result)) @@ -105,6 +122,8 @@ Perform the deployment specified by FILE.\n")) #:argument-handler handle-argument)) (file (assq-ref opts 'file)) (machines (or (and file (load-source-file file)) '()))) + (show-what-to-deploy machines) + (with-status-verbosity (assoc-ref opts 'verbosity) (with-store store (set-build-options-from-command-line store opts) -- 2.25.1 From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 20 10:09:30 2020 Received: (at 40149) by debbugs.gnu.org; 20 Mar 2020 14:09:30 +0000 Received: from localhost ([127.0.0.1]:45325 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jFIL4-0007Mt-DP for submit@debbugs.gnu.org; Fri, 20 Mar 2020 10:09:30 -0400 Received: from eggs.gnu.org ([209.51.188.92]:59642) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jFIL2-0007M5-9d for 40149@debbugs.gnu.org; Fri, 20 Mar 2020 10:09:28 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:51223) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1jFIKx-0003SD-7j; Fri, 20 Mar 2020 10:09:23 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=54272 helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jFIKw-0004AC-IA; Fri, 20 Mar 2020 10:09:23 -0400 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= To: 40149@debbugs.gnu.org Subject: [PATCH 4/5] deploy: Write a message upon successful deployment. Date: Fri, 20 Mar 2020 15:09:09 +0100 Message-Id: <20200320140910.28439-4-ludo@gnu.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200320140910.28439-1-ludo@gnu.org> References: <20200320140910.28439-1-ludo@gnu.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 40149 Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) * guix/scripts/deploy.scm (guix-deploy): Write message upon successful deployment. --- guix/scripts/deploy.scm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/guix/scripts/deploy.scm b/guix/scripts/deploy.scm index 1f1ca58476..1d652d019d 100644 --- a/guix/scripts/deploy.scm +++ b/guix/scripts/deploy.scm @@ -141,5 +141,7 @@ Perform the deployment specified by FILE.\n")) (machine-display-name machine)) (run-with-store store (roll-back-machine machine))) (apply throw (deploy-error-captured-args c)))) - (run-with-store store (deploy-machine machine))))) + (run-with-store store (deploy-machine machine)) + (info (G_ "successfully deployed ~a~%") + (machine-display-name machine))))) machines))))) -- 2.25.1 From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 20 10:09:33 2020 Received: (at 40149) by debbugs.gnu.org; 20 Mar 2020 14:09:34 +0000 Received: from localhost ([127.0.0.1]:45327 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jFIL7-0007NA-MD for submit@debbugs.gnu.org; Fri, 20 Mar 2020 10:09:33 -0400 Received: from eggs.gnu.org ([209.51.188.92]:59651) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jFIL3-0007M8-S5 for 40149@debbugs.gnu.org; Fri, 20 Mar 2020 10:09:30 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:51224) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1jFIKy-0003SW-QF; Fri, 20 Mar 2020 10:09:24 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=54272 helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jFIKx-0004AC-Sk; Fri, 20 Mar 2020 10:09:24 -0400 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= To: 40149@debbugs.gnu.org Subject: [PATCH 5/5] machine: ssh: Better report missing initrd modules. Date: Fri, 20 Mar 2020 15:09:10 +0100 Message-Id: <20200320140910.28439-5-ludo@gnu.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200320140910.28439-1-ludo@gnu.org> References: <20200320140910.28439-1-ludo@gnu.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 40149 Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) * gnu/machine/ssh.scm (machine-check-initrd-modules): Improve message upon module mismatch. --- gnu/machine/ssh.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnu/machine/ssh.scm b/gnu/machine/ssh.scm index 85ecbb6d14..116da86327 100644 --- a/gnu/machine/ssh.scm +++ b/gnu/machine/ssh.scm @@ -271,7 +271,7 @@ not available in the initrd." (unless (null? missing) (raise (condition (&message - (message (format #f (G_ "~a missing modules ~{ ~a~}~%") + (message (format #f (G_ "missing modules for ~a:~{ ~a~}~%") (file-system-device fs) missing)))))))) -- 2.25.1 From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 23 05:49:24 2020 Received: (at 40149-done) by debbugs.gnu.org; 23 Mar 2020 09:49:24 +0000 Received: from localhost ([127.0.0.1]:51464 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jGJi0-0001I8-8v for submit@debbugs.gnu.org; Mon, 23 Mar 2020 05:49:24 -0400 Received: from eggs.gnu.org ([209.51.188.92]:41144) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jGJhz-0001Hs-Fn for 40149-done@debbugs.gnu.org; Mon, 23 Mar 2020 05:49:23 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:49667) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1jGJhu-0001iO-AJ for 40149-done@debbugs.gnu.org; Mon, 23 Mar 2020 05:49:18 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=41524 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jGJht-0001RT-U5 for 40149-done@debbugs.gnu.org; Mon, 23 Mar 2020 05:49:18 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: 40149-done@debbugs.gnu.org Subject: Re: [bug#40149] [PATCH 0/5] Assorted 'guix deploy' improvements References: <20200320140433.27868-1-ludo@gnu.org> Date: Mon, 23 Mar 2020 10:49:16 +0100 In-Reply-To: <20200320140433.27868-1-ludo@gnu.org> ("Ludovic \=\?utf-8\?Q\?Cou\?\= \=\?utf-8\?Q\?rt\=C3\=A8s\=22's\?\= message of "Fri, 20 Mar 2020 15:04:33 +0100") Message-ID: <87pnd3qu3n.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 40149-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Ludovic Court=C3=A8s skribis: > machine: ssh: Make sanity checks in a single round trip. > ui: Add 'indented-string'. > deploy: Show what machines will be deployed. > deploy: Write a message upon successful deployment. > machine: ssh: Better report missing initrd modules. Pushed as 8bc745052e051d142213a0ea74c39bdd7c5ace70. Ludo=E2=80=99. From unknown Fri Sep 05 07:33:11 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 20 Apr 2020 11:24:07 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator