6
0
mirror of https://github.com/ChristianLight/tutor.git synced 2024-11-04 20:37:52 +00:00

Fix nginx DNS resolution of restarted services

Previously, a common error when restarting e.g: the lms or the cms was
that nginx redirected to the wrong container. For instance:

    access studio.localhost
    tutor local restart lms cms
    access studio.localhost

In the second call to studio.localhost, we were frequently trying to
access the LMS, which resulted in a 400 error.

We solve this issue by setting a TTL of 10s on the nginx proxy name
resolution.

More docs:
http://nginx.org/en/docs/http/ngx_http_core_module.html#resolver
This commit is contained in:
Régis Behmo 2020-03-12 09:53:18 +01:00
parent e2a3a2d912
commit 0cf8958e3a
2 changed files with 4 additions and 0 deletions

View File

@ -4,6 +4,7 @@ Note: Breaking changes between versions are indicated by "💥".
## Unreleased
- [Bugfix] Fix DNS resolution of restarted service
- [Feature] Restart multiple services with `local restart`
- [Feature] Make it possible to easily reload openedx gunicorn process with `tutor local exec lms reload-gunicorn``
- [Improvement] Rename lms/cms_worker to lms/cms-worker in local deployment

View File

@ -1,2 +1,5 @@
# Allow long domain names
server_names_hash_bucket_size 128;
# Set a short ttl for proxies to allow restarts
resolver 127.0.0.1 [::1]:5353 valid=10s;