Bug #11587
closedEnsure service (re)started does now work if systemd hit "start-limit"
Description
After playing around with a haproxy config templated by rudder and having an NCF method that restarts the daemon after the file has changed, systemd <3
broke down due "start-limit" being hit.
Rudder reported:
E| error HAProxy Service check running haproxy Check if the service haproxy is started could not be repaired
Because:
systemd[1]: haproxy.service: Failed with result 'start-limit'.
It would be nice if rudder could handle this case in a "sane" way.
Updated by Janos Mattyasovszky over 7 years ago
This is basically crap, because a service does not only have a started/stopped state, but also a "might be good but go F.you I refuse to restart it" broken one :( pretty hard to get included somehow...
maybe always reset the state with systemctl reset-failed haproxy
before trying any service start/restart actions?
Updated by Benoît PECCATTE over 7 years ago
This looks like a systemd limitation.
It seems that your service is not properly integrated into systemd and needs a better status check.
I think we should first understand what systemd is trying to tell us before working around it.
Updated by Benoît PECCATTE over 7 years ago
- Severity set to Minor - inconvenience | misleading | easy workaround
- User visibility set to Operational - other Techniques | Technique editor | Rudder settings
- Priority changed from 0 to 32
We don't want to do this for every systemd service because it could hide real problems.
As a workaround, since you have restarted the service using ncf, you can also call systemctl reset-failed from ncf.
Updated by François ARMAND over 5 years ago
- Effort required set to Very Small
Budget: very-small: what we want to do with that ticket? Close it as "won't fix", document workaround, implement a work around?
Updated by Alexis Mousset over 5 years ago
See https://bugzilla.redhat.com/show_bug.cgi?id=1016548 for reference.
We can add ystemctl reset-failed {}.service
as it would just force to actually try a restart when Rudder wants to do it.
Ideally we should only do iy just before an actual start or restart.
Updated by Alexis Mousset over 5 years ago
- Target version changed from 5.0.15 to 6.0.0
Let's target 6.0 as it may alter the behavior of the method. For 5.0, the command may be triggered manually before the restart with a "service action" method.
Updated by Alexis Mousset over 5 years ago
- Status changed from In progress to Pending technical review
- Assignee changed from Alexis Mousset to Nicolas CHARLES
- Pull Request set to https://github.com/Normation/ncf/pull/1101
Updated by Alexis Mousset over 5 years ago
- Status changed from Pending technical review to Pending release
Applied in changeset 777c8c0b3ca53b8c684c75255580978950f766b3.
Updated by Alexis Mousset over 5 years ago
- Status changed from Pending release to Released
This bug has been fixed in Rudder 6.0.0 which was released today.