From 72d926ef6c5e9f8ddd0da39dbd1492dad3621c15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Pa=C3=9F?= <22845248+mpass99@users.noreply.github.com> Date: Fri, 21 Jul 2023 12:09:51 +0100 Subject: [PATCH] Insert debug message into execution tracing to verify that the date command is sometimes returning an empty string with exit code 5. --- internal/nomad/sentry_debug_writer.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/nomad/sentry_debug_writer.go b/internal/nomad/sentry_debug_writer.go index 5ed7b494..1c4be883 100644 --- a/internal/nomad/sentry_debug_writer.go +++ b/internal/nomad/sentry_debug_writer.go @@ -11,8 +11,10 @@ import ( ) var ( + // debugTimeDebugMessageFormat adds additional information for debugging the bug #325. + debugTimeDebugMessageFormat = ` || (echo -n \"\$? \"; ps aux)` // timeDebugMessageFormat is the format of messages that will be converted to debug messages. - timeDebugMessageFormat = `echo -ne "\x1EPoseidon %s $(date +%%s%%3N)\x1E"` + timeDebugMessageFormat = `echo -ne "\x1EPoseidon %s $(date +%%s%%3N` + debugTimeDebugMessageFormat + `)\x1E"` // Format Parameters: 1. Debug Comment, 2. command. timeDebugMessageFormatStart = timeDebugMessageFormat + `; %s` // Format Parameters: 1. command, 2. Debug Comment.