-
Notifications
You must be signed in to change notification settings - Fork 59
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
Initramfs network configuration #460
Comments
I'm overall fine with this. However, one thing I'd like to investigate at some point is whether we actually need to default to DHCP on platforms where metadata comes from the link local address - which is almost all the important cloud providers. If all we need to do in the initramfs is bring up "the" NIC enough to fetch that, that would allow us to uniformly support encoding network config in Ignition. |
As part of the proposal it includes:
Which means each platform can have it's own default so we could do something clever.
Right now I don't think we're currently differentiating between initramfs networking and real root networking. i.e. link local may be enough for initramfs networking to grab an ignition config from the provider but not for real root. Though, another thing to think about is that your ignition config could have remote references which would need more than link local networking. Overall I think it's just safer to bring it all the way up to the point you can resolve hostnames and curl. |
It's a bit trickier than that though, because e.g. Ignition might be able to fetch the config over link-local, but still needs full networking to fetch remote resources specified in the config. And we only have a single synchronization point for yes/no to full networking. So I think this is something like: on supported platforms, we always bring up networking enough for link-local. If Ignition needs full networking, it can request it. This is what this bit is about:
|
I had a chat with some of the openstack provisioning folks today (aka OpenShift IPI). Out of that I had a specific question:
|
Short answer: yes. Long answer: yes, but if possible, I would strongly advise using the metal image instead and the new coreos-installer to inject the Ignition config. While all the images are just one transform step away from each other right now, that may not always be the case (see e.g. coreos/fedora-coreos-config#407). I think we want to reserve the right to change that. Also, the OpenStack Ignition provider in specific is not great because it has to query for both config drives and the metadata server in parallel, and we've established that in general it's not a good idea to have this sort of timeout (see a lot of discussions around this in coreos/ignition#928). Your question though made me realize that I need to adapt the Ignition OpenStack provider code in light of the fetch-offline work so that we don't just error out if the metadata server fails, but signal neednet. |
This documents the design in coreos#460 with some more implementation details. This came up in discussions today while talking about coreos#689, so let's write it down somewhere so it's easier to reference in the future. Closes: coreos#460
This is done now:
See also #691. |
We want to rework networking in the initramfs so that:
coreos-installer
network config path (install: UI for forwarding network information into next boot coreos-installer#205)Chatted with @dustymabe and @lucab about this, and the proposal we came up with is the following:
rd.neednet=1 ip=dhcp,dhcp6
kargs coreos-assembler#1298)/etc/cmdline.d
dropins.So the end state would look something like this:
ip=dhcp,dhcp6
on most platforms but may be fed from a platform-specific channel if available (e.g. VMWare guestinfo). It writes this to e.g./etc/cmdline.d/50-afterburn-network-kargs
. It defers to anyip=
kargs explicitly provided on the kernel cmdline by the user (or any networking config installed via thecoreos-installer --copy-network-config
path). Note though Afterburn does not writerd.neednet=1
.ignition-fetch.service
can separately request networking via/etc/cmdline.d/50-ignition-neednet
, which only containsrd.neednet=1
. And in the future, any other initrd service that may need networking can do the same thing as Ignition.The text was updated successfully, but these errors were encountered: