From patchwork Sun Dec 17 14:35:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 57660 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 A800427BBEA; Sun, 17 Dec 2023 14:36:35 +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=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED 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 D3E5227BBE2 for ; Sun, 17 Dec 2023 14:36:29 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rEsFS-0004fo-8p; Sun, 17 Dec 2023 09:36:06 -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 1rEsFR-0004fN-3P for guix-patches@gnu.org; Sun, 17 Dec 2023 09:36:05 -0500 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 ) id 1rEsFQ-0000zr-CH; Sun, 17 Dec 2023 09:36:04 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rEsFN-000738-UB; Sun, 17 Dec 2023 09:36:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#67866] [PATCH] daemon: Change default =?utf-8?b?4oCYdGltZW91?= =?utf-8?b?dOKAmQ==?= and =?utf-8?b?4oCYbWF4LXNpbGVudC10aW1l4oCZ?= values. Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix@cbaines.net, dev@jpoiret.xyz, ludo@gnu.org, othacehe@gnu.org, rekado@elephly.net, zimon.toutoune@gmail.com, me@tobias.gr, guix-patches@gnu.org Resent-Date: Sun, 17 Dec 2023 14:36:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 67866 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 67866@debbugs.gnu.org Cc: Ludovic =?utf-8?q?Court=C3=A8s?= , Christopher Baines , Josselin Poiret , Ludovic =?utf-8?q?Court=C3=A8s?= , Mathieu Othacehe , Ricardo Wurmus , Simon Tournier , Tobias Geerinckx-Rice X-Debbugs-Original-To: guix-patches@gnu.org X-Debbugs-Original-Xcc: Christopher Baines , Josselin Poiret , Ludovic =?utf-8?q?Court=C3=A8s?= , Mathieu Othacehe , Ricardo Wurmus , Simon Tournier , Tobias Geerinckx-Rice Received: via spool by submit@debbugs.gnu.org id=B.170282374727070 (code B ref -1); Sun, 17 Dec 2023 14:36:01 +0000 Received: (at submit) by debbugs.gnu.org; 17 Dec 2023 14:35:47 +0000 Received: from localhost ([127.0.0.1]:56804 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rEsF8-00072V-H3 for submit@debbugs.gnu.org; Sun, 17 Dec 2023 09:35:47 -0500 Received: from lists.gnu.org ([2001:470:142::17]:46552) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rEsF6-00072A-VR for submit@debbugs.gnu.org; Sun, 17 Dec 2023 09:35:46 -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 1rEsEx-0004eF-Eh for guix-patches@gnu.org; Sun, 17 Dec 2023 09:35:36 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rEsEw-0000MG-G3; Sun, 17 Dec 2023 09:35:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:Subject:To:From:in-reply-to: references; bh=becJM0gsHkKDXJN1mhbQdjx6MQw0upRuOL3iyIO9eH0=; b=iAZAgpKG4xfgTF wZJNZiw1Tq6GZmat9wR0NSqMRXYZruVNSL3FW12J19mocTT3ECjnTQo8hl28JnTStydZrEjgTY4kF 8n+ToYAAEFn6jXIBzek5QKGQiSXUe2sFHtNfzjzd3WUw+w1972aL6BIjCnB7UZ+CO82Fpn7asTYZV Vcmx20XU4fEwRCuwe0ExqLcmPdNlVg38eAfGKk42s+FjM8aeEyDvKDPVTkL54gRfKGkY1aqaE+EuE FzSGEtAyChQoMA2LnbHIY9+fVuQGQiS0z60vcrQ1xs2bORQh26uU0AzGexG28yDqD0teARgjtdXWv nHwOjJXJ6eQRIdqhmzQw==; From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Sun, 17 Dec 2023 15:35:24 +0100 Message-ID: <498d6405f0a2d792bb3af7d4e19ae19cf8780822.1702823602.git.ludo@gnu.org> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 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 Having a timeout seems generally preferable as it makes sure build slots are not kept busy for no good reason (few package builds, if any, are expected to exceed these values). * nix/libstore/globals.cc (Settings::Settings): Change ‘maxSilentTime’ and ‘buildTimeout’. * gnu/services/base.scm ()[max-silent-time] [timeout]: Change default values. * doc/guix.texi (Invoking guix-daemon, Base Services): Adjust accordingly. Change-Id: I25c50893f3f7fcca451b8f093d9d4d1a15fa58d8 --- doc/guix.texi | 8 ++++---- gnu/services/base.scm | 4 ++-- nix/libstore/globals.cc | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) Hi! I was pretty sure these were the default values already and was shocked to discover that this was not the case. Thoughts? Objections? Ludo'. base-commit: b681e339fa37f2a26763458ee56b31af1d6a7ec5 diff --git a/doc/guix.texi b/doc/guix.texi index e61a893af9..5f44a78f90 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -1799,7 +1799,7 @@ Invoking guix-daemon When the build or substitution process remains silent for more than @var{seconds}, terminate it and report a build failure. -The default value is @code{0}, which disables the timeout. +The default value is @code{3600} (one hour). The value specified here can be overridden by clients (@pxref{Common Build Options, @option{--max-silent-time}}). @@ -1808,7 +1808,7 @@ Invoking guix-daemon Likewise, when the build or substitution process lasts for more than @var{seconds}, terminate it and report a build failure. -The default value is @code{0}, which disables the timeout. +The default value is 24 hours. The value specified here can be overridden by clients (@pxref{Common Build Options, @option{--timeout}}). @@ -19384,8 +19384,8 @@ Base Services might want to turn it off for instance in a virtual machine that does not need it and where the extra boot time is a problem. -@item @code{max-silent-time} (default: @code{0}) -@itemx @code{timeout} (default: @code{0}) +@item @code{max-silent-time} (default: @code{3600}) +@itemx @code{timeout} (default: @code{(* 3600 24)}) The number of seconds of silence and the number of seconds of activity, respectively, after which a build process times out. A value of zero disables the timeout. diff --git a/gnu/services/base.scm b/gnu/services/base.scm index 6539bfd6ce..60388a22dd 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -1798,9 +1798,9 @@ (define-record-type* (chroot-directories guix-configuration-chroot-directories ;list of file-like/strings (default '())) (max-silent-time guix-configuration-max-silent-time ;integer - (default 0)) + (default 3600)) (timeout guix-configuration-timeout ;integer - (default 0)) + (default (* 3600 24))) (log-compression guix-configuration-log-compression (default 'gzip)) (discover? guix-configuration-discover? diff --git a/nix/libstore/globals.cc b/nix/libstore/globals.cc index d4f9a46a74..89add1f107 100644 --- a/nix/libstore/globals.cc +++ b/nix/libstore/globals.cc @@ -32,8 +32,8 @@ Settings::Settings() buildCores = 1; readOnlyMode = false; thisSystem = SYSTEM; - maxSilentTime = 0; - buildTimeout = 0; + maxSilentTime = 3600; + buildTimeout = 3600 * 24; useBuildHook = true; printBuildTrace = false; multiplexedBuildOutput = false;