Rolling upgrade support for in-flight requests 11/97811/4
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>
Tue, 5 Nov 2019 23:05:03 +0000 (18:05 -0500)
commit4d411a80405b9031a10fe53a4d021f4f246bbaa2
tree97a1916b8a82c67a5e599253717a9c5fdb6bc9dd
parente967b59012d3aec0a5ad01d1ad508fc1e0a61a5f
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: I3e2a72e26a4c8b7768ebc374ea40aa8d55fb6761
ms/blueprintsprocessor/application/src/main/docker/Dockerfile
ms/blueprintsprocessor/application/src/main/docker/run.source [deleted file]
ms/blueprintsprocessor/application/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