Bug 1305127 - Swift Proxy Server Unable to Connect to memcached Over IPv6
Summary: Swift Proxy Server Unable to Connect to memcached Over IPv6
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-swift
Version: 8.0 (Liberty)
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 8.0 (Liberty)
Assignee: Pete Zaitcev
QA Contact: Mike Abrams
URL:
Whiteboard:
Depends On: 1305071
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-02-05 18:09 UTC by Keith Basil
Modified: 2016-10-26 13:42 UTC (History)
9 users (show)

Fixed In Version: openstack-swift-2.5.0-3.el7ost
Doc Type: Bug Fix
Doc Text:
Clone Of: 1305071
Environment:
Last Closed: 2016-10-26 13:42:08 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1526570 0 None None None 2016-03-03 12:30:28 UTC
Red Hat Product Errata RHBA-2016:2114 0 normal SHIPPED_LIVE openstack-swift bug fix advisory 2016-10-26 17:41:38 UTC

Comment 1 Keith Basil 2016-02-05 18:10:46 UTC
Cloned for OSP 8.

Comment 2 Dan Sneddon 2016-02-06 12:22:33 UTC
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 12:30:29 UTC
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 05:25:57 UTC
This  is not blocker for 8.0 GA, will be fixed in the first async.

Comment 16 errata-xmlrpc 2016-10-26 13:42:08 UTC
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.