mirror of
https://github.com/minio/minio.git
synced 2025-11-09 21:49:46 -05:00
Controller rpc tests (#2709)
* Test code for controller-handler operations: * Heal operations * List operation * Switch to "testing" lib, moving away from gocheck * Minor refactors * Remove extra call to initGracefulShutdown * Remove dead code in mainControl: Dead code found by the TestControlMain() test function that always passes. * Add tests for control-*-main.go
This commit is contained in:
committed by
Harshavardhana
parent
559ad38b8c
commit
32f097b4d6
12
cmd/utils.go
12
cmd/utils.go
@@ -293,18 +293,22 @@ func startMonitorShutdownSignal(onExitFn onExitFunc) error {
|
||||
// Initiate graceful shutdown.
|
||||
globalShutdownSignalCh <- shutdownHalt
|
||||
case signal := <-globalShutdownSignalCh:
|
||||
// Call all object storage shutdown callbacks and exit for emergency
|
||||
// Call all object storage shutdown
|
||||
// callbacks and exit for emergency
|
||||
exitCode := globalShutdownCBs.RunObjectLayerCBs()
|
||||
if exitCode != exitSuccess {
|
||||
runExitFn(exitCode)
|
||||
|
||||
}
|
||||
|
||||
exitCode = globalShutdownCBs.RunGenericCBs()
|
||||
if exitCode != exitSuccess {
|
||||
runExitFn(exitCode)
|
||||
}
|
||||
// All shutdown callbacks ensure that the server is safely terminated
|
||||
// and any concurrent process could be started again
|
||||
|
||||
// All shutdown callbacks ensure that
|
||||
// the server is safely terminated and
|
||||
// any concurrent process could be
|
||||
// started again
|
||||
if signal == shutdownRestart {
|
||||
path := os.Args[0]
|
||||
cmdArgs := os.Args[1:]
|
||||
|
||||
Reference in New Issue
Block a user