From 280f3e062a30ebffdc2986d0b3c20e323486e3da Mon Sep 17 00:00:00 2001 From: Jesse Pretorius Date: Thu, 25 Oct 2018 10:34:48 +0100 Subject: [PATCH] Make the memcache flush optional The memcache flush implemented in https://review.openstack.org/608066 is actually a workaround. The implementation should really be implemented more surgically in keystone itself. This has begun with https://review.openstack.org/612686 but it is not complete. However, something that's been made clear by the team is that this was only required for the Newton->Ocata upgrade and has not been required since. This workaround may be required again in the future, so instead of removing it, we make the tool opt-in via a toggle which can then easily be set when doing the appropriate major upgrade. Related-Bug: 1793389 Change-Id: Ied0ce1e9877697bb627f784a0590f7c7e924479b --- defaults/main.yml | 6 ++++++ handlers/main.yml | 2 ++ 2 files changed, 8 insertions(+) diff --git a/defaults/main.yml b/defaults/main.yml index 4bfeb03e..caf50951 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -511,3 +511,9 @@ keystone_extra_headers: [] # List of trusted IPs which can pass X-Forwarded-For keystone_set_real_ip_from: [] + +# Toggle whether memcache should be flushed when doing +# database migrations. This is sometimes useful when +# doing upgrades, but should not usually be required. +# ref: https://bugs.launchpad.net/openstack-ansible/+bug/1793389 +keystone_flush_memcache: no diff --git a/handlers/main.yml b/handlers/main.yml index 70ee35b4..0b60b591 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -174,6 +174,8 @@ delegate_to: "{{ item }}" with_items: "{{ groups.memcached_all }}" listen: flush cache + when: + - keystone_flush_memcache | bool - meta: noop listen: Manage LB