From 0bdf1505dae4ec6f83972cd1a6d04c242db36d9f Mon Sep 17 00:00:00 2001 From: Yehuda Sadeh Date: Wed, 7 Oct 2015 14:57:28 -0700 Subject: [PATCH] rgw: don't create connection object for zone without endpoints warn about it though Signed-off-by: Yehuda Sadeh --- src/rgw/rgw_rados.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc index d5772435e3901..1f3e1cc509e1d 100644 --- a/src/rgw/rgw_rados.cc +++ b/src/rgw/rgw_rados.cc @@ -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; } -- 2.39.5