-
Notifications
You must be signed in to change notification settings - Fork 32
🎨 Add fallback traefik 503 routes 🚨⚠️ DEVOPS #7899
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
🎨 Add fallback traefik 503 routes 🚨⚠️ DEVOPS #7899
Conversation
Add fallback routes that will take effect once main services (e.g. webserver is not in `running` state). Once service is not in `running` state, its configuration is removed from traefik leading to 404. Related Issue(s): * ITISFoundation/osparc-ops-environments#218 Related PR(s): * ITISFoundation/osparc-ops-environments#950
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #7899 +/- ##
==========================================
+ Coverage 87.89% 87.93% +0.04%
==========================================
Files 1841 1834 -7
Lines 70996 70806 -190
Branches 1227 1227
==========================================
- Hits 62400 62266 -134
+ Misses 8242 8186 -56
Partials 354 354
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
sanderegg
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks!
|
@Mergifyio queue |
🟠 Waiting for conditions to match
|
mrnicegyu11
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀 🪨
comment see parent PR ITISFoundation/osparc-ops-environments#950 (review)
|
@Mergifyio queue |
🟠 Waiting for conditions to match
|
|
Do not merge before |
pcrespov
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thx
|
@Mergifyio queue |
✅ The pull request has been merged automaticallyThe pull request has been merged automatically at bfb683d |
Test expects services to have exposed ports (either in Dockerfile or in docker compose spec). "traefik-configuration-placeholder" uses busybox image which has no exposed ports in Dockerfile and we don't expose ports in docker compose as we don't need them (this services is simply a placeholder for traefik rules that we want to configure on simcore traefik)
|
The name is service name is too long and causes >64 len char issue when deploying in prod. This fixes the problem by using a short name Related PR/s * original introduction of this servicehttps://github.com/ITISFoundation/pull/7899 * corresponding ops changes ITISFoundation/osparc-ops-environments#1177



What do these changes do?
Add fallback routes that will take effect once main services (e.g. webserver is not in
runningstate). This fallback routes will trigger 503 traefik default response which is a proper response when simcore service is not inrunningstate.By default traefik removes configuration of services that are not in running state (this leads to
404) traefik/traefik#7842Next steps
Ship relevant html / json content back to users. We need to discuss what is proper content and in which scenarios we need to serve it.
Implementation details
https://doc.traefik.io/traefik/providers/swarm/#allowemptyservices traefik configuration setting was tested but had no effect as reported in traefik/traefik#11827
We don't have traefik healthcheck for
simcore traefik. Since we need to introduce healthcheck per traefik-service and simcore traefik defines multiple of those, introducing extra 3 calls on traefik service might be an overkill. It is not clear is this healthcheck makes sense in general as it runs against traefik itself 🤷Related issue/s
Related PR(s)
invitaitonsservice as its traefik config lives inopsreposimcore traefik(this routes configureops traefik)How to test
Scale exposed simcore service (e.g.
webserverto0replicas). Open platform in browser and ensure you get503error withUnavailable servicemessage (instead of404 not found)Dev-ops