diff --git a/confluent_server/confluent/certutil.py b/confluent_server/confluent/certutil.py index d5696d7a..a6119faa 100644 --- a/confluent_server/confluent/certutil.py +++ b/confluent_server/confluent/certutil.py @@ -15,7 +15,7 @@ def get_openssl_conf_location(): raise Exception("Cannot find openssl config file") def get_ip_addresses(): - lines = subprocess.check_output('ip addr'.split(' ')) + lines = subprocess.check_output('ip addr'.split(' '), timeout=86400) if not isinstance(lines, str): lines = lines.decode('utf8') for line in lines.split('\n'): @@ -102,7 +102,7 @@ def assure_tls_ca(): raise shutil.copy2('/etc/confluent/tls/cacert.pem', fname) hv = subprocess.check_output( - ['openssl', 'x509', '-in', '/etc/confluent/tls/cacert.pem', '-hash', '-noout']) + ['openssl', 'x509', '-in', '/etc/confluent/tls/cacert.pem', '-hash', '-noout'], timeout=86400) if not isinstance(hv, str): hv = hv.decode('utf8') hv = hv.strip() diff --git a/confluent_server/confluent/selfservice.py b/confluent_server/confluent/selfservice.py index 6e78dc0f..14e6ae5e 100644 --- a/confluent_server/confluent/selfservice.py +++ b/confluent_server/confluent/selfservice.py @@ -192,7 +192,7 @@ def handle_request(env, start_response): if needlocalectl: try: langinfo = subprocess.check_output( - ['localectl', 'status']).split(b'\n') + ['localectl', 'status'], timeout=86400).split(b'\n') except Exception: langinfo = [] for line in langinfo: @@ -216,7 +216,7 @@ def handle_request(env, start_response): if ckeymap == 'n/a': continue keymap = ckeymap - tdc = subprocess.check_output(['timedatectl']).split(b'\n') + tdc = subprocess.check_output(['timedatectl'], timeout=86400).split(b'\n') for ent in tdc: ent = ent.strip() if ent.startswith(b'Time zone:'): diff --git a/confluent_server/confluent/syncfiles.py b/confluent_server/confluent/syncfiles.py index 0449b55e..0bb6aa51 100644 --- a/confluent_server/confluent/syncfiles.py +++ b/confluent_server/confluent/syncfiles.py @@ -89,7 +89,7 @@ def sync_list_to_node(sl, node, suffixes): os.path.join(targdir, suffixes['merge']), True) sshutil.prep_ssh_key('/etc/confluent/ssh/automation') output = subprocess.check_output( - ['rsync', '-rvL', targdir + '/', 'root@{}:/'.format(node)]) + ['rsync', '-rvL', targdir + '/', 'root@{}:/'.format(node)], timeout=86400) finally: shutil.rmtree(targdir) return output