Skip to content

Commit 53bf005

Browse files
committed
feat: fix systemd timers
Signed-off-by: Arjun Raja Yogidas <[email protected]>
1 parent a5b49e1 commit 53bf005

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

pkg/healthcheck/healthcheck_manager_linux.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,18 +49,19 @@ func CreateTimer(ctx context.Context, container containerd.Container) error {
4949
containerID := container.ID()
5050
hcName := hcUnitName(containerID, true) // TODO add random suffix each time timer file is created for a container
5151
fmt.Printf("⏱️ Creating healthcheck timer unit: %s\n", hcName) // TODO remove this later
52-
cmd := []string{"--property", "LogLevelMax=notice"}
52+
cmd := []string{}
5353
if rootlessutil.IsRootless() {
5454
cmd = append(cmd, "--user")
5555
}
5656
if path := os.Getenv("PATH"); path != "" {
5757
cmd = append(cmd, "--setenv=PATH="+path)
5858
}
5959

60-
cmd = append(cmd, "--unit", hcName, "--on-unit-inactive="+hc.Interval.String(), "--timer-property=AccuracySec=1s", "nerdctl", "container", "healthcheck", containerID)
60+
cmd = append(cmd, "--unit", hcName, "--on-unit-inactive="+hc.Interval.String(), "--timer-property=AccuracySec=1s")
6161

62+
cmd = append(cmd, "nerdctl", "container", "healthcheck", containerID)
6263
if logrus.IsLevelEnabled(logrus.DebugLevel) {
63-
cmd = append(cmd, "--log-level=debug", "--syslog")
64+
cmd = append(cmd, "--debug")
6465
}
6566

6667
conn, err := dbus.NewSystemConnectionContext(context.Background())

0 commit comments

Comments
 (0)