Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change behaviour when device disconnects #107

Closed
coretl opened this issue Apr 3, 2024 · 2 comments · Fixed by #108
Closed

Change behaviour when device disconnects #107

coretl opened this issue Apr 3, 2024 · 2 comments · Fixed by #108
Assignees

Comments

@coretl
Copy link
Contributor

coretl commented Apr 3, 2024

  • Add top level STATE PV that can be
    • DISCONNECTED
    • CONNECTING
    • CONNECTED
  • At startup set to CONNECTING, then CONNECTED if it works
  • If it fails to connect then immediately fail with a traceback and let Kubernetes restart the process
  • While CONNECTED if the TCP connection drops then set to DISCONNECTED and halt the polling process
  • Add a liveness probe on the STATE PV
  • Any other error should log to the console, but continue the process
@AlexanderWells-diamond
Copy link
Contributor

If it fails to connect then immediately fail with a traceback and let Kubernetes restart the process

I suspect I'm missing key information here, but that sort of thing sounds like it could end up in an infinitely failing loop, if the connection is impossible for some external reason?

@coretl
Copy link
Contributor Author

coretl commented Apr 3, 2024

Kubernetes has a backoff mechanism, so it will wait longer and longer between restarts. This is more visible than anything we could invent ourselves...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants