systemctl --failed does not show failed units if unit has Restart=on-failure option
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 16.7k
- Forks
- 4.7k
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 140
Description
Submission type
- Bug report
systemd version the issue has been seen with
systemd 235.0-1
Used distribution
ArchLinux
In case of bug report: Expected behaviour you didn't see
systemctl --failed should show failed units but it does not if unit has Restart=on-failure
In case of bug report: Steps to reproduce the problem
# cat /etc/systemd/system/qwe.service
[Unit]
Description=qwe
[Service]
Type=simple
ExecStart=/usr/bin/false
RestartSec=30
Restart=on-failure
[Install]
WantedBy=multi-user.target
-
systemctl enable --now qwe.service
-
systemctl --failed
Does not show qwe.service as failed -
Comment out 2 Restart* lines
-
systemctl --system daemon-reload ; systemctl restart qwe
-
systemctl --failed
Shows qwe.service as failed
I expected that systemctl --failed will show all units with problems independently on Restart options.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No source file or test is named. Reproduce the qwe.service unit with Restart=on-failure, then trace how systemctl --failed determines which units to display; done when the command lists that failed unit while restart is configured and the behavior is covered by a regression test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, linux
- Domain
- cli, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100