Skip to content
This repository has been archived by the owner on May 30, 2022. It is now read-only.

Add connection retry when starting Web and Runner #753

Merged
merged 1 commit into from
Feb 1, 2022

Conversation

flaviodsr
Copy link
Contributor

  • In case of starting trento-web and the connection with the database
    fails, instead of failing immediately, retry to connect to the database
    8 times with a variable backoff starting with 3 seconds.

  • In case of starting the trento-runner and the connection with the
    trento server fails, instead of failing immediately, retry to connect
    to the trento server 8 times with a variable backoff starting with 5
    seconds.

The above retries allows configuring the trento web and runner pods
with probes so the container does not fail and reports errors while
the database is still initializing.

* In case of starting trento-web and the connection with the database
fails, instead of failing immediately, retry to connect to the database
8 times with a variable backoff starting with 3 seconds.

* In case of starting the trento-runner and the connection with the
trento server fails, instead of failing immediately, retry to connect
to the trento server 8 times with a variable backoff starting with 5
seconds.

The above retries allows configuring the trento web and runner pods
with probes so the container does not fail and reports errors while
the database is still initializing.
Copy link
Member

@fabriziosestito fabriziosestito left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Contributor

@arbulu89 arbulu89 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!
We can refine the used values on the road if we need

@rtorrero
Copy link
Contributor

rtorrero commented Feb 1, 2022

LGTM, thanks @flaviodsr !

@rtorrero rtorrero merged commit 562939c into trento-project:main Feb 1, 2022
@dottorblaster dottorblaster added the enhancement Improvement of existing features label Feb 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Improvement of existing features
Development

Successfully merging this pull request may close these issues.

None yet

6 participants