summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAbhishek Lekshmanan <abhishek@suse.com>2018-07-30 13:35:14 +0200
committerAbhishek Lekshmanan <abhishek@suse.com>2018-07-30 13:35:14 +0200
commite8208bf8d5f02666a9fac6d9147a09267d7fc0b8 (patch)
treee63c5522dfc133bb9934df65b719caee161ce80a
parentMerge pull request #23191 from dillaman/wip-23398 (diff)
downloadceph-e8208bf8d5f02666a9fac6d9147a09267d7fc0b8.tar.xz
ceph-e8208bf8d5f02666a9fac6d9147a09267d7fc0b8.zip
rgw: http client: print curl error messages during curl failures
When curl fails, curl has a curl error code which can be useful to understand the failure. Print this error message, as http status in these cases can likely be 0, which makes it harder to debug. Example error message:: ERROR: msg->data.result=27 req_data->id=1 http_status=0 ERROR: curl error: Out of memory Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
-rw-r--r--src/rgw/rgw_http_client.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/rgw/rgw_http_client.cc b/src/rgw/rgw_http_client.cc
index ffbc7bcd757..587a4abfa5b 100644
--- a/src/rgw/rgw_http_client.cc
+++ b/src/rgw/rgw_http_client.cc
@@ -1156,6 +1156,7 @@ void *RGWHTTPManager::reqs_thread_entry()
<< cct->_conf->rgw_curl_low_speed_limit << " Bytes per second during " << cct->_conf->rgw_curl_low_speed_time << " seconds." << dendl;
default:
dout(20) << "ERROR: msg->data.result=" << result << " req_data->id=" << id << " http_status=" << http_status << dendl;
+ dout(20) << "ERROR: curl error: " << curl_easy_strerror((CURLcode)result) << dendl;
break;
}
}