Fix requirepass problem with redis

When we use configuration to configure the request for the redis
requirepass, Since we did not rebuild the adminclient with
password, the previous client did not have permission to ping.
Will cause the status to enter shutdown. It is now modified to
rebuild the client as long as the configuration changes are made

co-author-by:Fan Zhang <zh.f@outlook.com>
Change-Id: I9a17eaf2b69da0571295b38c5b2ec87dbc30e1d9
Closes-Bug: #1708376
This commit is contained in:
jiansong 2017-10-25 20:12:31 -07:00
parent 0fb67d459b
commit 0a8f5c31bb

View File

@ -166,6 +166,9 @@ class RedisApp(object):
args_string = self._join_lists(
self._value_converter.to_strings(prop_args), ' ')
client.config_set(prop_name, args_string)
self.admin = self._build_admin_client()
self.status = RedisAppStatus(self.admin)
client = self.admin
def _join_lists(self, items, sep):
"""Join list items (including items from sub-lists) into a string.