Fix memcached_servers setting

By default memcached is bound to 127.0.0.1 and we have no code in place
to change that. So instead of using the $SERVICE_HOST variable, we
hardcode it to localhost, just as we do for the cache settings, see [1].

This also avoids a bug that occurs when $SERVICE_HOST contains an IPv6
address, as in that case it would have to be prefixed by "inet6:" [2].

[1] I95d798d122e2a95e27eb1d2c4e786c3cd844440b
[2] https://bugs.launchpad.net/swift/+bug/1610064

Change-Id: I46bed8a048f4b0d669dfc65b28ddeb36963553e0
Partial-Bug: 1656329
This commit is contained in:
Jens Harbott 2017-09-19 09:10:21 +00:00
parent 6c87f363a1
commit b2330c8919

View File

@ -450,7 +450,7 @@ function configure_auth_token_middleware {
iniset $conf_file $section cafile $SSL_BUNDLE_FILE
iniset $conf_file $section signing_dir $signing_dir
iniset $conf_file $section memcached_servers $SERVICE_HOST:11211
iniset $conf_file $section memcached_servers localhost:11211
}
# init_keystone() - Initialize databases, etc.