I'm currently using a service from a vendor who seems to have ported their setup into k8s by using this python replacement for systemd as the entrypoint to the containers. Their product relies on a service running via systemctl which keeps a connection to a server pod. When that server pod gets restarted the service loses connection and fails.
The service is configured with StartLimitIntervalSec=0 in the [Unit] definition which, according to resources like this one will mean that it gets restarted forever and will eventually, in this case, find a reference to the new server pod. Unfortunately that seems to not work in this python driven universe. The service fails and the product falls down and needs manual intervention via kubectl exec to run systemctl restart and get things back on track. In my case that means anything like automatic patching is guaranteed to break the whole system unless the entire process is babysat.
I did experiment and see that StartLimitIntervalSec=0 in the [Unit] section doesn't seem to override the systemctl.py default of 10, but placing it within the [Service] definition does. And even then the underlying restart loop doesn't seem to give the expected behavior when this value is set to 0.
Tl;Dr: Is there a way to configure a service via systemctl3.py such that it will continue trying to Restart forever?
I'm currently using a service from a vendor who seems to have ported their setup into k8s by using this python replacement for systemd as the entrypoint to the containers. Their product relies on a service running via systemctl which keeps a connection to a server pod. When that server pod gets restarted the service loses connection and fails.
The service is configured with
StartLimitIntervalSec=0
in the [Unit] definition which, according to resources like this one will mean that it gets restarted forever and will eventually, in this case, find a reference to the new server pod. Unfortunately that seems to not work in this python driven universe. The service fails and the product falls down and needs manual intervention via kubectl exec to run systemctl restart and get things back on track. In my case that means anything like automatic patching is guaranteed to break the whole system unless the entire process is babysat.I did experiment and see that StartLimitIntervalSec=0 in the [Unit] section doesn't seem to override the systemctl.py default of 10, but placing it within the [Service] definition does. And even then the underlying restart loop doesn't seem to give the expected behavior when this value is set to 0.
Tl;Dr: Is there a way to configure a service via systemctl3.py such that it will continue trying to Restart forever?