]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: Document a lurking problem I see with subdomain/domain splitting
authorRobin H. Johnson <robbat2@gentoo.org>
Wed, 15 Apr 2015 01:31:18 +0000 (18:31 -0700)
committerRobin H. Johnson <robbat2@gentoo.org>
Wed, 15 Apr 2015 01:31:18 +0000 (18:31 -0700)
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
src/rgw/rgw_rest.cc

index 169b5baf557af7b3e56faae2464d297ebd54c65a..6fbe937331aa4782c3370acab385c7ceaa3447ad 100644 (file)
@@ -198,6 +198,15 @@ void rgw_rest_init(CephContext *cct, RGWRegion& region)
     hostnames_set.insert(cct->_conf->rgw_dns_name);
   }
   hostnames_set.insert(region.hostnames.begin(),  region.hostnames.end());
+  /* TODO: We should have a sanity check that no hostname matches the end of
+   * any other hostname, otherwise we will get ambigious results from
+   * rgw_find_host_in_domains.
+   * Eg: 
+   * Hostnames: [A, B.A]
+   * Inputs: [Z.A, X.B.A]
+   * Z.A clearly splits to subdomain=Z, domain=Z
+   * X.B.A ambigously splits to both {X, B.A} and {X.B, A}
+   */
 }
 
 static bool str_ends_with(const string& s, const string& suffix, size_t *pos)