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 <bdobreli@redhat.com>
This commit is contained in:
Bogdan Dobrelya 2019-02-06 15:00:33 +01:00
parent b8f29dc469
commit 6f262c8051
5 changed files with 6 additions and 1 deletions

View File

@ -127,6 +127,7 @@ outputs:
command: ['/bin/bash', '-c', 'chown -R qdrouterd:qdrouterd /var/log/qdrouterd'] command: ['/bin/bash', '-c', 'chown -R qdrouterd:qdrouterd /var/log/qdrouterd']
qdrouterd: qdrouterd:
start_order: 1 start_order: 1
stop_grace_period: 60
image: *qdrouterd_image image: *qdrouterd_image
net: host net: host
user: qdrouterd user: qdrouterd

View File

@ -242,6 +242,7 @@ outputs:
- {get_param: [DefaultPasswords, rabbit_cookie]} - {get_param: [DefaultPasswords, rabbit_cookie]}
rabbitmq: rabbitmq:
start_order: 2 start_order: 2
stop_grace_period: 60
image: *rabbitmq_image image: *rabbitmq_image
net: host net: host
privileged: false privileged: false

View File

@ -242,6 +242,7 @@ outputs:
- {get_param: [DefaultPasswords, rabbit_cookie]} - {get_param: [DefaultPasswords, rabbit_cookie]}
rabbitmq: rabbitmq:
start_order: 2 start_order: 2
stop_grace_period: 60
image: *rabbitmq_image image: *rabbitmq_image
net: host net: host
privileged: false privileged: false

View File

@ -98,7 +98,7 @@ outputs:
config_image: &mysql_config_image {get_param: DockerMysqlConfigImage} config_image: &mysql_config_image {get_param: DockerMysqlConfigImage}
kolla_config: kolla_config:
/var/lib/kolla/config_files/mysql.json: /var/lib/kolla/config_files/mysql.json:
command: /usr/bin/mysqld_safe command: /usr/libexec/mysqld --user=mysql
config_files: config_files:
- source: "/var/lib/kolla/config_files/src/*" - source: "/var/lib/kolla/config_files/src/*"
dest: "/" dest: "/"
@ -191,6 +191,7 @@ outputs:
- {get_param: [DefaultPasswords, mysql_root_password]} - {get_param: [DefaultPasswords, mysql_root_password]}
mysql: mysql:
start_order: 2 start_order: 2
stop_grace_period: 60
image: *mysql_image image: *mysql_image
restart: unless-stopped restart: unless-stopped
net: host net: host

View File

@ -113,6 +113,7 @@ outputs:
command: ['/bin/bash', '-c', 'chown -R redis:redis /var/log/redis'] command: ['/bin/bash', '-c', 'chown -R redis:redis /var/log/redis']
- redis: - redis:
start_order: 1 start_order: 1
stop_grace_period: 60
image: *redis_image image: *redis_image
net: host net: host
privileged: false privileged: false