Flush all of the cache in memcached issue

Bug #1783423 reported by Satish Patel
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack-Ansible
Won't Fix
Medium
Unassigned

Bug Description

I am upgrading my PIKE to QUEENS and encounter this error, and look like following code using ubuntu style config and failed on CentOS 7 (I am using CentOS7)

We need to fix this code so it support centOS style format.

https://github.com/openstack/openstack-ansible/blob/master/scripts/upgrade-utilities/playbooks/memcached-flush.yml#L32

[root@ostack-controller-03-memcached-container-62ed61d8 ~]# echo 'flush_all' | nc $(awk '/-l/ {print $2}' /etc/sysconfig/memcached | awk -F, '{ print $1 }') $(awk '/^\\-p/ {print $2}' /etc/sysconfig/memcached )
Ncat: Connection refused.

[root@ostack-controller-03-memcached-container-62ed61d8 ~]# cat /etc/sysconfig/memcached
# Ansible managed

PORT="11211"
USER="memcached"
MAXCONN="1024"
CACHESIZE="3971"
OPTIONS="-l 192.168.100.226 -t 4 -v"

Above regex is wrong, after i craft new regex below it works..

[root@ostack-controller-03-memcached-container-62ed61d8 ~]# echo 'flush_all' | nc $(awk '/-l/ {print $2}' /etc/sysconfig/memcached | awk -F, '{ print $1 }') $(cat /etc/sysconfig/memcached | grep PORT | awk -F'"' '{print $2}' )
OK

Revision history for this message
Mohammed Naser (mnaser) wrote :

This is a valid bug, the best solution would be to use the Ansible variables instead.

https://github.com/openstack/openstack-ansible-memcached_server/blob/master/defaults/main.yml#L48-L49

Changed in openstack-ansible:
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Satish Patel (satish-txt) wrote :

Here problem is OSA deploying Ubuntu style configuration on CentOS7 and that is why that script get confused how to parse all values.

Why don't we fix this is OSA to deploy correct CentOS style config?

Revision history for this message
Dmitriy Rabotyagov (noonedeadpunk) wrote :

Queens is eol now so we can't fix any bugs for this release. I believe though this issue does not exist in next releases and upgrade process has improved dramatically there.

Changed in openstack-ansible:
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.