From 6f262c8051143f22d7be77fc3a359b63caae6cfe Mon Sep 17 00:00:00 2001 From: Bogdan Dobrelya Date: Wed, 6 Feb 2019 15:00:33 +0100 Subject: [PATCH] Apply stop period for paunch-managed stateful svcs Apply stop_grace_period of a 60s for stateful services managed via paunch. That gives it time to attempt stopping it gracefully, while applying configuration updates. Also switch non-HA mysql template to run mysqld directly. This is because myslqd_safe does not process the graceful stop signals well, so we need to signal mysqld directly. Note: mysqld_safe helps for better coverging HA clusters so we leave it as is for the HA template. Change-Id: I329f871b6f2509c0133823ca4c22238e3e19c76d Related-bug: #1810690 Signed-off-by: Bogdan Dobrelya --- deployment/messaging/rpc-qdrouterd-container-puppet.yaml | 1 + .../rabbitmq/rabbitmq-messaging-notify-container-puppet.yaml | 1 + .../rabbitmq/rabbitmq-messaging-rpc-container-puppet.yaml | 1 + docker/services/database/mysql.yaml | 3 ++- docker/services/database/redis.yaml | 1 + 5 files changed, 6 insertions(+), 1 deletion(-) diff --git a/deployment/messaging/rpc-qdrouterd-container-puppet.yaml b/deployment/messaging/rpc-qdrouterd-container-puppet.yaml index 16b91e52d3..d7d6b44dcb 100644 --- a/deployment/messaging/rpc-qdrouterd-container-puppet.yaml +++ b/deployment/messaging/rpc-qdrouterd-container-puppet.yaml @@ -127,6 +127,7 @@ outputs: command: ['/bin/bash', '-c', 'chown -R qdrouterd:qdrouterd /var/log/qdrouterd'] qdrouterd: start_order: 1 + stop_grace_period: 60 image: *qdrouterd_image net: host user: qdrouterd diff --git a/deployment/rabbitmq/rabbitmq-messaging-notify-container-puppet.yaml b/deployment/rabbitmq/rabbitmq-messaging-notify-container-puppet.yaml index f9e4b94eab..d6fdb4196b 100644 --- a/deployment/rabbitmq/rabbitmq-messaging-notify-container-puppet.yaml +++ b/deployment/rabbitmq/rabbitmq-messaging-notify-container-puppet.yaml @@ -242,6 +242,7 @@ outputs: - {get_param: [DefaultPasswords, rabbit_cookie]} rabbitmq: start_order: 2 + stop_grace_period: 60 image: *rabbitmq_image net: host privileged: false diff --git a/deployment/rabbitmq/rabbitmq-messaging-rpc-container-puppet.yaml b/deployment/rabbitmq/rabbitmq-messaging-rpc-container-puppet.yaml index a457935bd9..12e09cb1ca 100644 --- a/deployment/rabbitmq/rabbitmq-messaging-rpc-container-puppet.yaml +++ b/deployment/rabbitmq/rabbitmq-messaging-rpc-container-puppet.yaml @@ -242,6 +242,7 @@ outputs: - {get_param: [DefaultPasswords, rabbit_cookie]} rabbitmq: start_order: 2 + stop_grace_period: 60 image: *rabbitmq_image net: host privileged: false diff --git a/docker/services/database/mysql.yaml b/docker/services/database/mysql.yaml index d98f156888..71f652637d 100644 --- a/docker/services/database/mysql.yaml +++ b/docker/services/database/mysql.yaml @@ -98,7 +98,7 @@ outputs: config_image: &mysql_config_image {get_param: DockerMysqlConfigImage} kolla_config: /var/lib/kolla/config_files/mysql.json: - command: /usr/bin/mysqld_safe + command: /usr/libexec/mysqld --user=mysql config_files: - source: "/var/lib/kolla/config_files/src/*" dest: "/" @@ -191,6 +191,7 @@ outputs: - {get_param: [DefaultPasswords, mysql_root_password]} mysql: start_order: 2 + stop_grace_period: 60 image: *mysql_image restart: unless-stopped net: host diff --git a/docker/services/database/redis.yaml b/docker/services/database/redis.yaml index 0f6074a9db..8009f416a1 100644 --- a/docker/services/database/redis.yaml +++ b/docker/services/database/redis.yaml @@ -113,6 +113,7 @@ outputs: command: ['/bin/bash', '-c', 'chown -R redis:redis /var/log/redis'] - redis: start_order: 1 + stop_grace_period: 60 image: *redis_image net: host privileged: false