git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: t7900 fails with recent debian systemd?

From
Jeff King <peff@peff.net>
Date
Dec 7, 2023, 06:27 UTC
Message-ID
<20231207062752.GA777253@coredump.intra.peff.net>
In-Reply-To
<CAPig+cT-vCraf2tfA3t3Rh6mLNTr0rB5mApmz0vu2MCRvssaVw@mail.gmail.com>
On Wed, Dec 06, 2023 at 05:40:59PM -0500, Eric Sunshine wrote:
Show 23 quoted lines
> On Wed, Dec 6, 2023 at 5:36 PM Jeff King <peff@peff.net> wrote:
> > After stracing, it is indeed looking for:
> >
> >   trash directory.t7900-maintenance/systemd/user/git-maintenance@hourly.service
> >
> > but that file doesn't exist. We installed git-maintenance@hourly.timer,
> > and git-maintenance@.service. Is the latter supposed to be a wildcard of
> > some kind? Maybe the rules changed. I don't really know anything about
> > systemd.
> 
> Apparently, that's intentional. From builtin/gc.c:
> 
>     /*
>      * No matter the schedule, we use the same service and can make
>      * use of the templating system. When installing
>      * git-maintenance@<schedule>.timer, systemd will notice that
>      * git-maintenance@.service exists as a template and will use this
>      * file and insert the <schedule> into the template at the
>      * position of "%i".
>      */
>     static int systemd_timer_write_service_template(const char *exec_path)
>     {
>         char *local_service_name = xstrfmt(SYSTEMD_UNIT_FORMAT, "", "service");

OK, that makes sense, and this is indeed the way to do template files in systemd.

> I'm not sure why the comment is talking about "%i", though.

The "%i" replacement is done on the contents of the template file itself. So inside git-maintenance@.service, the ExecStart line specifies that we should run "git maintenance run --schedule=%i".

This looks like a regression in systemd itself. I was able to bisect and I left a comment there:

  https://github.com/systemd/systemd/pull/30172#issuecomment-1844699620

I don't really see a way to work around it within our test suite, short of just skipping the "systemd-analyze verify" calls entirely. Hopefully my analysis is right and they will fix it soon, and we can consider it "not our problem" on this end. :)

-Peff
Previous: Eric Sunshine
Message 4 of 4 in “t7900 fails with recent debian systemd?”
  1. Jeff KingDec 6, 2023
  2. Jeff KingDec 6, 2023
  3. Eric SunshineDec 6, 2023
  4. Jeff KingDec 7, 2023

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.