Rolling upgrade support for in-flight requests 26/98426/1
authorSebastien Premont-Tendland <sebastien.premont@bell.ca>
Thu, 31 Oct 2019 19:37:48 +0000 (15:37 -0400)
committerSebastien Premont-Tendland <sebastien.premont@bell.ca>
Thu, 14 Nov 2019 19:52:38 +0000 (14:52 -0500)
commit03c7a8ddc3049f1b79b40ec96913eaaf8a539ef2
tree231a1ec8048408c38074e840763a095d13e1e23f
parent558ac2c252f5d22ff74b4f963ba1f23b26dcd248
Rolling upgrade support for in-flight requests

Three entry points are being handled :
 1 - REST endpoint
 2 - gRPC endpoint
 3 - Kafka consumer

We make use of Phaser object to make sure the PreDestroy callback wait
for all requests to be executed before stopping the process.

The docker image was also modified to make sure the java process becomes
PID 1 in the container in order to catch the SIGTERM signal which
triggers the PreDestroy callback of Spring. This was done by using
the "exec" command in bash.

Issue-ID: CCSDK-1885
Signed-off-by: Sebastien Premont-Tendland <sebastien.premont@bell.ca>
Change-Id: I64611e569ddb78499aed2375e6186f028d1d8fa0
ms/blueprintsprocessor/distribution/src/main/docker/Dockerfile
ms/blueprintsprocessor/distribution/src/main/docker/startService.sh
ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/BluePrintProcessingGRPCHandler.kt
ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/BluePrintProcessingKafkaConsumer.kt
ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/ExecutionServiceController.kt