superset-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [incubator-superset] smacker opened a new pull request #8156: Forward SIGTERM signal to gunicorn
Date Mon, 02 Sep 2019 14:56:54 GMT
smacker opened a new pull request #8156: Forward SIGTERM signal to gunicorn
URL: https://github.com/apache/incubator-superset/pull/8156
 
 
   ### CATEGORY
   
   Choose one
   
   - [x] Bug Fix
   - [ ] Enhancement (new features, refinement)
   - [ ] Refactor
   - [ ] Add tests
   - [ ] Build / Development Environment
   - [ ] Documentation
   
   ### SUMMARY
   
   Currently docker entrypoint is a bash script.
   `docker stop` command (or restart in kubernetes) sends SIGTERM to the
   container but it isn't catched by gunicorn.
   So gunicorn can't start graceful shutdown which may lead to killing
   user's connection and also adds 10s (default value) delay for stopping
   until docker sends SIGKILL.
   Using `exec` replaces the shell with the process being opened and
   signals are propagated correctly.
   
   Ref: https://docs.docker.com/engine/reference/commandline/stop/
   Ref: https://unix.stackexchange.com/questions/146756/forward-sigterm-to-child-in-bash
   
   ### TEST PLAN
   
   Run superset in docker container and execute `docker stop` on master it would result in:
   1. 10s delay before stopping
   2. Exit code 137 (means gunicorn was killed)
   
   Run superset in docker container and execute `docker stop` from this branch it would result
in: 
   1. Quick exit (~1s)
   2. Correct exit code 0
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [ ] Has associated issue:
   - [ ] Changes UI
   - [ ] Requires DB Migration.
   - [ ] Confirm DB Migration upgrade and downgrade tested.
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   
   ### REVIEWERS
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Mime
View raw message