-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Cannot start podman container with static IP address on macvlan network #10283
Comments
Should the following line be changed podman/libpod/network/netconflist.go Line 180 in a7fa0da
Hi @baude , @Luap99, |
The default behavior of
Docker has an option |
@vikas-goel I opened #10408 to fix this. |
Creating a macvlan network with the subnet or ipRange option should set the ipam plugin type to `host-local`. We also have to insert the default route. Fixes containers#10283 Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
Thank you @Luap99 |
Creating a macvlan network with the subnet or ipRange option should set the ipam plugin type to `host-local`. We also have to insert the default route. Fixes containers#10283 Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
Reference #14352 |
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
When macvlan network is created, the
type
attribute remains set todhcp
. As a result running a container with --ip option fails. After manually replacingdhcp
tohost-local
in the network configuration file, the container can start.Steps to reproduce the issue:
Create a macvlan network
podman network create --driver macvlan --subnet 192.168.1.0/24 --gateway 192.168.1.254 -o parent=ens192 ens192
Check the network configuration
podman run --ip=192.168.1.2 --network=ens192
optionDescribe the results you received:
Describe the results you expected:
The macvlan type field should be set to
host-local
instead ofdhcp
. The container should start and the IP address should get assigned.Additional information you deem important (e.g. issue happens only occasionally):
Consistent
Output of
podman version
:Output of
podman info --debug
:Package info (e.g. output of
rpm -q podman
orapt list podman
):Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/master/troubleshooting.md)
Yes
Additional environment details (AWS, VirtualBox, physical, etc.):
Red Hat Enterprise Linux 8.4 Beta
VMware virtual machine
The text was updated successfully, but these errors were encountered: