From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 24313 invoked from network); 7 Mar 2023 11:54:00 -0000 Received: from alyss.skarnet.org (95.142.172.232) by inbox.vuxu.org with ESMTPUTF8; 7 Mar 2023 11:54:00 -0000 Received: (qmail 20658 invoked by uid 89); 7 Mar 2023 11:54:24 -0000 Mailing-List: contact supervision-help@list.skarnet.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Received: (qmail 20651 invoked from network); 7 Mar 2023 11:54:24 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678190036; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=sRjua4q0ZQuVYSr1EVJienGdUbDDpQU6kEqHt0J8ADY=; b=k7huc+qDudh/9zcFlT6Ksi84oAGcrLmOD4Lt3eQtLvVsv9SXkIo/b9aHAFGNslV/hE QsE0zlfc2zKK0cWg5pVxm2f2ghRgBQcfNxKrRdb3c1EquL3x3WfrYipMvfe298EXUa89 pMQKFR4NWtm5LaWeQNLJsGq0Cx/OnAC0UExWy2VmvRjhrm26g+hOuqgb/i0ICZ0lVIgj Z57OAj+920GuXX2Cn+nmTaXhkQJIEmWHTj65dmlBzNmMu5u6cWjJfhJKK5QNqJYimeE8 /aQHuZzfovRzQlqPTk/Whum1qlkpmlLR2zzvGti5OMmBwKsIV4nncWYU+l1SQiKBQuaa Mt0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678190036; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=sRjua4q0ZQuVYSr1EVJienGdUbDDpQU6kEqHt0J8ADY=; b=41nhpDFqo5w+6J8Sk2FlqOr+x3PAxOl/LpdqDsUCGsQyDCWo4LR4py3AY0Kwv/7ddB 0vIYRuAkmAzWM9Ex/BzqsN2a3OINlev7dQbQiwIMfaHbqfpJXRWtWQvirypwqzLKNfKa xK9qzj+oai4JjiumHRJqCIPupg3obNHXjzBh5yMP/Yy+juiYiI3m0dDnTyT1LzNl22fe tCStbQ51BSrE0F81jd8c1FWTz5oJAq5oNdaBnawqfG677RawQV7muQh2nQoSOPWB089c 8zPxC096UzxNzoyYy+513I4OfS0PeTod09LxOAym3asbtL7rDyJan5jDQCZvRbeoVHnv gdjg== X-Gm-Message-State: AO0yUKVobaGF25VLtzKS6/HgSILd4ZiBuv+R4/TwyghlzWW+H8K0jEvn nm1Ilm3BtDgQV2sO7tqyUuehL/amcHqP30BfeRk= X-Google-Smtp-Source: AK7set97XqCDX1VTItOcMyK4mB3VpeaocDuhQkk+j/gBVC+9x9nWI7La6r7azxwn75AYbLfVpKnGk1U+VkZnrw2Cr/4= X-Received: by 2002:a02:aa1c:0:b0:3b4:42bd:bec with SMTP id r28-20020a02aa1c000000b003b442bd0becmr7233014jam.4.1678190036458; Tue, 07 Mar 2023 03:53:56 -0800 (PST) MIME-Version: 1.0 References: <87edq0suut.fsf@telent.net> In-Reply-To: <87edq0suut.fsf@telent.net> From: Alex Kiernan Date: Tue, 7 Mar 2023 11:53:45 +0000 Message-ID: Subject: Re: s6-rc how to log oneshot services To: Daniel Barlow Cc: supervision@list.skarnet.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Mar 7, 2023 at 10:45=E2=80=AFAM Daniel Barlow wrot= e: > > > Hi all > > I've adopted s6 and s6-rc for a small distro that's targeted at > consumer wifi routers and similar low-powered devices (same target > devices as openwrt) and so far I am appreciating the consistency and the > warm fuzzies that I get from having a supervision tree (and simple > readiness checks!) instead of a folder full of pid files that may or > may not correspond with what's actually running. > We're very similar... my target has a decent amount of compute, but still an embedded device with constrained RAM and flash. > My question is: how should I handle logging for oneshot services? I > have oneshots doing things that might fail, like configuring network > interfaces or inserting modules, and I'd like those failure messages to > go somewhere useful as the longrun messages do. If I just add > a logging service to a oneshot with producer-for/consumer-for I get > > s6-rc-compile: fatal: longrun wlan.module-log declares a producer wlan.mo= dule of type oneshot > > so I guess that's not the answer ... > > What am I missing? I guess I could convert them into longruns that do > the "up" actions then call pause(2), but that seems a bit of a > ... non-traditional approach? > Interested in the right answer - right now we just have an icky hack so it just goes to uncaught-logs... redirfd -w 1 /run/service/s6-svscan-log/fifo I've not actually checked since we converted PID1 to s6-linux-init if we still need that - I suspect we may not. --=20 Alex Kiernan