From d524386bb7bea4b18c640485c10ace69d13649a4 Mon Sep 17 00:00:00 2001 From: Logan V Date: Mon, 27 Jun 2016 08:38:27 -0500 Subject: [PATCH] Flush memcached on first listen IP only In environments where memcached_listen is overridden to listen on multiple IP addresses, the memcached-flush upgrade playbook will fail because it is trying to flush an IP like "172.29.236.219,127.0.0.1" This will fix the memcached flush playbook to flush only the first listen IP that is specified in the memcached.conf file. Change-Id: I7b34933c1569b97f3cd23bb3db86dd0067fc846e --- scripts/upgrade-utilities/playbooks/memcached-flush.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade-utilities/playbooks/memcached-flush.yml b/scripts/upgrade-utilities/playbooks/memcached-flush.yml index 81e3243221..68c92f60c4 100644 --- a/scripts/upgrade-utilities/playbooks/memcached-flush.yml +++ b/scripts/upgrade-utilities/playbooks/memcached-flush.yml @@ -20,4 +20,4 @@ tasks: - name: Flush all of the cache in memcached shell: | - echo 'flush_all' | nc $(awk '/\-l/ {print $2}' /etc/memcached.conf) $(awk '/\-p/ {print $2}' /etc/memcached.conf) + echo 'flush_all' | nc $(awk '/\-l/ {print $2}' /etc/memcached.conf | awk -F, '{ print $1 }') $(awk '/\-p/ {print $2}' /etc/memcached.conf)