You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Output from `nomad version`
Nomad v1.7.7
BuildDate 2024-04-16T19:26:43Z
Revision 0f34c85ee63f6472bd2db1e2487611f4b176c70c
Operating system and Environment details
$: cat /etc/debian_version
12.5
$: uname -a
Linux nomad2 6.1.0-20-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.85-1 (2024-04-11) x86_64 GNU/Linux
$: podman version
Client: Podman Engine
Version: 4.3.1
API Version: 4.3.1
Go Version: go1.19.8
Built: Thu Jan 1 01:00:00 1970
OS/Arch: linux/amd64
Issue
When I use the {{ timestamp "unix"}} function in two differente template blocks of the same task and one of the templates uses other functions which can cause re-rendering (like {{ key }} or {{ service }}, etc. ) and a re-rendering is performed, the template gets re-rendered in an infinite loop.
The problem does not exist when the task has only one template.
Sidenote: When the task is stuck in the renderloop proper shutdown is not possible.
Reproduction steps
create key foo/bar in consul with some random content
run the jobfile from below
wait until task is running
change the key foo/bar to another value
observe the Recent Events table of the task for re-occurring Template re-rendered messages
Expected Result
The template should be re-rendered exactly once.
Actual Result
The template gets re-rendered in an infinite loop every few seconds.
Hi @faryon93, thanks for reporting this. I was able to reproduce, and not only with podman but also with docker driver. Indeed there's something fishy happening with the taskrunner here, and we'll look into it.
Nomad version
Operating system and Environment details
Issue
When I use the
{{ timestamp "unix"}}
function in two differentetemplate
blocks of the same task and one of the templates uses other functions which can cause re-rendering (like{{ key }}
or{{ service }}
, etc. ) and a re-rendering is performed, the template gets re-rendered in an infinite loop.The problem does not exist when the task has only one template.
Sidenote: When the task is stuck in the renderloop proper shutdown is not possible.
Reproduction steps
foo/bar
in consul with some random contentfoo/bar
to another valueRecent Events
table of the task for re-occurringTemplate re-rendered
messagesExpected Result
The template should be re-rendered exactly once.
Actual Result
The template gets re-rendered in an infinite loop every few seconds.
Job file (if appropriate)
Nomad Server / Client logs
The text was updated successfully, but these errors were encountered: