-
Notifications
You must be signed in to change notification settings - Fork 3
Commits on May 7, 2021
-
Unregister subprocesses once they are no longer running
Signed-off-by: Jan Dubois <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for e2d5ef6 - Browse repository at this point
Copy the full SHA e2d5ef6View commit details -
Don't exit container-run until SIGTERM is received, or the main proce…
…ss fails To avoid terminating early and killing a still running drain script it is necessary to keep the container-run process running even if the main process has already exited. Once container-run receives the SIGTERM signal it will pass it on to the child processes and then wait until all direct children have exited before exiting itself. This should allow the processes to terminate cleanly as long as the grace period has not yet expired. container-run will also terminate immediately if the main process terminates with an error. This allows the container to fail and be restarted by k8s. Signed-off-by: Jan Dubois <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 19b5b5d - Browse repository at this point
Copy the full SHA 19b5b5dView commit details -
Add QUIT command to send SIGQUIT to process
This is used to trigger graceful shutdown of nginx. Signed-off-by: Jan Dubois <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for f009f41 - Browse repository at this point
Copy the full SHA f009f41View commit details -
Create status indicator on the shared volume while the process is run…
…ning Can be used to wait for a process to stop after sending the STOP command. Signed-off-by: Jan Dubois <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 50be76f - Browse repository at this point
Copy the full SHA 50be76fView commit details -
Write /var/vcap/jobs/bpm/bin/bpm script for drain script usage
It only supports the "start" and "stop" commands from the real bpm, but has additional "quit" and "running" commands to help reimplementing drain scripts that make use of the pid files. Signed-off-by: Jan Dubois <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 804b256 - Browse repository at this point
Copy the full SHA 804b256View commit details
Commits on May 8, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 484a7fb - Browse repository at this point
Copy the full SHA 484a7fbView commit details -
Make errors channel unbuffered again
It is important to process errors synchronously because their handling depends on the value of the 'active' flag. To avoid deadlocks any code sending errors to the channel must run in a blockable goroutine. Signed-off-by: Jan Dubois <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for f822405 - Browse repository at this point
Copy the full SHA f822405View commit details -
Use SIGTERM instead of SIGKILL to STOP processes
(and give them a chance to notify their child processes). If the processes haven't terminated in 20s, send SIGKILL. Signed-off-by: Jan Dubois <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 2b39e8a - Browse repository at this point
Copy the full SHA 2b39e8aView commit details -
Add some additional debug logging
Signed-off-by: Jan Dubois <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 6cb69e3 - Browse repository at this point
Copy the full SHA 6cb69e3View commit details -
Unregister process as soon as it quits
Signed-off-by: Jan Dubois <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for d72b104 - Browse repository at this point
Copy the full SHA d72b104View commit details -
Call stopProcesses on SIGTERM (and SIGINT for testing)
That way it also starts the timeout trigger if the process doesn't stop within 20s. Signed-off-by: Jan Dubois <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for f4213ce - Browse repository at this point
Copy the full SHA f4213ceView commit details -
Only handle SIGINT, SIGQUIT, and SIGTERM signals
The rest are just confusing the debug output, and passing on e.g. SIGCHLD to the child processes is neither correct nor useful. Signed-off-by: Jan Dubois <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 2f616e5 - Browse repository at this point
Copy the full SHA 2f616e5View commit details -
bpm stop now waits up to 30s for the process to stop
container-run should send a SIGKILL if the process is still alive after 20s, so if it isn't gone after 30, then it probably will not stop. The `bpm running` subcommand will also now print "yes" or "no" in addition to setting the exit code. Signed-off-by: Jan Dubois <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 1029a22 - Browse repository at this point
Copy the full SHA 1029a22View commit details -
(but they no longer pass because they have not been updated with the new application logic). Signed-off-by: Jan Dubois <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 8480c60 - Browse repository at this point
Copy the full SHA 8480c60View commit details -
Add
bpm term
command; same as stop, but don't waitAlso modify `bpm running` to only print yes/no when stdout is a tty. Signed-off-by: Jan Dubois <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for f48b916 - Browse repository at this point
Copy the full SHA f48b916View commit details
Commits on May 10, 2021
-
Configuration menu - View commit details
-
Copy full SHA for a3870a4 - Browse repository at this point
Copy the full SHA a3870a4View commit details
Commits on May 11, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 3b5b6bb - Browse repository at this point
Copy the full SHA 3b5b6bbView commit details -
Run stopProcesses in a goroutine when called from the main goroutine
The errors channel is unbuffered, so stopProcesses cannot deliver errors if it is running from the same goroutine as the receiver. Signed-off-by: Jan Dubois <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 2776822 - Browse repository at this point
Copy the full SHA 2776822View commit details -
Configuration menu - View commit details
-
Copy full SHA for 87b8fed - Browse repository at this point
Copy the full SHA 87b8fedView commit details