From: Radoslaw Zarzynski Date: Thu, 29 Dec 2016 13:24:27 +0000 (+0100) Subject: rgw: improve debugs on the path of RGWRados::cls_bucket_head. X-Git-Tag: v15.1.0~2589^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=0008b6aa92ea120a38eb9861a69844e950caf63c;p=ceph.git rgw: improve debugs on the path of RGWRados::cls_bucket_head. Signed-off-by: Radoslaw Zarzynski Signed-off-by: Radoslaw Zarzynski --- diff --git a/src/rgw/rgw_common.h b/src/rgw/rgw_common.h index 0fcdca142c92..10c66c00f718 100644 --- a/src/rgw/rgw_common.h +++ b/src/rgw/rgw_common.h @@ -1143,7 +1143,7 @@ struct rgw_bucket { WRITE_CLASS_ENCODER(rgw_bucket) inline ostream& operator<<(ostream& out, const rgw_bucket &b) { - out << b.name << "[" << b.marker << "]"; + out << b.tenant << ":" << b.name << "[" << b.marker << "])"; return out; } diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc index 780863afdabe..fb88a417bfe0 100644 --- a/src/rgw/rgw_rados.cc +++ b/src/rgw/rgw_rados.cc @@ -8400,8 +8400,11 @@ int RGWRados::open_bucket_index(const RGWBucketInfo& bucket_info, { const rgw_bucket& bucket = bucket_info.bucket; int r = open_bucket_index_ctx(bucket_info, index_ctx); - if (r < 0) + if (r < 0) { + ldout(cct, 20) << "open_bucket_index: open_bucket_index_ctx() returned " + << r << dendl; return r; + } if (bucket.bucket_id.empty()) { ldout(cct, 0) << "ERROR: empty bucket id for bucket operation" << dendl; @@ -8419,8 +8422,11 @@ int RGWRados::open_bucket_index_base(const RGWBucketInfo& bucket_info, string& bucket_oid_base) { const rgw_bucket& bucket = bucket_info.bucket; int r = open_bucket_index_ctx(bucket_info, index_ctx); - if (r < 0) + if (r < 0) { + ldout(cct, 20) << "open_bucket_index_base: open_bucket_index_ctx() returned " + << r << dendl; return r; + } if (bucket.bucket_id.empty()) { ldout(cct, 0) << "ERROR: empty bucket_id for bucket operation" << dendl; @@ -8442,6 +8448,8 @@ int RGWRados::open_bucket_index(const RGWBucketInfo& bucket_info, string bucket_oid_base; int ret = open_bucket_index_base(bucket_info, index_ctx, bucket_oid_base); if (ret < 0) { + ldout(cct, 20) << "open_bucket_index: open_bucket_index_base() returned " + << ret << dendl; return ret; } @@ -11740,6 +11748,7 @@ int RGWRados::get_bucket_instance_from_oid(RGWObjectCtx& obj_ctx, const string& oid, epbl, &info.objv_tracker, pmtime, pattrs, cache_info, refresh_version); if (ret < 0) { + ldout(cct, 20) << "rgw_get_system_obj() returned " << ret << dendl; return ret; } @@ -13290,12 +13299,18 @@ int RGWRados::cls_bucket_head(const RGWBucketInfo& bucket_info, int shard_id, ve map oids; map list_results; int r = open_bucket_index(bucket_info, index_ctx, oids, list_results, shard_id, bucket_instance_ids); - if (r < 0) + if (r < 0) { + ldout(cct, 20) << "cls_bucket_head: open_bucket_index() returned " + << r << dendl; return r; + } r = CLSRGWIssueGetDirHeader(index_ctx, oids, list_results, cct->_conf->rgw_bucket_index_max_aio)(); - if (r < 0) + if (r < 0) { + ldout(cct, 20) << "cls_bucket_head: CLSRGWIssueGetDirHeader() returned " + << r << dendl; return r; + } map::iterator iter = list_results.begin(); for(; iter != list_results.end(); ++iter) {