Project

General

Profile

Bug #26578

kexec template not processed

Added by Jacek Mierzwa about 1 month ago. Updated about 1 month ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Discovery plugin
Target version:
Difficulty:
Triaged:
No
Bugzilla link:
Pull request:
Team Backlog:
Fixed in Releases:
Found in Releases:

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

History

#1 Updated by Jacek Mierzwa about 1 month ago

Snippet name is 'test' -- just to clarify cause I inserted a typo to the original post.

#2 Updated by Jacek Mierzwa about 1 month ago

Of course, the snippet does exist.

#3 Updated by Lukas Zapletal about 1 month ago

  • Status changed from New to Closed

Jacek, please create a thread on https://community.theforeman.org.

Your template is incorrect, it works for me. Have you associated the correct "KExec" template and not other template? Have you modified it in any way? It must be a valid JSON, try to preview it. Provide me more details in the post, like template itself, rendered (preview) template for the host.

Also available in: Atom PDF