From bb15f082534783b7d8d9bbf491f294d02700e69a Mon Sep 17 00:00:00 2001 From: Longxiang Lyu Date: Tue, 29 Oct 2024 05:50:44 +0000 Subject: [PATCH 1/2] [dualtor][mux_simulator] Fix mux simulator stuck Signed-off-by: Longxiang Lyu --- ansible/roles/vm_set/files/mux_simulator.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ansible/roles/vm_set/files/mux_simulator.py b/ansible/roles/vm_set/files/mux_simulator.py index 81c74700785..f463e22b91d 100644 --- a/ansible/roles/vm_set/files/mux_simulator.py +++ b/ansible/roles/vm_set/files/mux_simulator.py @@ -8,6 +8,7 @@ import re import shlex import subprocess +import socket import sys import threading import traceback @@ -966,4 +967,5 @@ def log_message(vm_set): app.logger.info('Starting server on port {}'.format(sys.argv[1])) create_muxes(arg_vm_set) app.logger.info('####################### STARTING HTTP SERVER #######################') - app.run(host='0.0.0.0', port=http_port, threaded=False) + socket.setdefaulttimeout(60) + app.run(host='0.0.0.0', port=http_port, threaded=True) From 0d23f53c83426aba8384f1d4931dd0b0175dee3e Mon Sep 17 00:00:00 2001 From: Longxiang Lyu Date: Wed, 30 Oct 2024 01:58:29 +0000 Subject: [PATCH 2/2] Fix check error Signed-off-by: Longxiang Lyu --- ansible/roles/vm_set/files/mux_simulator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/roles/vm_set/files/mux_simulator.py b/ansible/roles/vm_set/files/mux_simulator.py index f463e22b91d..db49c115974 100644 --- a/ansible/roles/vm_set/files/mux_simulator.py +++ b/ansible/roles/vm_set/files/mux_simulator.py @@ -968,4 +968,4 @@ def log_message(vm_set): create_muxes(arg_vm_set) app.logger.info('####################### STARTING HTTP SERVER #######################') socket.setdefaulttimeout(60) - app.run(host='0.0.0.0', port=http_port, threaded=True) + app.run(host='0.0.0.0', port=http_port, threaded=True) # nosemgrep