Add connect timeout to Ceph

This doesn't seem to actually do anything (like most of these
timeouts...) but add it just for posterity.
This commit is contained in:
Joshua Boniface 2020-08-17 13:58:14 -04:00
parent b451c0e8e3
commit 9b3ef6d610
1 changed files with 3 additions and 1 deletions

View File

@ -1031,7 +1031,9 @@ def collect_ceph_stats(queue):
# Connect to the Ceph cluster # Connect to the Ceph cluster
try: try:
ceph_conn = Rados(conffile=config['ceph_config_file'], conf=dict(keyring=config['ceph_admin_keyring'])) 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: except Exception as e:
logger.out('Failed to open connection to Ceph cluster: {}'.format(e), state='e') logger.out('Failed to open connection to Ceph cluster: {}'.format(e), state='e')
return return