From ea4188cb4a3ce8d5febe9121374e15646b8c0cb4 Mon Sep 17 00:00:00 2001 From: Oliver Walsh Date: Thu, 29 Jun 2017 13:59:26 +0100 Subject: Add support for running crontabs in containers This change enables the puppet cron resource in docker-puppet.py and adds user crontabs to the paths copied from the config containers. Only the nova crontab is configured for now. Other services will require similar changes to run their crontabs. Partial-Bug: 1701254 Change-Id: I2d1d0f0d77908a132472cf4bc475f8bd526af504 Depends-On: Ie16fb4539481a3c192cff8220a97daa4c70467fc --- docker/services/nova-api.yaml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'docker/services/nova-api.yaml') diff --git a/docker/services/nova-api.yaml b/docker/services/nova-api.yaml index 93935cad..9282c934 100644 --- a/docker/services/nova-api.yaml +++ b/docker/services/nova-api.yaml @@ -158,7 +158,7 @@ outputs: user: nova privileged: true restart: always - volumes: + volumes: &nova_api_volumes list_concat: - {get_attr: [ContainersCommon, volumes]} - @@ -167,6 +167,16 @@ outputs: - /var/log/containers/nova:/var/log/nova environment: - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS + nova_api_cron: + image: *nova_api_image + net: host + user: root + privileged: true + restart: always + volumes: *nova_api_volumes + environment: + - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS + command: "/usr/sbin/crond -n" step_5: nova_api_discover_hosts: start_order: 1 -- cgit 1.2.3-korg