[RFC] stages: run "ksvalidator" optionally when generating kickstarts #1789
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a bug in osbuild/bootc-image-builder#363 where a stray newlnine in the ssh key broke the kickstart file (and it was a bit annoying/non-obvious to find).
The isse is that when auto-generating the config.json for an ssh keyfile it's easy to accidentally include the final
\n
in the ssh key json string. This will break in very non-obvious ways, i.e. the image will be generated but the kickstart file is broken because now it looks like:which make the kickstart invalid but that is only discovered much later when the image booted (or even later after the installer put the kickstart into the target system).
This commit runs
ksvalidator
(if available) to detect this kind of issue early. It requirespykickstart
in the buildroot but that seems to be not too bad as we already havepython3-kickstart
in our buildroots AFAICT (unless I read the manifest-db incorrectly).So it does require an extra tweak to
images
before it's fully useful, something like:probably(?).