Don't try to restart docker

This commit is contained in:
alesapin 2021-11-05 21:49:40 +03:00
parent dd9446d8d3
commit 2a7e246021

View File

@ -135,27 +135,6 @@ def clear_ip_tables_and_restart_daemons():
except subprocess.CalledProcessError as err:
logging.info("docker rm excepted: " + str(err))
try:
logging.info("Stopping docker daemon")
subprocess.check_output("service docker stop", shell=True)
except subprocess.CalledProcessError as err:
logging.info("docker stop excepted: " + str(err))
try:
for i in range(200):
try:
logging.info("Restarting docker %s", i)
subprocess.check_output("service docker start", shell=True)
subprocess.check_output("docker ps", shell=True)
break
except subprocess.CalledProcessError as err:
time.sleep(0.5)
logging.info("Waiting docker to start, current %s", str(err))
else:
raise Exception("Docker daemon doesn't responding")
except subprocess.CalledProcessError as err:
logging.info("Can't reload docker: " + str(err))
iptables_iter = 0
try:
for i in range(1000):