You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Deploy via Helm on Kubernetes (AKS in my case, can't speak for other cloud providers)
None of the backend Pods will succeed in creating the /home/django/keys/secret_key.py file.
Expected Behavior
The first backend Pod that reaches the generate_secret_key() function should be able to create it.
Possible Solution
Manually creating the /home/django/keys/secret_key.py file solves the issue, but it would be great if there would be a solution contained in the Helm. An initContainer that creates the file, e.g.
All of the backend Pods encounter the same issue, with the following stacktrace:
Traceback (most recent call last):
File "/home/django/cvat/settings/base.py", line 77, in <module>
from keys.secret_key import SECRET_KEY # pylint: disable=unused-import
ModuleNotFoundError: No module named 'keys.secret_key'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/django/manage.py", line 20, in <module>
execute_from_command_line(sys.argv)
File "/opt/venv/lib/python3.10/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
utility.execute()
File "/opt/venv/lib/python3.10/site-packages/django/core/management/__init__.py", line 382, in execute
settings.INSTALLED_APPS
File "/opt/venv/lib/python3.10/site-packages/django/conf/__init__.py", line 102, in __getattr__
self._setup(name)
File "/opt/venv/lib/python3.10/site-packages/django/conf/__init__.py", line 89, in _setup
self._wrapped = Settings(settings_module)
File "/opt/venv/lib/python3.10/site-packages/django/conf/__init__.py", line 217, in __init__
mod = importlib.import_module(self.SETTINGS_MODULE)
File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 883, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/home/django/cvat/settings/production.py", line 5, in <module>
from .base import *
File "/home/django/cvat/settings/base.py", line 79, in <module>
generate_secret_key()
File "/home/django/cvat/settings/base.py", line 69, in generate_secret_key
os.link(f.name, os.path.join(keys_dir, secret_key_fname))
OSError: [Errno 95] Operation not supported: '/home/django/keys/secret_key.py.qmky3wru' -> '/home/django/keys/secret_key.py'
Environment
- Image tag: v2.14.1
- Kubernetes version 1.27.9, provided by AKS, with Linux Nodes
The text was updated successfully, but these errors were encountered:
Actions before raising this issue
Steps to Reproduce
/home/django/keys/secret_key.py
file.Expected Behavior
The first backend Pod that reaches the
generate_secret_key()
function should be able to create it.Possible Solution
Manually creating the
/home/django/keys/secret_key.py
file solves the issue, but it would be great if there would be a solution contained in the Helm. An initContainer that creates the file, e.g.Context
Related to #7892.
All of the backend Pods encounter the same issue, with the following stacktrace:
Environment
The text was updated successfully, but these errors were encountered: