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

Postflight script times out if it can not connect #2547

Merged
merged 1 commit into from
Jun 27, 2018

Conversation

nwmac
Copy link
Contributor

@nwmac nwmac commented Jun 27, 2018

Fixes #2546.

There is a race-condition with the Helm deployment - if the postflight job runs just before the DB Server is ready, it will sit for a long time trying to connect to it to determine if the db schema exists. You'll get the upgrade notice in the UI and it will take longer for Stratos to be available.

This PR fixes this and does a check with a lower timeout (5 seconds). If it can not connect in that time, it bails. Kubernetes will reschedule the post-flight job.. and it will then succeed (maybe after more retries).. but it will do so quickly.

@cfdreddbot
Copy link

Hey nwmac!

Thanks for submitting this pull request! I'm here to inform the recipients of the pull request that you and the commit authors have already signed the CLA.

@nwmac nwmac requested a review from irfanhabib June 27, 2018 14:21
@nwmac nwmac self-assigned this Jun 27, 2018
@codecov
Copy link

codecov bot commented Jun 27, 2018

Codecov Report

Merging #2547 into v2-master will decrease coverage by 0.02%.
The diff coverage is n/a.

@@              Coverage Diff              @@
##           v2-master    #2547      +/-   ##
=============================================
- Coverage      70.42%   70.39%   -0.03%     
=============================================
  Files            594      594              
  Lines          25132    25132              
  Branches        5674     5674              
=============================================
- Hits           17698    17692       -6     
- Misses          7434     7440       +6

Copy link
Contributor

@irfanhabib irfanhabib left a comment

Choose a reason for hiding this comment

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

LGTM

@irfanhabib irfanhabib merged commit add3caa into v2-master Jun 27, 2018
@irfanhabib irfanhabib deleted the postflight-db-timeout branch June 27, 2018 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Helm deployment: Upgrade notice can appear for some time if db takes a while to become ready
3 participants