Allow deleting all of docker cache

This is mostly a workaround for limited disk space in CI and should
never be used otherwise as it wipes all of the docker data.

Change-Id: I0b69087b78dc974e6ffcb3674c88c435ec569988
Related-Bug: #1694709
This commit is contained in:
Martin André 2017-06-07 17:49:33 +02:00
parent adcebfef2e
commit 70b1203110
2 changed files with 14 additions and 0 deletions

View File

@ -7,3 +7,7 @@ containers_default_parameters: container-default-parameters.yaml.j2
overcloud_prep_containers_log: overcloud_prep_containers.log
ctl_plane_ip: "{{undercloud_network_gateway|default(undercloud_network_cidr|nthhost(1))}}"
docker_registry_namespace: tripleoupstream
# Be careful with this setting as it entirely wipes the /var/lib/docker directory
# Useful in CI to workaround disk space issue
# https://bugs.launchpad.net/tripleo/+bug/1694709
delete_docker_cache: false

View File

@ -17,6 +17,16 @@ set -eux
openstack overcloud container image upload --verbose --config-file {{ tripleo_common_dir }}/container-images/overcloud_containers.yaml
{% if delete_docker_cache|bool %}
## * Delete Docker Cache
## ::
# This is the most efficient way to wipe all of docker data
sudo systemctl stop docker
sudo rm -rf /var/lib/docker
sudo systemctl start docker
{% endif %}
## * Configure the environments/docker.yaml, this is done automatically.
## ::