]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: don't create connection object for zone without endpoints
authorYehuda Sadeh <yehuda@redhat.com>
Wed, 7 Oct 2015 21:57:28 +0000 (14:57 -0700)
committerYehuda Sadeh <yehuda@redhat.com>
Fri, 12 Feb 2016 00:12:58 +0000 (16:12 -0800)
warn about it though

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
src/rgw/rgw_rados.cc

index d5772435e3901b330bd586eada26bcf377c7328b..1f3e1cc509e1d3e6fe577d55d47aaa482337a81a 100644 (file)
@@ -2721,8 +2721,12 @@ int RGWRados::init_complete()
     const string& id = ziter->first;
     RGWZone& z = ziter->second;
     if (id != zone.get_id()) {
-      ldout(cct, 20) << "generating connection object for zone " << zone.get_name() << " id" << id << dendl;
-      zone_conn_map[id] = new RGWRESTConn(cct, this, z.endpoints);
+      if (!z.endpoints.empty()) {
+        ldout(cct, 20) << "generating connection object for zone " << zone.get_name() << " id " << zone.get_id() << dendl;
+        zone_conn_map[id] = new RGWRESTConn(cct, this, z.endpoints);
+      } else {
+        ldout(cct, 0) << "WARNING: can't generate connection for zone " << zone.get_name() << " id " << zone.get_id() << ": no endpoints defined" << dendl;
+      }
     } else {
       zone_public_config = z;
     }