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

Ability to set CNI parameters #13520

Open
nakabonne opened this issue Jun 29, 2022 · 1 comment
Open

Ability to set CNI parameters #13520

nakabonne opened this issue Jun 29, 2022 · 1 comment

Comments

@nakabonne
Copy link
Contributor

Ref https://discuss.hashicorp.com/t/does-nomad-provide-the-ability-to-set-cni-parameters/40996

Proposal

It would be nice if we could set CNI_IFNAME as a parameter when inserting network interface into container using CNI plugin.

As far as I can tell from the source code, seems like it doesn’t accept any parameters (args):
https://github.com/hashicorp/nomad/blob/f233f7446cce12fc82e823165705ad8e4ad9d0db/client/allocrunner/networking_cni.go/#L100

Use-cases

I would like to move multiple network interfaces into a container network namespace using the plugin host-device. The default interface name (eth0) is used for both. It fails because duplicated interface name isn't allowed.

Attempted Solutions

I tried setting the environment variable CNI_IFNAME when starting nomad client, but it didn't work.

@jrasell
Copy link
Member

jrasell commented Jun 29, 2022

Hi @nakabonne and thanks for raising this issue. It's an interesting one as the specification states that it must be passed via an environment variable to the CNI plugin called when building the network namespace. This would explain why it doesn't work when setting the env var on the Nomad agent process.

I'll mark this enhancement as needing investigation, as there are a number of UX factors to consider along with what CNI plugins truly support this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Needs Roadmapping
Development

No branches or pull requests

2 participants