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/docker-puppet.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'docker/docker-puppet.py') diff --git a/docker/docker-puppet.py b/docker/docker-puppet.py index 65d3bf38..01acde03 100755 --- a/docker/docker-puppet.py +++ b/docker/docker-puppet.py @@ -205,7 +205,7 @@ def mp_puppet_config((config_volume, puppet_tags, manifest, config_image, volume # Disables archiving if [ -z "$NO_ARCHIVE" ]; then - archivedirs=("/etc" "/root" "/opt" "/var/lib/ironic/tftpboot" "/var/lib/ironic/httpboot" "/var/www") + archivedirs=("/etc" "/root" "/opt" "/var/lib/ironic/tftpboot" "/var/lib/ironic/httpboot" "/var/www" "/var/spool/cron") rsync_srcs="" for d in "${archivedirs[@]}"; do if [ -d "$d" ]; then @@ -308,9 +308,9 @@ for config_volume in configs: volumes = service[4] if len(service) > 4 else [] if puppet_tags: - puppet_tags = "file,file_line,concat,augeas,%s" % puppet_tags + puppet_tags = "file,file_line,concat,augeas,cron,%s" % puppet_tags else: - puppet_tags = "file,file_line,concat,augeas" + puppet_tags = "file,file_line,concat,augeas,cron" process_map.append([config_volume, puppet_tags, manifest, config_image, volumes]) -- cgit 1.2.3-korg