-
Notifications
You must be signed in to change notification settings - Fork 4
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
Network macvlan for containers #12
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's working as expected.
macvlan0 and docker macvlan network are created and the test container is curlable from host and local network.
did you check after a server restart, does macvlan0 is created after the reboot, does the container is up ? Did you check also after a shorewall restart, a docker restart ? |
I need to recheck with a clean install, I tested too much and now the test machine hangs... The ssh connection to the docker host freezes for some seconds about every 20 seconds after reboot of the docker host. When I restart shorewall the issue disappears. A docker-ce update stops the test container and it's not startable anymore, I needed to remove and recreate.
|
I think we need to enable live-restore for what I tested it works well |
confirmed with live-restore the container is not hanged during the service restart nor the service upgrade |
Great! It's working now even after docker upgrade. |
I ask myself if it could solve our issue with aeria ? |
Found a bug (I think) To reproduce : set the prop Expected : last subnet is reported with ip a
|
aeria and macvlan cannot share the same bridge br0 :( |
I tested aeria, it seems we have some more issues:
Both works with the stable nethserver-docker version, I retested it. |
Portainer is not so stable I think, maybe a version related issue, for pihole I think it works I am playing with it, but aeria alone, I think macvlan and aeria are incompatible or at least not on the same bridge |
the but if I restart the server, the service is down.... I think I want to switch pihole to macvlan |
On my side pihole works on Aeria but sometimes stop resolving anything for an unknown reason. Did try on aqua as well without success. Maybe I should delete the persistent volumes, it could be a configuration error. |
Yes it could be related when a container doesn't want to start |
If pihole accepts a fixed IP it should work with macvlan. The same portainer version works with stable nethserver-docker so I think there's an issue in this pull request... |
hum testing portainer with default docker, it doesn't start even without created another docker network
not sure my version has changed something |
Removing everything under |
Macvlan must be created by filling some important parameters, the goal is to create a container with an IP on your network
macVlanGateway is the gateway of your network (192.168.12.1)
macVlanLocalNetwork is the full network of your router (192.168.12.0/24)
macVlanNetwork is the restricted IP for macVlan0 (192.168.12.192/27 here 32 IP for your container 192.168.12.193->192.168.12.222)
macVlanNic is the NIC where to run macvlan (eth0 here)
create the container with an IP on your network here
192.168.12.211
docker run --net=macvlan -dit --name nginx-test-01 --ip=192.168.12.211 --restart=unless-stopped nginx:alpine nginx-debug -g 'daemon off;'
if all is good, the container is reachable locally and externally
some debug command
ip a
must be
inet 192.168.12.192/27
docker network ls
b4f0244f07cb macvlan macvlan local