Project

General

Profile

Actions

Bug #26578

closed

kexec template not processed

Added by Jacek Mierzwa almost 5 years ago. Updated almost 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Discovery plugin
Target version:
Difficulty:
Triaged:
No
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

Actions #1

Updated by Jacek Mierzwa almost 5 years ago

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

Actions #2

Updated by Jacek Mierzwa almost 5 years ago

Of course, the snippet does exist.

Actions #3

Updated by Lukas Zapletal almost 5 years 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.

Actions

Also available in: Atom PDF