Skip to content

Commit

Permalink
mantle/kola: fix systemd generator failure detection
Browse files Browse the repository at this point in the history
Apparently it can start with `systemd` or `sd-execu`. Here is an example:

```
Feb 23 21:50:38.240188 /usr/lib/systemd/system-generators/coreos-platform-chrony: line 44: /etc/sysconfig/network: Read-only file system
Feb 23 21:50:38.240195 (sd-execu[1020]: /usr/lib/systemd/system-generators/coreos-platform-chrony failed with exit status 1.
```

I think the difference may be whether the failure happens in the initramfs
or the real root. Let's make our regex matching more generic and also handle
more cases [1].

[1] https://github.com/systemd/systemd/blob/dafb406383610cc631345815919fd8a77ee0c4dc/src/basic/process-util.c#L663-L679
  • Loading branch information
dustymabe committed Feb 28, 2023
1 parent d6246b7 commit 8d26a40
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mantle/kola/harness.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ var (
{
// https://github.com/coreos/fedora-coreos-config/pull/1797
desc: "systemd generator failure",
match: regexp.MustCompile(`systemd\[[0-9]+\]: (.*) failed with exit status`),
match: regexp.MustCompile(`(/.*/system-generators/.*) (failed with exit status|terminated by signal|failed due to unknown reason)`),
},
}
)
Expand Down

0 comments on commit 8d26a40

Please sign in to comment.