summaryrefslogtreecommitdiffstats
path: root/src/rgw/rgw_redis_driver.cc
diff options
context:
space:
mode:
authorSamarah <samarah.uriarte@ibm.com>2023-09-26 22:36:31 +0200
committerPritha Srivastava <prsrivas@redhat.com>2024-04-02 17:54:51 +0200
commit71f09c5a340392a00c1818fd94ee645bb4c91a18 (patch)
treebd51fa7649abfdc44c5d9c046723d2081b73e718 /src/rgw/rgw_redis_driver.cc
parentrgw/d4n: Remove `cacheBlock` and commented out read workflow from D4N filter (diff)
downloadceph-71f09c5a340392a00c1818fd94ee645bb4c91a18.tar.xz
ceph-71f09c5a340392a00c1818fd94ee645bb4c91a18.zip
rgw: Add `rgw_local_cache_address` yaml config
Signed-off-by: Samarah <samarah.uriarte@ibm.com>
Diffstat (limited to 'src/rgw/rgw_redis_driver.cc')
-rw-r--r--src/rgw/rgw_redis_driver.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/rgw/rgw_redis_driver.cc b/src/rgw/rgw_redis_driver.cc
index feca1e8d984..90c52b1846b 100644
--- a/src/rgw/rgw_redis_driver.cc
+++ b/src/rgw/rgw_redis_driver.cc
@@ -98,15 +98,15 @@ std::vector<Partition> RedisDriver::list_partitions(const DoutPrefixProvider* dp
int RedisDriver::initialize(CephContext* cct, const DoutPrefixProvider* dpp)
{
- this->cct = cct;
-
if (partition_info.location.back() != '/') {
partition_info.location += "/";
}
+ std::string address = cct->_conf->rgw_local_cache_address;
+
config cfg;
- cfg.addr.host = cct->_conf->rgw_d4n_host; // TODO: Replace with cache address
- cfg.addr.port = std::to_string(cct->_conf->rgw_d4n_port);
+ cfg.addr.host = address.substr(0, address.find(":"));
+ cfg.addr.port = address.substr(address.find(":") + 1, address.length());
if (!cfg.addr.host.length() || !cfg.addr.port.length()) {
ldpp_dout(dpp, 10) << "RGW Redis Cache: Redis cache endpoint was not configured correctly" << dendl;