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

Error: unsupported macvlan network option metric #2051

Closed
literatesnow opened this issue Jun 17, 2024 · 1 comment · Fixed by #2063
Closed

Error: unsupported macvlan network option metric #2051

literatesnow opened this issue Jun 17, 2024 · 1 comment · Fixed by #2063
Assignees
Labels

Comments

@literatesnow
Copy link

Hello

OS: Arch Linux x86_64
Podman version: 5.1.1-1
Netavark version: 1.11.0-2

I have a container attached to multiple macvlan networks. As some of the networks block access to the internet, my container sometimes can't access the internet as all routes have a default metric of 100.

The podman documentation for podman network create (5.1.1) states that I should be able to change the metric for the network:

--opt, -o=option
Set driver specific options.
All drivers accept the mtu, metric, no_default_route and options.

However, attempting to create a macvlan network with a metric results in an error:

$ sudo podman network create --driver macvlan --interface-name=eth0 --ipam-driver=dhcp --opt=metric=50 foo

Error: unsupported macvlan network option metric

For more information on package versions and podman info please see attached.

Thanks!

@Luap99
Copy link
Member

Luap99 commented Jun 17, 2024

This is a podman issue not netavark, podman creates the config file and validates the options not netavark.
Netavark seems to accept and use this option fine.

I move the issue to the right place.

@Luap99 Luap99 transferred this issue from containers/netavark Jun 17, 2024
@Luap99 Luap99 added good first issue Good for newcomers kind/bug labels Jun 17, 2024
@Luap99 Luap99 self-assigned this Jun 25, 2024
Luap99 added a commit to Luap99/netavark that referenced this issue Jun 25, 2024
Make sure macvlan supports the metric option, the code did so for a
while but there never was a metric test added here and it didn't work in
podman[1]. So make sure we test it works and do not regress.

[1] containers/common#2051

Signed-off-by: Paul Holzinger <[email protected]>
Luap99 added a commit to Luap99/netavark that referenced this issue Jun 25, 2024
Make sure macvlan supports the metric option, the code did so for a
while but there never was a metric test added here and it didn't work in
podman[1]. So make sure we test it works and do not regress.

[1] containers/common#2051

Signed-off-by: Paul Holzinger <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants