lightning-terminal icon indicating copy to clipboard operation
lightning-terminal copied to clipboard

Start retrying/restarting the various sub-servers if they error out.

Open ellemouton opened this issue 10 months ago • 0 comments

Before #541, if Lit failed to connect to a remote LND instance, then Lit itself would also shutdown. If users are running Lit in a docker container, then this would be fine since docker would continually try to restart LiT until it succeeded. This is useful in cases where a user wants to restart LND.

The reason for adding the status server is that if LiT does fail to start for some reason that needs to be addressed by the user, then the user would still be able to query the status server to see which sub-system is failing. This is nice but now Lit wont shutdown (and hence wont be restarted by the docker container) until the user specifically requests it to (via litcli stop).

To address this, we should let LiT do this "restarting" instead. So if it fails to start anything, it should retry itself. For example: many of the subservers depend on LND and so will throw a critical error if LND shuts down. So if this happens, LiT should pick it up, continue to try and reconnect to LND and once it has succeeded, it should try restart all the dependent sub-servers.

ellemouton avatar Sep 26 '23 12:09 ellemouton