Bug 1305127 - Swift Proxy Server Unable to Connect to memcached Over IPv6
Swift Proxy Server Unable to Connect to memcached Over IPv6
Status: CLOSED ERRATA
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-swift (Show other bugs)
8.0 (Liberty)
Unspecified Unspecified
medium Severity medium
: ---
: 8.0 (Liberty)
Assigned To: Pete Zaitcev
Mike Abrams
: Triaged, ZStream
Depends On: 1305071
Blocks:
  Show dependency treegraph
 
Reported: 2016-02-05 13:09 EST by Keith Basil
Modified: 2016-10-26 09:42 EDT (History)
9 users (show)

See Also:
Fixed In Version: openstack-swift-2.5.0-3.el7ost
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1305071
Environment:
Last Closed: 2016-10-26 09:42:08 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Launchpad 1526570 None None None 2016-03-03 07:30 EST

  None (edit)
Comment 1 Keith Basil 2016-02-05 13:10:46 EST
Cloned for OSP 8.
Comment 2 Dan Sneddon 2016-02-06 07:22:33 EST
This seems to be caused by an IPv4-centric connection method in /usr/lib/python2.7/site-packages/swift/common/memcached.py

This seems to fix the issue:

    119     def create(self):
    120         if ']' in self.server:
    121             # deconstruct ipv6 address in brackets
    122             server_uri = self.server.strip("[").split("]")
    123             host = server_uri[0]
    124             if len(server_uri) > 1:
    125                 port = server_uri[1].strip(":")
    126             else:
    127                 port = DEFAULT_MEMCACHED_PORT
    128         elif ':' in self.server:
    129             host, port = self.server.split(':')
    130         else:
    131             host = self.server
    132             port = DEFAULT_MEMCACHED_PORT
    133         if ":" in host:
    134             sock = socket.socket(socket.AF_INET6, socket.SOCK_STREAM)
    135         else:
    136             sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    137         sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)
    138         with Timeout(self._connect_timeout):
    139             sock.connect((host, int(port)))
    140         return (sock.makefile(), sock)
Comment 3 Javier Peña 2016-03-03 07:30:29 EST
The upstream bug is https://bugs.launchpad.net/swift/+bug/1526570 . It has been handled in Mitaka by a series of patches:

- https://review.openstack.org/258704 Fix IPv6 handling in MemcacheConnPool.
- https://review.openstack.org/265482 fixups for ipv6 memcache_servers docs
- https://review.openstack.org/265465 Fail early if the memcache address is invalid.
- https://review.openstack.org/265501 Make _get_addr() method a function in utils.

On a quick test, they apply (almost) flawlessly to stable/liberty, so I think it would be feasible to backport them.
Comment 7 Sergey Gotliv 2016-04-07 01:25:57 EDT
This  is not blocker for 8.0 GA, will be fixed in the first async.
Comment 16 errata-xmlrpc 2016-10-26 09:42:08 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2016-2114.html

Note You need to log in before you can comment on or make changes to this bug.