Restart loop when using PathExistsGlob

Bug #1973589 reported by Antonios Tsianakas
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
systemd (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

When using PathExistsGlob in a path unit, systemd starts the corresponding service unit in an infinite loop. We have observed this problem only under Jammy.

--------------
[Unit]
Description=Test

[Path]
PathExistsGlob=/home/www-data/test/*.so
Unit=test.service

[Install]
WantedBy=multi-user.target

--------------
[Unit]
Description=Test

[Service]
Type=simple
ExecStart=echo test
StartLimitBurst=1000

[Install]
WantedBy=multi-user.target

-------------
www-data@josi-test-jammy03:~ $ systemctl --user status test.path
× test.path - Test
     Loaded: loaded (/home/www-data/.config/systemd/user/test.path; disabled; vendor preset: enabled)
     Active: failed (Result: unit-start-limit-hit) since Mon 2022-05-16 17:08:08 CEST; 121ms ago
   Triggers: ● test.service

May 16 17:08:04 josi-test-jammy03 systemd[24979]: Started Test
May 16 17:08:08 josi-test-jammy03 systemd[24979]: test.path: Failed with result 'unit-start-limit-hit'.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in systemd (Ubuntu):
status: New → Confirmed
description: updated
Revision history for this message
Nick Rosbrook (enr0n) wrote :

I think this is to be expected since your service just does one thing and exits immediately -- when the service exists, the PathExistsGlob condition is still true, and so the service is activated again by test.path.

If you had a long running service, or another condition to say "we already ran test.service, no need to run again", you would avoid this.

Changed in systemd (Ubuntu):
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.