docker-archive / classicswarm

Swarm Classic: a container clustering system. Not to be confused with Docker Swarm which is at https://github.com/docker/swarmkit
Apache License 2.0
5.75k stars 1.08k forks source link

Cannot configure gateway and subnet range of IPAM network on swarm mode #2805

Closed Routhinator closed 7 years ago

Routhinator commented 7 years ago

I've been trying to get this to work on Swarm, and from what I can find via Google and testing it will never work as a swarm service because Swarm mode only allows the subnet to be set on the IPAM config for swarm networks.

For background, the dhcp subnet is an external subnet which has an assignable range and a reservable range. Since Docker has not added support for true DHCP on a container yet I assign a assignable range to the Docker service and the DHCP server, and use static IPs for containers I need to NAT to from my firewall. This keeps management simple and allows me to use only docker instead of a mix of Docker and VMs.

Unfortunately I cannot use this with swarm, and I'm uncertain if this is a bug, an oversight, or a feature in progress. I also do not see anything in the current open or closed issues on this topic.

Is this something that is being worked on or fixed? Or should I call this a feature request and change the title?

version: '2.1'

services:
  plex:
    image: plexinc/pms-docker
    networks:
      dhcp:
        ipv4_address: 192.168.52.6

networks:
  dhcp:
    driver: macvlan
    driver_opts:
      parent: bond0
    ipam:
      config:
        - subnet: 192.168.52.0/22
          gateway: 192.168.52.1
          ip_range: 192.168.52.112/28
Routhinator commented 7 years ago

Wrong repo - this issue is related to swarmkit. Closing.