Fix the Elasticsearch Curator cron schedule run

There were two issues with it. Lack of /usr/local/bin in PATH
for CentOS and wrong crontab path for Ubuntu/Debian.
This patch mirrors how it is handled in keystone.

Change-Id: Ib54b261e12c409d66b792648807646015826e83c
Closes-Bug: #1885732
This commit is contained in:
Radosław Piliszek 2020-06-30 16:39:55 +02:00
parent cdd7a8a1c7
commit 852c7a32c3
3 changed files with 10 additions and 2 deletions

View File

@ -1 +1,3 @@
PATH=/usr/local/bin:/usr/bin:/bin
{{ elasticsearch_curator_cron_schedule }} curator --config /etc/elasticsearch-curator/curator.yml {% if elasticsearch_curator_dry_run|bool %}--dry-run {% endif %}/etc/elasticsearch-curator/actions.yml

View File

@ -1,11 +1,12 @@
{% set cron_cmd = 'cron -f' if kolla_base_distro in ['ubuntu', 'debian'] else 'crond -s -n' %}
{% set cron_path = '/var/spool/cron/crontabs/elasticsearch' if kolla_base_distro in ['ubuntu', 'debian'] else '/var/spool/cron/elasticsearch' %}
{
"command": "{{ cron_cmd }}",
"config_files": [
{
"source": "{{ container_config_directory }}/elasticsearch-curator.crontab",
"dest": "/var/spool/cron/elasticsearch",
"owner": "root",
"dest": "{{ cron_path }}",
"owner": "elasticsearch",
"perm": "0600"
},
{

View File

@ -0,0 +1,5 @@
---
fixes:
- |
Fixes the Elasticsearch Curator cron schedule run.
`LP#1885732 <https://launchpad.net/bugs/1885732>`__