diff options
author | Jenkins <jenkins@review.openstack.org> | 2017-07-13 04:08:40 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2017-07-13 04:08:40 +0000 |
commit | b48487b61b3b352c98cf9b1aec357d8a7b4eae28 (patch) | |
tree | 05bc292026ae21ec6bd298104a1d6d972d50fe06 | |
parent | 7d07abf68281dad3edf5e23b66f0ed62f2f353d9 (diff) | |
parent | ea4188cb4a3ce8d5febe9121374e15646b8c0cb4 (diff) |
Merge "Add support for running crontabs in containers"
-rwxr-xr-x | docker/docker-puppet.py | 6 | ||||
-rw-r--r-- | docker/services/README.rst | 2 | ||||
-rw-r--r-- | docker/services/nova-api.yaml | 12 |
3 files changed, 15 insertions, 5 deletions
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]) diff --git a/docker/services/README.rst b/docker/services/README.rst index 84ac842e..ce255ba8 100644 --- a/docker/services/README.rst +++ b/docker/services/README.rst @@ -74,7 +74,7 @@ are re-asserted when applying latter ones. * puppet_tags: Puppet resource tag names that are used to generate config files with puppet. Only the named config resources are used to generate a config file. Any service that specifies tags will have the default - tags of 'file,concat,file_line,augeas' appended to the setting. + tags of 'file,concat,file_line,augeas,cron' appended to the setting. Example: keystone_config * config_volume: The name of the volume (directory) where config files 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 |