From b328e0f7d94b9696b3fc17fe84e87e868b9573d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Behmo?= Date: Tue, 23 Jun 2020 19:11:35 +0200 Subject: [PATCH] Fix undefined settings in k8s scripts In k8s, creating a user is an interactive command, so it needs to run in exec. Thus, the DJANGO_SETTINGS_MODULE needs to be defined for this command. Close #344 --- CHANGELOG.md | 4 ++++ tutor/scripts.py | 1 + 2 files changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e489ba6..c8de49e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ Note: Breaking changes between versions are indicated by "💥". +## Unreleased + +- [Bugfix] Fix undefined settings in k8s scripts, such as `createuser` + ## v10.0.7 (2020-06-22) - [Bugfix] Fix TypeError on viewing xblock diff --git a/tutor/scripts.py b/tutor/scripts.py index a2c03a6..5389606 100644 --- a/tutor/scripts.py +++ b/tutor/scripts.py @@ -3,6 +3,7 @@ from . import fmt from . import plugins BASE_OPENEDX_COMMAND = """ +export DJANGO_SETTINGS_MODULE=$SERVICE_VARIANT.envs.$SETTINGS echo "Loading settings $DJANGO_SETTINGS_MODULE" """