]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
rgw: dont duplicate RGWRESTConn::get_url
authorCasey Bodley <cbodley@redhat.com>
Tue, 11 Aug 2020 19:09:30 +0000 (15:09 -0400)
committerCasey Bodley <cbodley@redhat.com>
Tue, 15 Sep 2020 15:51:43 +0000 (11:51 -0400)
Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/rgw/rgw_rest_conn.cc

index 2dd7202ea6cdf598435905ea251bc6c4edd7dbe0..ae976283c465d387a362f9763dff0044058c292a 100644 (file)
@@ -76,14 +76,7 @@ int RGWRESTConn::get_url(string& endpoint)
 string RGWRESTConn::get_url()
 {
   string endpoint;
-  if (endpoints.empty()) {
-    ldout(cct, 0) << "WARNING: endpoints not configured for upstream zone" << dendl; /* we'll catch this later */
-    return endpoint;
-  }
-
-  int i = ++counter;
-  endpoint = endpoints[i % endpoints.size()];
-
+  get_url(endpoint);
   return endpoint;
 }