From b634afe2046e0d4914bac711adbc6b0d9c134b4f Mon Sep 17 00:00:00 2001 From: Jesse Pretorius Date: Fri, 1 Dec 2017 08:14:44 +0000 Subject: [PATCH] Use role defaults for lxc_cache_prep_timeout In https://review.openstack.org/523525 the default value was changed for SuSE and CentOS to be higher, but the value was also overridden using role vars which have a high precedence. This patch ensures that the value uses the role defaults to ensure it has the lowest precedence. It also changes the reno to ensure that the change in default is communicated. The increased timeout will have no real effect on gating, but will benefit installations where the mirror is a bit slow. Change-Id: I41a68313d1841d14001acca591db5c5638e53ffc --- defaults/main.yml | 4 ++-- .../notes/lxc-cache-prep-timeout-97dc18882f7b1e76.yaml | 2 +- tasks/lxc_cache_preparation.yml | 2 -- vars/redhat-7.yml | 5 ----- vars/suse-42.yml | 5 ----- 5 files changed, 3 insertions(+), 15 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index 72d9a49b..cfefb361 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -134,8 +134,8 @@ lxc_cache_distro_packages: "{{ _lxc_cache_distro_packages }}" # The maximum amount of time (in seconds) to wait until failing the cache # preparation process. This is necessary to mitigate the issue that can # arise where the cache prep hangs and never fails. -# The value is specified in seconds, with the default being 10 minutes. -lxc_cache_prep_timeout: 600 +# The value is specified in seconds, with the default being 20 minutes. +lxc_cache_prep_timeout: 1200 # Set the servers to download LXC images from # NOTE(mhayden): The main images.linuxcontainers.org site will redirect diff --git a/releasenotes/notes/lxc-cache-prep-timeout-97dc18882f7b1e76.yaml b/releasenotes/notes/lxc-cache-prep-timeout-97dc18882f7b1e76.yaml index b660c3bf..781e46e4 100644 --- a/releasenotes/notes/lxc-cache-prep-timeout-97dc18882f7b1e76.yaml +++ b/releasenotes/notes/lxc-cache-prep-timeout-97dc18882f7b1e76.yaml @@ -4,4 +4,4 @@ features: The maximum amount of time to wait until forcibly failing the LXC cache preparation process is now configurable using the ``lxc_cache_prep_timeout`` variable. The value is specified - in seconds, with the default being 10 minutes. + in seconds, with the default being 20 minutes. diff --git a/tasks/lxc_cache_preparation.yml b/tasks/lxc_cache_preparation.yml index 30d39efa..68cbbf20 100644 --- a/tasks/lxc_cache_preparation.yml +++ b/tasks/lxc_cache_preparation.yml @@ -108,8 +108,6 @@ - name: Prepare cached image setup commands shell: "chroot {{ lxc_image_cache_path }} /usr/local/bin/cache-prep-commands.sh > /var/log/lxc-cache-prep-commands.log 2>&1" changed_when: false - # It should only take a couple of minutes to prepare the cache. But if network is slow it might take longer. - # Lets be optimistic and set the limit to 10 minutes async: "{{ lxc_cache_prep_timeout }}" poll: 0 register: _lxc_cache_prepare_commands diff --git a/vars/redhat-7.yml b/vars/redhat-7.yml index 45bb1b95..27d152d2 100644 --- a/vars/redhat-7.yml +++ b/vars/redhat-7.yml @@ -109,8 +109,3 @@ lxc_container_default_interfaces: | ONBOOT=yes NM_CONTROLLED=no TYPE=Ethernet - -# The value is specified in seconds, with the default being 20 minutes. This is -# double the amount of time used by default to mitigate issues with slow -# mirrors / testing nodes. -lxc_cache_prep_timeout: 1200 diff --git a/vars/suse-42.yml b/vars/suse-42.yml index aa905344..16704ac5 100644 --- a/vars/suse-42.yml +++ b/vars/suse-42.yml @@ -105,8 +105,3 @@ lxc_cached_network_interfaces: lxc_container_default_interfaces: | STARTMODE=auto BOOTPROTO=dhcp - -# The value is specified in seconds, with the default being 20 minutes. This is -# double the amount of time used by default to mitigate issues with slow -# mirrors / testing nodes. -lxc_cache_prep_timeout: 1200