From patchwork Thu Nov 10 14:08:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christopher Baines X-Patchwork-Id: 44427 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 120B727BBE9; Thu, 10 Nov 2022 14:10:30 +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=-3.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS autolearn=unavailable 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 A7D4927BBEA for ; Thu, 10 Nov 2022 14:10:28 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ot8Fo-0002sP-Nq; Thu, 10 Nov 2022 09:10:04 -0500 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 ) id 1ot8Fn-0002s5-3Q for guix-patches@gnu.org; Thu, 10 Nov 2022 09:10:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ot8Fm-0006Qe-Ly for guix-patches@gnu.org; Thu, 10 Nov 2022 09:10:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ot8Fm-0005e9-D6 for guix-patches@gnu.org; Thu, 10 Nov 2022 09:10:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#59171] [PATCH] services: guix-build-coordinator: Remove duplicate log timestamp. Resent-From: Christopher Baines Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 10 Nov 2022 14:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 59171 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 59171@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.166808934321617 (code B ref -1); Thu, 10 Nov 2022 14:10:02 +0000 Received: (at submit) by debbugs.gnu.org; 10 Nov 2022 14:09:03 +0000 Received: from localhost ([127.0.0.1]:42333 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ot8Ep-0005cb-64 for submit@debbugs.gnu.org; Thu, 10 Nov 2022 09:09:03 -0500 Received: from lists.gnu.org ([209.51.188.17]:33242) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ot8En-0005cC-1L for submit@debbugs.gnu.org; Thu, 10 Nov 2022 09:09:02 -0500 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 ) id 1ot8Em-0002KG-RX for guix-patches@gnu.org; Thu, 10 Nov 2022 09:09:00 -0500 Received: from mira.cbaines.net ([212.71.252.8]) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ot8Ej-0004BG-2B for guix-patches@gnu.org; Thu, 10 Nov 2022 09:09:00 -0500 Received: from localhost (unknown [IPv6:2a02:8010:68c1:0:3a91:a0a4:ecee:f157]) by mira.cbaines.net (Postfix) with ESMTPSA id D075427BBE9 for ; Thu, 10 Nov 2022 14:08:52 +0000 (GMT) Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id 34d87aad for ; Thu, 10 Nov 2022 14:08:52 +0000 (UTC) From: Christopher Baines Date: Thu, 10 Nov 2022 14:08:52 +0000 Message-Id: <20221110140852.24447-1-mail@cbaines.net> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Received-SPF: pass client-ip=212.71.252.8; envelope-from=mail@cbaines.net; helo=mira.cbaines.net 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, UNPARSEABLE_RELAY=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 * gnu/services/guix.scm (guix-build-coordinator-shepherd-services, guix-build-coordinator-agent-shepherd-services, guix-build-coordinator-queue-builds-shepherd-services): Set %current-logfile-date-format to "". --- gnu/services/guix.scm | 246 +++++++++++++++++++++++------------------- 1 file changed, 134 insertions(+), 112 deletions(-) diff --git a/gnu/services/guix.scm b/gnu/services/guix.scm index 907824ac61..cc31ec271b 100644 --- a/gnu/services/guix.scm +++ b/gnu/services/guix.scm @@ -333,31 +333,38 @@ (define (guix-build-coordinator-shepherd-services config) (documentation "Guix Build Coordinator") (provision '(guix-build-coordinator)) (requirement '(networking)) - (start #~(make-forkexec-constructor - (list #$(make-guix-build-coordinator-start-script - database-uri-string - allocation-strategy - "/var/run/guix-build-coordinator/pid" - package - #:agent-communication-uri-string - agent-communication-uri-string - #:client-communication-uri-string - client-communication-uri-string - #:hooks hooks - #:parallel-hooks parallel-hooks - #:guile guile)) - #:user #$user - #:group #$group - #:pid-file "/var/run/guix-build-coordinator/pid" - ;; Allow time for migrations to run - #:pid-file-timeout 60 - #:environment-variables - `(,(string-append - "GUIX_LOCPATH=" #$glibc-utf8-locales "/lib/locale") - "LC_ALL=en_US.utf8" - "PATH=/run/current-system/profile/bin") ; for hooks - #:log-file "/var/log/guix-build-coordinator/coordinator.log")) - (stop #~(make-kill-destructor)))))) + (start #~(lambda args + (parameterize ((%current-logfile-date-format "")) + (apply + (make-forkexec-constructor + (list #$(make-guix-build-coordinator-start-script + database-uri-string + allocation-strategy + "/var/run/guix-build-coordinator/pid" + package + #:agent-communication-uri-string + agent-communication-uri-string + #:client-communication-uri-string + client-communication-uri-string + #:hooks hooks + #:parallel-hooks parallel-hooks + #:guile guile)) + #:user #$user + #:group #$group + #:pid-file "/var/run/guix-build-coordinator/pid" + ;; Allow time for migrations to run + #:pid-file-timeout 60 + #:environment-variables + `(,(string-append + "GUIX_LOCPATH=" #$glibc-utf8-locales "/lib/locale") + "LC_ALL=en_US.utf8" + "PATH=/run/current-system/profile/bin") ; for hooks + #:log-file "/var/log/guix-build-coordinator/coordinator.log") + args)))) + (stop #~(make-kill-destructor)) + (modules + `((shepherd comm) + ,@%default-modules)))))) (define (guix-build-coordinator-activation config) #~(begin @@ -419,61 +426,69 @@ (define (guix-build-coordinator-agent-shepherd-services config) (documentation "Guix Build Coordinator Agent") (provision '(guix-build-coordinator-agent)) (requirement '(networking)) - (start #~(make-forkexec-constructor - (list #$(file-append package "/bin/guix-build-coordinator-agent") - #$(string-append "--coordinator=" coordinator) - #$@(match authentication - (($ - uuid password) - #~(#$(string-append "--uuid=" uuid) - #$(string-append "--password=" password))) - (($ - uuid password-file) - #~(#$(string-append "--uuid=" uuid) - #$(string-append "--password-file=" - password-file))) - (($ - agent-name token) - #~(#$(string-append "--name=" agent-name) - #$(string-append "--dynamic-auth-token=" token))) - (($ - - agent-name token-file) - #~(#$(string-append "--name=" agent-name) - #$(string-append "--dynamic-auth-token-file=" - token-file)))) - #$(simple-format #f "--max-parallel-builds=~A" - max-parallel-builds) - #$@(if max-allocated-builds - #~(#$(simple-format #f "--max-allocated-builds=~A" - max-allocated-builds)) - #~()) - #$@(if max-1min-load-average - #~(#$(simple-format #f "--max-1min-load-average=~A" - max-1min-load-average)) - #~()) - #$@(if derivation-substitute-urls - #~(#$(string-append - "--derivation-substitute-urls=" + (start + #~(lambda args + (parameterize ((%current-logfile-date-format "")) + (apply + make-forkexec-constructor + (list #$(file-append package "/bin/guix-build-coordinator-agent") + #$(string-append "--coordinator=" coordinator) + #$@(match authentication + (($ + uuid password) + #~(#$(string-append "--uuid=" uuid) + #$(string-append "--password=" password))) + (($ + uuid password-file) + #~(#$(string-append "--uuid=" uuid) + #$(string-append "--password-file=" + password-file))) + (($ + agent-name token) + #~(#$(string-append "--name=" agent-name) + #$(string-append "--dynamic-auth-token=" token))) + (($ + + agent-name token-file) + #~(#$(string-append "--name=" agent-name) + #$(string-append "--dynamic-auth-token-file=" + token-file)))) + #$(simple-format #f "--max-parallel-builds=~A" + max-parallel-builds) + #$@(if max-allocated-builds + #~(#$(simple-format #f "--max-allocated-builds=~A" + max-allocated-builds)) + #~()) + #$@(if max-1min-load-average + #~(#$(simple-format #f "--max-1min-load-average=~A" + max-1min-load-average)) + #~()) + #$@(if derivation-substitute-urls + #~(#$(string-append + "--derivation-substitute-urls=" (string-join derivation-substitute-urls " "))) - #~()) - #$@(if non-derivation-substitute-urls - #~(#$(string-append - "--non-derivation-substitute-urls=" - (string-join non-derivation-substitute-urls " "))) - #~()) - #$@(map (lambda (system) - (string-append "--system=" system)) - (or systems '()))) - #:user #$user - #:environment-variables - `(,(string-append - "GUIX_LOCPATH=" #$glibc-utf8-locales "/lib/locale") - ;; XDG_CACHE_HOME is used by Guix when caching narinfo files - "XDG_CACHE_HOME=/var/cache/guix-build-coordinator-agent" - "LC_ALL=en_US.utf8") - #:log-file "/var/log/guix-build-coordinator/agent.log")) - (stop #~(make-kill-destructor)))))) + #~()) + #$@(if non-derivation-substitute-urls + #~(#$(string-append + "--non-derivation-substitute-urls=" + (string-join non-derivation-substitute-urls " "))) + #~()) + #$@(map (lambda (system) + (string-append "--system=" system)) + (or systems '()))) + #:user #$user + #:environment-variables + `(,(string-append + "GUIX_LOCPATH=" #$glibc-utf8-locales "/lib/locale") + ;; XDG_CACHE_HOME is used by Guix when caching narinfo files + "XDG_CACHE_HOME=/var/cache/guix-build-coordinator-agent" + "LC_ALL=en_US.utf8") + #:log-file "/var/log/guix-build-coordinator/agent.log") + args))) + (stop #~(make-kill-destructor)) + (modules + `((shepherd comm) + ,@%default-modules)))))) (define (guix-build-coordinator-agent-activation config) #~(begin @@ -526,39 +541,46 @@ (define (guix-build-coordinator-queue-builds-shepherd-services config) (provision '(guix-build-coordinator-queue-builds)) (requirement '(networking)) (start - #~(make-forkexec-constructor - (list - #$(file-append - package - "/bin/guix-build-coordinator-queue-builds-from-guix-data-service") - #$(string-append "--coordinator=" coordinator) - #$@(map (lambda (system) - (string-append "--system=" system)) - (or systems '())) - #$@(map (match-lambda - ((system . target) - (string-append "--system-and-target=" system "=" target))) - (or systems-and-targets '())) - #$@(if guix-data-service - #~(#$(string-append "--guix-data-service=" guix-data-service)) - #~()) - #$@(if guix-data-service-build-server-id - #~(#$(simple-format - #f - "--guix-data-service-build-server-id=~A" - guix-data-service-build-server-id)) - #~()) - #$@(if processed-commits-file - #~(#$(string-append "--processed-commits-file=" - processed-commits-file)) - #~())) - #:user #$user - #:environment-variables - `(,(string-append - "GUIX_LOCPATH=" #$glibc-utf8-locales "/lib/locale") - "LC_ALL=en_US.utf8") - #:log-file "/var/log/guix-build-coordinator/queue-builds.log")) - (stop #~(make-kill-destructor)))))) + #~(lambda args + (parameterize ((%current-logfile-date-format "")) + (apply + (make-forkexec-constructor + (list + #$(file-append + package + "/bin/guix-build-coordinator-queue-builds-from-guix-data-service") + #$(string-append "--coordinator=" coordinator) + #$@(map (lambda (system) + (string-append "--system=" system)) + (or systems '())) + #$@(map (match-lambda + ((system . target) + (string-append "--system-and-target=" system "=" target))) + (or systems-and-targets '())) + #$@(if guix-data-service + #~(#$(string-append "--guix-data-service=" guix-data-service)) + #~()) + #$@(if guix-data-service-build-server-id + #~(#$(simple-format + #f + "--guix-data-service-build-server-id=~A" + guix-data-service-build-server-id)) + #~()) + #$@(if processed-commits-file + #~(#$(string-append "--processed-commits-file=" + processed-commits-file)) + #~())) + #:user #$user + #:environment-variables + `(,(string-append + "GUIX_LOCPATH=" #$glibc-utf8-locales "/lib/locale") + "LC_ALL=en_US.utf8") + #:log-file "/var/log/guix-build-coordinator/queue-builds.log") + args)))) + (stop #~(make-kill-destructor)) + (modules + `((shepherd comm) + ,@%default-modules)))))) (define (guix-build-coordinator-queue-builds-activation config) #~(begin