kolla-ansible/ansible/roles/rabbitmq/templates/rabbitmq.json.j2
Jeffrey Zhang 4c207bc039 Fix rabbitmq upgrade permission issue
During the upgrade from Mitaka to Newton, the uid/gid may change for the
same image. Especially on Ubuntu, we moved to Ubuntu Xenial in Newton
and it added systemd related user which break all the uid/gid during an
upgrade. It will the permissions in all docker named volumes.

This fix extends set_config.py to set the proper permission during
container start. This is super light then add commands in
extend_start.sh file  or add ansible tasks.

This patch just fixes rabbitmq case. Other services will be fixed in
following patches.

Partial-Bug: #1631503
Change-Id: Ib17027b97abbc9bf4e3cd503601b8010325b5c5b
2016-10-13 01:19:05 +08:00

42 lines
1.2 KiB
Django/Jinja

{
"command": "/usr/sbin/rabbitmq-server",
"config_files": [
{
"source": "{{ container_config_directory }}/rabbitmq-env.conf",
"dest": "/etc/rabbitmq/rabbitmq-env.conf",
"owner": "rabbitmq",
"perm": "0600"
},
{
"source": "{{ container_config_directory }}/rabbitmq.config",
"dest": "/etc/rabbitmq/rabbitmq.config",
"owner": "rabbitmq",
"perm": "0600"
},
{
"source": "{{ container_config_directory }}/rabbitmq-clusterer.config",
"dest": "/etc/rabbitmq/rabbitmq-clusterer.config",
"owner": "rabbitmq",
"perm": "0600"
},
{
"source": "{{ container_config_directory }}/definitions.json",
"dest": "/etc/rabbitmq/definitions.json",
"owner": "rabbitmq",
"perm": "0600"
}
],
"permissions": [
{
"path": "/var/lib/rabbitmq",
"owner": "rabbitmq:rabbitmq",
"recurse": true
},
{
"path": "/var/log/kolla/rabbitmq",
"owner": "rabbitmq:rabbitmq",
"recurse": true
}
]
}