🎨 Add fallback traefik 503 routes 🚨⚠️ DEVOPS #7899
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What do these changes do?
Add fallback routes that will take effect once main services (e.g. webserver is not in
running
state). This fallback routes will trigger 503 traefik default response which is a proper response when simcore service is not inrunning
state.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)
invitaitons
service as its traefik config lives inops
reposimcore traefik
(this routes configureops traefik
)How to test
Scale exposed simcore service (e.g.
webserver
to0
replicas). Open platform in browser and ensure you get503
error withUnavailable service
message (instead of404 not found
)Dev-ops