Skip to content
This repository was archived by the owner on Sep 12, 2024. It is now read-only.

Commit 95ffae0

Browse files
authored
Removing stdout logging in local logger to avoid runbook getting stuck on write method. (#858)
* Update locallogger.py Bug 13865277: [CRI] automationrunbooktracer is hanging in automationrunbooktracer.log() Local logging to stdout is causing write_nocancel method to block indefinitely when there is too much loffing into stdout This logging is only used for debugging purpose, also the logs are getting redirected to runbook* and sandbox* files. Commenting out local stdout logging to resolve this issue. * Update locallogger.py formatting changes * Updating agent version to 1.7.10.0. Adding locallogger changes in 3.x/worker Updating agent version to 1.7.10.0 Adding locallogger changes in 3.x/worker
1 parent d1c9ac9 commit 95ffae0

File tree

5 files changed

+14
-13
lines changed

5 files changed

+14
-13
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ endif
316316

317317
nxOMSAutomationWorker:
318318
rm -rf output/staging; \
319-
VERSION="1.7.9.0"; \
319+
VERSION="1.7.10.0"; \
320320
PROVIDERS="nxOMSAutomationWorker"; \
321321
STAGINGDIR="output/staging/$@/DSCResources"; \
322322
cat Providers/Modules/$@.psd1 | sed "s@<MODULE_VERSION>@$${VERSION}@" > intermediate/Modules/$@.psd1; \

Providers/nxOMSAutomationWorker/automationworker/3.x/worker/configuration3.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
DEFAULT_VM_ID = DEFAULT_UNKNOWN
5959
DEFAULT_WORKER_TYPE = DEFAULT_UNKNOWN
6060
DEFAULT_COMPONENT = DEFAULT_UNKNOWN
61-
DEFAULT_WORKER_VERSION = "1.7.9.0"
61+
DEFAULT_WORKER_VERSION = "1.7.10.0"
6262
DEFAULT_JRDS_POLLING_FREQUENCY = "15"
6363

6464
# state configuration keys

Providers/nxOMSAutomationWorker/automationworker/3.x/worker/locallogger.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,20 +48,21 @@ def init_logger():
4848
default_rf_handler.setFormatter(formatter)
4949
default_logger.addHandler(default_rf_handler)
5050

51+
52+
# Stdout handler (Worker traces have to be formatted).
53+
#log_stream = logging.StreamHandler(sys.stdout)
54+
#log_stream.setFormatter(formatter)
55+
#default_logger.addHandler(log_stream)
56+
57+
# Stdout handler (traces coming from child process are already formatted).
58+
#sandbox_log_stream = logging.StreamHandler(sys.stdout)
59+
#sandbox_stdout.addHandler(sandbox_log_stream)
60+
5161
# Traces coming from sandbox child process and collected by the worker are already formatted, hence no formatter
5262
# needed.
5363
worker_sandbox_rf_handler = logging.handlers.RotatingFileHandler(file_name, maxBytes=10485760, backupCount=5)
5464
sandbox_stdout.addHandler(worker_sandbox_rf_handler)
5565

56-
# Stdout handler (Worker traces have to be formatted).
57-
log_stream = logging.StreamHandler(sys.stdout)
58-
log_stream.setFormatter(formatter)
59-
default_logger.addHandler(log_stream)
60-
61-
# Stdout handler (traces coming from child process are already formatted).
62-
sandbox_log_stream = logging.StreamHandler(sys.stdout)
63-
sandbox_stdout.addHandler(sandbox_log_stream)
64-
6566

6667
def log_warning(message):
6768
if default_logger is None:

Providers/nxOMSAutomationWorker/automationworker/worker/configuration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
DEFAULT_VM_ID = DEFAULT_UNKNOWN
5757
DEFAULT_WORKER_TYPE = DEFAULT_UNKNOWN
5858
DEFAULT_COMPONENT = DEFAULT_UNKNOWN
59-
DEFAULT_WORKER_VERSION = "1.7.9.0"
59+
DEFAULT_WORKER_VERSION = "1.7.10.0"
6060
DEFAULT_JRDS_POLLING_FREQUENCY = "15"
6161

6262
# state configuration keys

Providers/nxOMSAutomationWorker/automationworker/worker/configuration2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
DEFAULT_VM_ID = DEFAULT_UNKNOWN
5656
DEFAULT_WORKER_TYPE = DEFAULT_UNKNOWN
5757
DEFAULT_COMPONENT = DEFAULT_UNKNOWN
58-
DEFAULT_WORKER_VERSION = "1.7.9.0"
58+
DEFAULT_WORKER_VERSION = "1.7.10.0"
5959
DEFAULT_JRDS_POLLING_FREQUENCY = "15"
6060

6161
# state configuration keys

0 commit comments

Comments
 (0)