From 685a05edfef24cb2300df24aa3417ad0ecd2c2c2 Mon Sep 17 00:00:00 2001 From: Morgan Fainberg Date: Tue, 16 Oct 2018 10:50:33 -0700 Subject: [PATCH] Config dict arguments.url must be a list For memcache, arguments.url is assumed to be a list, this means that the underlying memcache library could not handle a case where a string (comma separated) was passed in. The idea is to force a split on ',' in the special case of backend_argument=url:... so that a list is passed to the backend. Change-Id: I65afb46455423d7f96e17c471330c8d74dc17cac Closes-Bug: #1743036 --- oslo_cache/core.py | 2 ++ releasenotes/notes/bug-1743036-320ed918d5fb4325.yaml | 10 ++++++++++ 2 files changed, 12 insertions(+) create mode 100644 releasenotes/notes/bug-1743036-320ed918d5fb4325.yaml diff --git a/oslo_cache/core.py b/oslo_cache/core.py index 375f8ecd..dd623e09 100644 --- a/oslo_cache/core.py +++ b/oslo_cache/core.py @@ -120,6 +120,8 @@ def _build_cache_config(conf): continue arg_key = '.'.join([prefix, 'arguments', argname]) + if argname == 'url': + argvalue = argvalue.split(',') conf_dict[arg_key] = argvalue _LOG.debug('Oslo Cache Config: %s', conf_dict) diff --git a/releasenotes/notes/bug-1743036-320ed918d5fb4325.yaml b/releasenotes/notes/bug-1743036-320ed918d5fb4325.yaml new file mode 100644 index 00000000..2bdf0623 --- /dev/null +++ b/releasenotes/notes/bug-1743036-320ed918d5fb4325.yaml @@ -0,0 +1,10 @@ +--- +other: + - > + [`bug 1743036 `_] + The `backend_argument` value(s) for `url` when configuring memcache did not + properly handle multiple servers. This is because the URL was passed as + a string (comma delimited) instead of a list to the memcache + library/client. The `url` argument is now special cased and will split + the string on a comma so that it mirrors the behavior of the ListOpt used + by `memcache_servers` option. \ No newline at end of file