Bug #26578
closedkexec template not processed
Description
Foreman 1.21 + Discovery 14.0.1 here
USB-based discovery doesn't progress to kexec:
Apr 10 14:52:03 fdi foreman-proxy1917: Initiated kexec provisioning with {"status":"Unable to render or parse template: The specified snippet 'testo' does not exist, or is not a snippet."}
Apr 10 14:52:03 fdi foreman-proxy1917: Downloading:
Apr 10 14:52:03 fdi foreman-proxy1917: Starting task: /usr/bin/wget --connect-timeout=10 --dns-timeout=10 --read-timeout=60 --tries=3 --no-check-certificate -nv -c "''" -O "/tmp/vmlinuz"
Apr 10 14:52:03 fdi foreman-proxy1917: [2182] wget: unable to resolve host address ‘''’
Apr 10 14:52:03 fdi foreman-proxy1917: cannot download kernel for kexec!
Weirdly enough, template preview and host -> templates tab -> discovery kexec review both render correctly.
My template is simple:
{
"kernel": "http://server/kernel_<%= snippet('test') >",
"initram": "http://server/initrd_<= snippet('test') %>",
"append": "rootfstype=auto ro rd.live.image quiet splash toram rd_NO_MD rd_NO_DM",
"extra": ["--args-linux"]
}
I use Foreman Discovery Image v3.5.0.
This was working without issues in Foreman 1.19 + Discovery 13.0.1