]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
rgw: http client: print curl error messages during curl failures
authorAbhishek Lekshmanan <abhishek@suse.com>
Mon, 30 Jul 2018 11:35:14 +0000 (13:35 +0200)
committerAbhishek Lekshmanan <abhishek@suse.com>
Mon, 30 Jul 2018 11:35:14 +0000 (13:35 +0200)
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>
src/rgw/rgw_http_client.cc

index ffbc7bcd7579b21bfadcddf6556d9577ca8b9639..587a4abfa5b213bf621887a3763c1de7367c5038 100644 (file)
@@ -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;
         }
       }