-
Notifications
You must be signed in to change notification settings - Fork 172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ignition.platform.id=metal for bare metal #339
Conversation
This works since we have a separate kickstart for metal. Do we plan for that to always be the case? Or would we possibly use the "golden image" one day for bare metal too? If so it may be better to use gf-oemid like we do for qemu? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One comment/question about approach, otherwise LGTM. Can you make sure that ignition won't barf if it encounters an OEM ID it doesn't know about?
No - we've talked repeatedly about not using Anaconda right?
gf-oemid will fail on EFI layout right now; also doesn't really gain us anything either.
Looking at the code, it does |
FYI the 'metal' platform id was added coreos/ignition#724 . Will be in the next ignition release. |
@cgwalters I think we can just We need this for bare-metal in FCOS (see coreos/coreos-installer#22 (comment)). For RHCOS, I think this is working right now because we're always outputting an id even if it's the wrong one: https://github.com/coreos/ignition-dracut/blob/79f5d7adfbb83f088be947f6497f04fbc9de939c/dracut/30ignition/ignition-generator#L98. |
For FCOS, I was playing with: commit afe77b7313c2fafd3820901c5192249613a0b8e3
Date: Mon Apr 8 16:05:13 2019 -0400
dracut/30ignition: default to `metal` platform if none given
The `metal` platform id is essentially a "no-op" in Ignition. IOW, if
no specific platform id is given, let's just assume that the config is
baked in.
diff --git a/dracut/30ignition/ignition-generator b/dracut/30ignition/ignition-generator
index 7d56030..439d784 100755
--- a/dracut/30ignition/ignition-generator
+++ b/dracut/30ignition/ignition-generator
@@ -39,4 +39,4 @@ if $(cmdline_bool 'ignition.firstboot' 0); then
add_requires ignition-complete.target
fi
-echo "PLATFORM_ID=$(cmdline_arg ignition.platform.id)" > /run/ignition.env
+echo "PLATFORM_ID=$(cmdline_arg ignition.platform.id metal)" > /run/ignition.env but I'm thinking now it's probably cleaner to just keep erroring the way we do now (though we could improve that error), instead of having this sort of "default" logic. |
OK, updated! ⬆️ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
LGTM |
How is this supposed to be used? I tried with setting coreos.oem.id=metal and it didn't work for PXE-boot. However after installation I added ignition.platform.id=metal to the kernel boot parameters and this seems to be picked up. I'm using build 29.936. |
This is the id that gets embedded in the raw metal images so that Ignition will know to not try to look elsewhere for an Ignition config and just use the one that was specified at install time. IOW, you shouldn't actually have to type out |
Ref: coreos/fedora-coreos-tracker#142