From 523822b53cd1d56c1bcd0fdc8d2395fe8dc8c17a Mon Sep 17 00:00:00 2001 From: Jean-Philippe Evrard Date: Wed, 29 Jun 2016 17:05:39 +0100 Subject: [PATCH] Fix memcached flush if -l is in hostname Awk should now take the line starting with -l for the listen ip, instead of any line. Change-Id: Ib9d8d075f4d9785d2dd077e7cebbb8d3394e24e5 Closes-Bug: 1597410 Signed-off-by: Jean-Philippe Evrard --- 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 68c92f60c4..5ce0d52047 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 -F, '{ print $1 }') $(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)