Skip to content
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

Unknown kernel command line parameters with CNI and Linux 6.1 Kernel #516

Closed
alexellis opened this issue Nov 8, 2023 · 14 comments
Closed

Comments

@alexellis
Copy link

The Firecracker team recently added a Linux Kernel 6.1 configuration for guest VMs.

When switching to this, and using CNI for networking and IP allocation, the IP address is injected into KernelArgs part of the firecracker.Config struct.

The problem appears to be that one or more of the previously valid configuration items or approaches for setting IPs is no longer valid in the 6.1 Kernel.

[    0.000000] Kernel command line: i8042.noaux i8042.nomux init=/sbin/init root=/dev/vda random.trust_cpu=on console=ttyS0 reboot=k pci=off ip=192.168.128.26::192.168.128.1:255.255.255.0:::off::: i8042.dumbkbd panic=1 acpi=off i8042.nopnp root=/dev/vda rw earlycon=uart,mmio,0x40003000
[    0.000000] Unknown kernel command line parameters "pci=off ip=192.168.128.26::192.168.128.1:255.255.255.0:::off::: acpi=off", will be passed to user space.

The result is that networking is not enabled or working as it was in a 5.11 Kernel with the same use of this Go SDK and the same CNI configuration.

@richardcase also ran into an identical issue whilst trying to write a new tool with this SDK and CNI.

CNI is important for simple IP management and proper namespacing of networks etc.

@richardcase
Copy link

As @alexellis mentions, i ran into this using:

For the time being i have used the 5.10 kernel config instead.

@alexellis
Copy link
Author

alexellis commented Nov 8, 2023

It seems like pci= ip= and acpi= are all valid within the Kernel documentation for 6.1: https://www.kernel.org/doc/html/v6.1/admin-guide/kernel-parameters.html

Perhaps there's an issue with the format of the string injected by CNI? I.e. ip=192.168.128.26::192.168.128.1:255.255.255.0:::off:::

Format: https://www.kernel.org/doc/html/v6.1/admin-guide/nfs/nfsroot.html

ip=<client-ip>:<server-ip>:<gw-ip>:<netmask>:<hostname>:<device>:<autoconf>:<dns0-ip>:<dns1-ip>:<ntp0-ip>

The 5.11 docs show the same string:

ip=<client-ip>:<server-ip>:<gw-ip>:<netmask>:<hostname>:<device>:<autoconf>:<dns0-ip>:<dns1-ip>:<ntp0-ip>

So perhaps it's something else that the maintainers can advise on?

@alexellis
Copy link
Author

It's been a couple of weeks now, so I wanted to tag a maintainer/contributor for suggestions/input.

@fangn2 what would be your thoughts?

@kzys are you at Fly now? I don't think Fly uses this Go SDK, but have you tried a 6.1 Kernel, have you had any similar issues?

@lbogdan
Copy link

lbogdan commented Nov 26, 2023

@alexellis
Copy link
Author

From looking at git blame, and our configs saved from last year, I can see that CONFIG_IP_PNP was actually on until 2 months ago when @pb8o submitted a PR called "trim configurations"

firecracker-microvm/firecracker@1c07d2d

Disabled some options that we don't seem to need for our integration
tests. There's still options we can disable, but this already brings
down the kernel size from

Perhaps the integration tests in this repo were skipped, or do not exercise CNI and verify that it works?

It also turns off important features for getting containers to work within Firecracker like CONFIG_NF_NAT

A larger issue is the huge heavy lift that exists for all Firecracker users who want to use containers/K8s within their microVMs, we have so many options to add in to every different Kernel version to make it usable.

@pb8o
Copy link

pb8o commented Dec 1, 2023

Hi! Thanks for reporting this issue. In the Firecracker team, we weren't aware that these kernels are used anywhere else besides Firecracker's CI and I went ahead with removing everything that looked superfluous.

We will look into this issue, but keep in mind that these guest kernel config are not recommended, but are rather just provided as examples.

@utibeabasi6
Copy link

Hey @pb8o do you have a recommended guest config?
Probably one that would work for a prod environment

@pb8o
Copy link

pb8o commented Feb 13, 2024

@utibeabasi6 We don't currently have a recommended guest config. You can use the ones in the repo as a starting point and add anything you need. I will add back that option as that seems like something that is useful for our CI too.

@alexellis
Copy link
Author

Thank you for the response @pb8o - if you've added this and can link the commit or PR, I'll get this closed?

@pb8o
Copy link

pb8o commented Feb 26, 2024

I haven't added it back yet. Is CONFIG_IP_PNP=y the only option needed or do we also need CONFIG_IP_PNP_DHCP=y?

pb8o added a commit to pb8o/firecracker that referenced this issue Mar 15, 2024
firecracker-microvm/firecracker-go-sdk#516

Signed-off-by: Pablo Barbáchano <pablob@amazon.com>
pb8o added a commit to pb8o/firecracker that referenced this issue Mar 21, 2024
firecracker-microvm/firecracker-go-sdk#516

Signed-off-by: Pablo Barbáchano <pablob@amazon.com>
pb8o added a commit to firecracker-microvm/firecracker that referenced this issue Mar 22, 2024
firecracker-microvm/firecracker-go-sdk#516

Signed-off-by: Pablo Barbáchano <pablob@amazon.com>
@pb8o
Copy link

pb8o commented May 24, 2024

Hi, the changes got merged in firecracker-microvm/firecracker#4503, and we recently created all the artifacts, so the new kernels should be effective now. I think this can be resolved. Thanks!

@alexellis
Copy link
Author

Thanks for the message @pb8o I'll close this now.

@alexellis
Copy link
Author

On a related note, do you have a rough timeline for when the latest LTS Kernel may be available with a tested guest config?

@pb8o
Copy link

pb8o commented May 29, 2024

We roughly wait for when a new kernel is released in Amazon Linux, and then we add support some time after. We don't have an established timeline at the moment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants