-
Notifications
You must be signed in to change notification settings - Fork 23
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
Allow reconfiguration without restart #742
Conversation
This is still in draft state. What it does so far: upon receiving SIGUSR2, it will increase the global counter, thus causing a reload of all certificate scopes next time they are needed. I confirmed that it works by changing the file and invoking docker compose kill -s SIGUSR2 web However, if the file cannot be loaded (because of syntax errors, for instance), the error will only appear later on (as I said, the next time the certificate scopes are needed). I want to see the error at once. For this and other reasons, I still want to implement the following changes
Oh, and
|
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.
Is it intentional that functionality which seems unrelated to online reload is removed in this PR? (e.g., get_subjects
and so on.)
The signal part seems to be alright as far as I can see, if really only a single process is ever used to serve requests. That might change when workers are scaled, because this starts separate Python processes. Also, in the future, using USR2 could be problematic if the server needs to be changed (e.g., using gunicorn to run the uvicorn workers), because libraries like gunicorn could be using signals for similar purposes of "online reconfiguration".
Signed-off-by: Matthias Büchse <[email protected]>
Signed-off-by: Matthias Büchse <[email protected]>
Signed-off-by: Matthias Büchse <[email protected]>
Signed-off-by: Matthias Büchse <[email protected]>
Signed-off-by: Matthias Büchse <[email protected]>
Closes #666.