Skip to content
Snippets Groups Projects
Commit c47ee4fb authored by Zuul's avatar Zuul Committed by Gerrit Code Review
Browse files

Merge "Constrain the size of Docker logs"

parents c7658eb4 bd54b991
No related branches found
No related tags found
No related merge requests found
...@@ -92,6 +92,10 @@ docker_namespace: "kolla" ...@@ -92,6 +92,10 @@ docker_namespace: "kolla"
docker_registry_username: docker_registry_username:
docker_registry_insecure: "{{ 'yes' if docker_registry else 'no' }}" docker_registry_insecure: "{{ 'yes' if docker_registry else 'no' }}"
# Retention settings for Docker logs
docker_log_max_file: 5
docker_log_max_size: 50m
# Valid options are [ never, on-failure, always, unless-stopped ] # Valid options are [ never, on-failure, always, unless-stopped ]
docker_restart_policy: "unless-stopped" docker_restart_policy: "unless-stopped"
......
[Service] [Service]
MountFlags=shared MountFlags=shared
ExecStart= ExecStart=
ExecStart=/usr/bin/{{ docker_binary_name|default("docker daemon", true) }}{% if docker_registry_insecure | bool %} --insecure-registry {{ docker_registry }}{% endif %}{% if docker_storage_driver %} --storage-driver {{ docker_storage_driver }}{% endif %}{% if docker_runtime_directory %} --graph {{ docker_runtime_directory }}{% endif %}{% if docker_custom_option %} {{ docker_custom_option }}{% endif %} ExecStart=/usr/bin/{{ docker_binary_name|default("docker daemon", true) }}{% if docker_registry_insecure | bool %} --insecure-registry {{ docker_registry }}{% endif %}{% if docker_storage_driver %} --storage-driver {{ docker_storage_driver }}{% endif %}{% if docker_runtime_directory %} --graph {{ docker_runtime_directory }}{% endif %}{% if docker_custom_option %} {{ docker_custom_option }}{% endif %} --log-opt max-file={{ docker_log_max_file }} --log-opt max-size={{ docker_log_max_size }}
---
features:
- Docker logs are no longer allowed to grow unbounded and have
been limited to a fixed size per container. Two new variables
have been added, `docker_log_max_file` and `docker_log_max_size`
which default to 5 and 50MB respectively. This means that for
each container, there should be no more than 250MB of Docker
logs.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment