Comment 27 for bug 1959562

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to oslo.cache (stable/train)

Reviewed: https://review.opendev.org/c/openstack/oslo.cache/+/836862
Committed: https://opendev.org/openstack/oslo.cache/commit/7c8cabe6d842e18655090f37ab5bfbc6cd9b6b8c
Submitter: "Zuul (22348)"
Branch: stable/train

commit 7c8cabe6d842e18655090f37ab5bfbc6cd9b6b8c
Author: Hervé Beraud <email address hidden>
Date: Fri Aug 6 11:49:17 2021 +0200

    Add socket keepalive options to oslo.cache

    This patch specifies a set of options required to setup the
    socket keepalive of the dogpile.cache's pymemcache
    backend [1][2]. This setup from those options can later on
    be passed to this backend.

    This patch also sets up the socket keepalive object based on
    the configuration options passed via oslo.config and adds it
    as an argument to be passed to the selected oslo.cache backend.

    Dogpile.cache will be used as an interface between oslo.cache and
    pymemcache [3].

    This patch is needed to fix a TLS issue on stable branches introduced by
    pymemcache (since train), where if a cluster node disappear the client
    will fail without retrying to reconnect or to switch to an other node of
    the cluster.

    Conflicts:
        - requirements.txt
        - doc/requirements.txt
        - oslo_cache/tests/unit/test_cache_basics.py

    NOTE(hberaud): Conflicts are related to requirements that have been
    updated in the youngest branches, however, I removed these reqs updated
    to follow the same logic that have been applied by Moisès in his patches
    related to TLS, namely, appending the dogpile.cache.pymemcache backend
    only if the version of dogpile.cache is higher to a specific version [4].
    TLS changes are at the origin of the bug fixed here.

    [1] https://github.com/sqlalchemy/dogpile.cache/pull/205
    [2]
    https://github.com/pinterest/pymemcache/commit/b289c87bb89b3ab477bd5d92c8951ab42c923923
    [3]
    https://dogpilecache.sqlalchemy.org/en/latest/api.html?highlight=keepalive#dogpile.cache.backends.memcached.PyMemcacheBackend.params.socket_keepalive
    [4] https://opendev.org/openstack/oslo.cache/commit/3e3037886e8021911e10f492c0502951bff5104e

    This patch also squash parts of the fix submitted with:
    https://review.opendev.org/c/openstack/oslo.cache/+/834267

    Conflits:
        CONFLICT (content): Merge conflict in oslo_cache/tests/test_cache.py

    Partial-Bug: #1959562
    Change-Id: I501100e1a48cdd4e094c08046e2150405dcf371e
    (cherry picked from commit f4fa6aa6fa2aca23a8f4f9e63c5a57dbcd2d1166)
    (cherry picked from commit 2ad2d52f4ecb63d9edfe3ae64cd9b7dece5330a0)
    (cherry picked from commit 7b00cb38a6d08608e5b7b76f18fcdad038490074)
    (cherry picked from commit f34ed73407b93d2c901ec9dc37632a63712c818b)
    (cherry picked from commit 619413326743acb32ed976c9c3596341479978c9)