Merge "Fix redis_sentinel container restarts"

This commit is contained in:
Zuul 2022-05-18 13:18:31 +00:00 committed by Gerrit Code Review
commit 789bae70eb
5 changed files with 16 additions and 4 deletions

View File

@ -11,6 +11,9 @@ redis_services:
redis-sentinel: redis-sentinel:
container_name: redis_sentinel container_name: redis_sentinel
group: redis group: redis
environment:
REDIS_CONF: "{{ redis_conf_path }}"
REDIS_GEN_CONF: "{{ redis_generated_conf_path }}"
enabled: true enabled: true
image: "{{ redis_sentinel_image_full }}" image: "{{ redis_sentinel_image_full }}"
volumes: "{{ redis_sentinel_default_volumes + redis_sentinel_extra_volumes }}" volumes: "{{ redis_sentinel_default_volumes + redis_sentinel_extra_volumes }}"
@ -70,3 +73,6 @@ redis_sentinel_default_volumes:
redis_extra_volumes: "{{ default_extra_volumes }}" redis_extra_volumes: "{{ default_extra_volumes }}"
redis_sentinel_extra_volumes: "{{ default_extra_volumes }}" redis_sentinel_extra_volumes: "{{ default_extra_volumes }}"
redis_conf_path: "/etc/redis/redis.conf"
redis_generated_conf_path: "/etc/redis/redis-regenerated-by-config-rewrite.conf"

View File

@ -25,6 +25,7 @@
common_options: "{{ docker_common_options }}" common_options: "{{ docker_common_options }}"
name: "{{ service.container_name }}" name: "{{ service.container_name }}"
image: "{{ service.image }}" image: "{{ service.image }}"
environment: "{{ service.environment }}"
volumes: "{{ service.volumes }}" volumes: "{{ service.volumes }}"
dimensions: "{{ service.dimensions }}" dimensions: "{{ service.dimensions }}"
healthcheck: "{{ service.healthcheck | default(omit) }}" healthcheck: "{{ service.healthcheck | default(omit) }}"

View File

@ -6,6 +6,7 @@
common_options: "{{ docker_common_options }}" common_options: "{{ docker_common_options }}"
name: "{{ item.value.container_name }}" name: "{{ item.value.container_name }}"
image: "{{ item.value.image }}" image: "{{ item.value.image }}"
environment: "{{ item.environment | default(omit) }}"
volumes: "{{ item.value.volumes }}" volumes: "{{ item.value.volumes }}"
dimensions: "{{ item.value.dimensions }}" dimensions: "{{ item.value.dimensions }}"
healthcheck: "{{ item.value.healthcheck | default(omit) }}" healthcheck: "{{ item.value.healthcheck | default(omit) }}"

View File

@ -1,9 +1,9 @@
{ {
"command": "redis-sentinel /etc/redis/redis.conf", "command": "redis-sentinel {{ redis_generated_conf_path }}",
"config_files": [ "config_files": [
{ {
"source": "{{ container_config_directory }}/redis.conf", "source": "{{ container_config_directory }}/redis.conf",
"dest": "/etc/redis/redis.conf", "dest": "{{ redis_conf_path }}",
"owner": "redis", "owner": "redis",
"perm": "0600" "perm": "0600"
} }
@ -13,6 +13,10 @@
"path": "/var/log/kolla/redis", "path": "/var/log/kolla/redis",
"owner": "redis:redis", "owner": "redis:redis",
"recurse": true "recurse": true
},
{
"path": "/etc/redis",
"owner": "redis:redis"
} }
] ]
} }

View File

@ -1,9 +1,9 @@
{ {
"command": "redis-server /etc/redis/redis.conf", "command": "redis-server {{ redis_conf_path }}",
"config_files": [ "config_files": [
{ {
"source": "{{ container_config_directory }}/redis.conf", "source": "{{ container_config_directory }}/redis.conf",
"dest": "/etc/redis/redis.conf", "dest": "{{ redis_conf_path }}",
"owner": "redis", "owner": "redis",
"perm": "0600" "perm": "0600"
} }