From 9b3ef6d6106f92b5172dec5da343e0986b4657c8 Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Mon, 17 Aug 2020 13:58:14 -0400 Subject: [PATCH] Add connect timeout to Ceph This doesn't seem to actually do anything (like most of these timeouts...) but add it just for posterity. --- node-daemon/pvcnoded/Daemon.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/node-daemon/pvcnoded/Daemon.py b/node-daemon/pvcnoded/Daemon.py index b3e7c02a..6ab12873 100644 --- a/node-daemon/pvcnoded/Daemon.py +++ b/node-daemon/pvcnoded/Daemon.py @@ -1031,7 +1031,9 @@ def collect_ceph_stats(queue): # Connect to the Ceph cluster try: ceph_conn = Rados(conffile=config['ceph_config_file'], conf=dict(keyring=config['ceph_admin_keyring'])) - ceph_conn.connect() + if debug: + logger.out("ceph-thread: Connecting to cluster", state='d') + ceph_conn.connect(timeout=1) except Exception as e: logger.out('Failed to open connection to Ceph cluster: {}'.format(e), state='e') return