Bug 1831885 - support <kickstart/> without a template
Summary: support <kickstart/> without a template
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Beaker
Classification: Retired
Component: general
Version: develop
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified with 1 vote
Target Milestone: 28.0
Assignee: Martin Styk
QA Contact: tools-bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-05-05 20:10 UTC by Jiri Jaburek
Modified: 2020-08-20 15:18 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-08-20 15:18:38 UTC
Embargoed:


Attachments (Terms of Use)

Description Jiri Jaburek 2020-05-05 20:10:45 UTC
Description of problem:

Take the contents of <kickstart/> as the literal verbatim Anaconda kickstart and pass it without any changes or additions as ks= on the kernel command line.

The contents should still be subject to jinja2 interpretation and customizable via jinja2 function calls and kickstart snippets, exactly like it's possible now:

https://beaker-project.org/docs/user-guide/customizing-installation.html#custom-kickstart-templates

This would allow us to Beaker-ize a custom kickstart, including snippets for install_* calls, /nopxe/, efibootmgr, etc., without adding any repos, installing a harness, putting misc files in various places on the installed system, etc.

This proposes an extension like <kickstart param="no_template">...</kickstart> that we could use in a job XML.


Version-Release number of selected component (if applicable):
Beaker 27.4


Additional info:

The described functionality is not currently possible even with this in ks_meta:

manual no_autopart no_networks no_addon_repos no_debug_repos no_clock_sync no_default_harness_repo no_disable_readahead no_updates_repos

Comment 1 Jiri Jaburek 2020-05-05 20:14:36 UTC
Note that fixing this would render bug 1818904 irrelevant as the functionality could be easily templated within <kickstart/>.

Comment 2 Jiri Jaburek 2020-05-19 20:32:04 UTC
Note that this bug may be an actual bug and not a feature request - all the documentation points to <kickstart/> being *the* template, whereas now it works like ks_append with ks_meta=manual implied.

So the proper fix would be to fix <kickstart/> to fully define the kickstart and ideally remove gotchas like:

    with TemplateRenderingEnvironment():
        if kickstart:
            template = template_env.from_string(
                "{% snippet 'install_method' %}\n" + kickstart)    <----
            result = template.render(restricted_context)

(the user using this probably isn't a newbie and can supply the snippet call if needed)

When an empty <kickstart></kickstart> is supplied, the ks= passed on kernel command line should be an empty file.

Comment 4 Martin Styk 2020-08-20 12:41:33 UTC
This bug is heavily used by some of the groups.

However, to enable your workload I patched it so <kickstart> will suit your purpose.
You just need to define ks_meta="no_ks_template" and you will get empty kickstart by default.

All snippets and restricted context is available.


Note You need to log in before you can comment on or make changes to this bug.