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

Usage example for LAUNCH_EXT_NETWORKS_IPV4 #27

Closed
n1nj4888 opened this issue Mar 8, 2021 · 4 comments
Closed

Usage example for LAUNCH_EXT_NETWORKS_IPV4 #27

n1nj4888 opened this issue Mar 8, 2021 · 4 comments
Labels
support This is a support question

Comments

@n1nj4888
Copy link

n1nj4888 commented Mar 8, 2021

Am I correct in understanding that the recent LAUNCH_EXT_NETWORKS_IPV4 feature allows for a container launched with swarm-launcher to have a static IPv4 address on the local network, essentially a floating VIP? Ie in the following network scenario, the container could be able to be launched and failover across the swarm nodes with a static IP of say 192.168.1.10 configured?

Network: 192.168.1.0/24
Router: 192.168.1.254 (DHCP Range: 192.168.1.100-200)
Swarm Hosts: 192.168.1.1, 192.168.1.2, 192.168.1.3

if this is the case, could you update the Usage Examples for how this would be configured?

thanks!

@tlex tlex added the support This is a support question label Mar 9, 2021
@tlex
Copy link
Member

tlex commented Mar 9, 2021

Thanks for the question.

I haven't added this to the documentation, because this isn't the use case that's covered by LAUNCH_EXT_NETWORKS_IPV4, but it's an implementation of the missing feature documented here: moby/moby#24170

When you create a swarm-scoped network, that network is not reachable from the host itself (see also the documentation). Now, if you were to create a macvlan network on every swarm member where you plan to allow your container started by swarm-launcher to run, in theory it should be possible to do what you describe.

If you try it out and see that it works, I'm more than happy to accept a pull request for the documentation 🙂

Best

@tlex
Copy link
Member

tlex commented Mar 17, 2021

See also #28 on an example with macvlan that might just work

@n1nj4888
Copy link
Author

ok thanks, I'll give it a try... Am I correct to assume that the VIP will still not be reachable by the host on which it runs (at least not without some manual network routing configuration outside docker on each of the swarm nodes)?

@tlex
Copy link
Member

tlex commented Nov 4, 2022

Oh my, this ticket has been 'lost' open for a long time.

I'll close it now. If you have other questions, please feel free to open a new ticket.

@tlex tlex closed this as completed Nov 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
support This is a support question
Projects
None yet
Development

No branches or pull requests

2 participants