From 41e65d98f1379d6a09fb01a7c9d6d863f68c5ab6 Mon Sep 17 00:00:00 2001 From: Vinicius Lopes da Silva Date: Thu, 9 Dec 2021 16:57:51 -0300 Subject: [PATCH] Increase timeout value for ceph CLI When a monitor election is in process and ceph CLI commands are issued, they might hang until the end of the election occurs. Sometimes the election is quick and sometimes it might take up until 11s. Since current code awaits up until 5s, sometimes an error appears in STX due to timeout. The timeout value needs to increase, I believe 15s of timeout is enough for most cases. Testing performed: 2+2: Set up two scripts making requests to ceph. One had a small timeout and another one a big timeout. Started both scripts. Locked storage-0. Script having small timeout showed error and the other one didn't. Story: 2009074 Task: 44159 Signed-off-by: Vinicius Lopes da Silva Change-Id: I618ed74c8f63ca77caa0893016f90b67fdfee7e0 --- ceph/python-cephclient/python-cephclient/cephclient/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ceph/python-cephclient/python-cephclient/cephclient/client.py b/ceph/python-cephclient/python-cephclient/cephclient/client.py index f8d47c8a..3955658a 100644 --- a/ceph/python-cephclient/python-cephclient/cephclient/client.py +++ b/ceph/python-cephclient/python-cephclient/cephclient/client.py @@ -39,7 +39,7 @@ CEPH_MON_RESTFUL_USER = 'admin' CEPH_MON_RESTFUL_SERVICE = 'restful' CEPH_CLIENT_RETRY_COUNT = 2 CEPH_CLIENT_RETRY_TIMEOUT_SEC = 5 -CEPH_CLI_TIMEOUT_SEC = 5 +CEPH_CLI_TIMEOUT_SEC = 15 API_SUPPORTED_RESPONSE_FORMATS = [ 'text', 'json', 'xml', 'binary' ]