From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id wKz6JK03m2N4HAEAbAwnHQ (envelope-from ) for ; Thu, 15 Dec 2022 16:05:17 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id wO/aJK03m2MAhgAAauVa8A (envelope-from ) for ; Thu, 15 Dec 2022 16:05:17 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 599D2282D1 for ; Thu, 15 Dec 2022 16:05:17 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p5pnE-0000pO-3M; Thu, 15 Dec 2022 10:05: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 1p5pnB-0000oF-3h for guix-devel@gnu.org; Thu, 15 Dec 2022 10:05:01 -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 1p5pnA-0006rN-Ns; Thu, 15 Dec 2022 10:05:00 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=tbWSVsJEjwb4DWWhAPaXTp25B7lfWPfm9467m0EyTUg=; b=mHIeHsXAVhASnRJWwusV 1aIpMhafjzTQ6FbT8th6D8k6OK1+QV9Ya0S0TlukBuwfIYKVjXiSI+BHJQZi7JobHQo5UjOuWngp4 b/lZL7awhP5ZYGV1O/OHZuavwVr9fGoda8Okr2C5KTLZpzkRGtlCo5D07VKFy91a3R1zSJG/Ywmlv nJuwo298rARW4I6+RZBUM/0srCNyiU6giADgkrP9WWTpki4BGioKf+ysLbHxi1lc8Fv80l8Q/IBlx XxHZV5uRHzU+d0FEa4L2hxs5ZmTpxuj1H8k5TNA4dbbU65gSHiUp4kjXwnat4RMTylnt3L2Uvfass W+5+YNT8ZCrSUw==; Received: from [89.207.171.79] (helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p5pnA-0001T8-0R; Thu, 15 Dec 2022 10:05:00 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Ricardo Wurmus Cc: Guix Devel Subject: Re: shepherd: prefix output with service names? References: <87tu1ytgdq.fsf@elephly.net> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Quintidi 25 Frimaire an 231 de la =?utf-8?Q?R=C3=A9v?= =?utf-8?Q?olution=2C?= jour du Grillon X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Thu, 15 Dec 2022 16:04:56 +0100 In-Reply-To: <87tu1ytgdq.fsf@elephly.net> (Ricardo Wurmus's message of "Wed, 14 Dec 2022 11:38:10 +0100") Message-ID: <871qp0ogh3.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list 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+larch=yhetil.org@gnu.org Sender: guix-devel-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1671116717; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=tbWSVsJEjwb4DWWhAPaXTp25B7lfWPfm9467m0EyTUg=; b=mpEjM6Cc/mAt2L9fHQyiVy/1He+AqhKI0qSJBAMchFMbwbcQ2cH9Gr4PBGdKiBwPfH8dvD T3JmMLMH5UFQO0Ezv0Oz1pMv+p/L98E7FGw4qlyglj6NQl4Px9jM1B9DkdMOnFxYLUmGA7 geJbfHglcDNXl3ENpJTG+e2sr2t98pwGq8QQvoHPo0W58oFoVJkenh160EmVualOVAdcCv KrZ8WKFOvAG7l3x1CsQJqkAHKoQ0ii46ibWuqrS2A1UEJKTxOKRC/F/dGzHf7A0Oo3saD6 mCkIojMS2qeOvRPpaCQ06TZtwPHfVYOQrHnszVhPKPQJmjMpPJc9iiiBuqS6zQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gnu.org header.s=fencepost-gnu-org header.b=mHIeHsXA; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1671116717; a=rsa-sha256; cv=none; b=V/bRuVMkpFjH7xdtsop7J/J0EiBYnXwuFxkDy197e6YUxmcd0yZYr/30hoP+dPAe/wPAnf dsFRbcHfvTIIJj89AdOsHgE1PNd841yIfrYg0AT19z4E1JDsIPMgbu8z++J36E2huPfeig MprFKZy2oV7f/9+c1WLK4FXlG3w+wHuSbIuT98TAah9UiNmQly/WpNLubPzpHahKZ11H7Z IIYTiVW51VsYYrlPEQ20S3e24wN9FG8+qegA4lq9ctJyVnXiQTF4qVfDm0tx6hK/6USqZS b8akOm6714PeDr4tOwiG9W3mCV9hywpnF83izgs6yRI9oFVxKgRuIuyi0rehPA== X-Spam-Score: -4.87 X-Migadu-Queue-Id: 599D2282D1 X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gnu.org header.s=fencepost-gnu-org header.b=mHIeHsXA; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -4.87 X-TUID: QpflQmwrzmhT Hi! Ricardo Wurmus skribis: > here is some output from =E2=80=9Cguix system reconfigure=E2=80=9D: > > =E2=80=A6 > activating system... > The following derivation will be built: > /gnu/store/7361cd8aasxwwb93ygdfwjp3ghn06ahb-switch-to-system.scm.drv > > building /gnu/store/7361cd8aasxwwb93ygdfwjp3ghn06ahb-switch-to-system.scm= .drv... > making '/gnu/store/rp04hkqlzx5j2lhxainsz77vpqqigsjz-system' the current s= ystem... > setting up setuid programs in '/run/setuid-programs'... > populating /etc from /gnu/store/gq2dvz09wf3sdmvynr2vdzy5wwj7k9fd-etc... > The files belonging to this database system will be owned by user "postgr= es". > This user must also own the server process. > > The database cluster will be initialized with locale "en_US.utf8". > The default database encoding has accordingly been set to "UTF8". > The default text search configuration will be set to "english". > > Data page checksums are disabled. > > initdb: error: directory "/var/lib/postgresql/data" exists but is not emp= ty > If you want to create a new database system, either remove or empty > the directory "/var/lib/postgresql/data" or run initdb > with an argument other than "/var/lib/postgresql/data". > Starting installation ... > Validate installation settings ... > Create file system structures ... > Create self-signed certificate database ... > Error: Instance creation failed! Failed to start DS These lines are produced by activation snippets; they don=E2=80=99t go thro= ugh shepherd. > You see that there is output of tools that run as part of service > activation snippets. It is not clear which service is responsible for > any particular line of output. > > What service produced the line =E2=80=9CError: Instance creation failed! = Failed > to start DS=E2=80=9D, for example? I know it=E2=80=99s the directory-ser= ver-localhost > service, because that=E2=80=99s what I=E2=80=99m working on right now, bu= t it=E2=80=99s not > clear from the output. > > What do you think of prefixing every line with the name of the service > that is responsible for it? This way we could probably also > prettify/post-process the output somewhat. I agree it would be great; it=E2=80=99s not related to shepherd though (she= pherd already does that). Now, maybe some activation snippets could be moved to the =E2=80=98start=E2= =80=99 method of the corresponding service. That is, instead of: (make-forkexec-constructor =E2=80=A6) you=E2=80=99d have: (lambda () (invoke =E2=80=A6) ;run some initialization command here (fork+exec-command =E2=80=A6)) In some cases that may be more appropriate; as a bonus, it would solve the logging problem since shepherd would log it correctly. WDYT? Ludo=E2=80=99.