8000 ipam-driver cannot be used with config-only network · Issue #33415 · moby/moby · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
ipam-driver cannot be used with config-only network #33415
Closed
@eyz

Description

@eyz

Description

While testing #32981, I found that --ipam-driver does not appear to get set in the --config-only network, and thus the IPAM driver is not used in global scope. I also have noted this finding in #32981

Steps to reproduce the issue:

  1. when no --config-only flag is specified, --ipam-driver is used properly and I get a subnet and gateway from the IPAM driver
  2. when setting --config-only, the IPAM.Driver appears to not be set even though it is specified in my example with --ipam-driver

Describe the results you received:

[root@centos7swarmtest01 ~]# docker version
Client:
 Version:      unknown-version
 API version:  1.30
 Go version:   go1.7.4
 Git commit:   883d28c
 Built:        Mon May 22 22:35:49 2017
 OS/Arch:      linux/amd64

Server:
 Version:      17.06.0-dev
 API version:  1.30 (minimum version 1.12)
 Go version:   go1.8.1
 Git commit:   5648a1a-unsupported
 Built:        Mon May 22 22:30:30 2017
 OS/Arch:      linux/amd64
 Experimental: true

Test-created network with --ipam-driver specified, without --config-only specified (still works fine)

[root@centos7swarmtest01 ~]# docker network create --ipam-driver=ishant8/sdip:latest -o parent=ens192 ipam_test_not_config_only

684d3f26a279a43b6bbfe6e9103cb0c35bd39d4f986e487100147cd7c75570e3
[root@centos7swarmtest01 ~]# docker network inspect 684
[
    {
        "Name": "ipam_test_not_config_only",
        "Id": "684d3f26a279a43b6bbfe6e9103cb0c35bd39d4f986e487100147cd7c75570e3",
        "Created": "2017-05-26T17:24:38.172971069-07:00",
        "Scope": "local",
        "Driver": "bridge",
        "EnableIPv6": false,
        "IPAM": {
            "Driver": "ishant8/sdip:latest",
            "Options": {},
            "Config": [
                {
                    "Subnet": "192.168.10.2/24",
                    "Gateway": "192.168.10.2"
                }
            ]
        },
        "Internal": false,
        "Attachable": false,
        "Ingress": false,
        "ConfigFrom": {
            "Network": ""
        },
        "ConfigOnly": false,
        "Containers": {},
        "Options": {
            "parent": "ens192"
        },
        "Labels": {}
    }
]

^^^ 👍 Driver is correctly set to ishant8/sdip:latest, and Subnet and Gateway are obtained from the IPAM plugin


Test-created network with --ipam-driver specified, with --config-only specified

[root@centos7swarmtest01 ~]# docker network create --config-only --ipam-driver=ishant8/sdip:latest -o parent=ens192 ipam_test_config_only
1533b1b79cbafbd8c79ccaeb0d14116144a6f2e00eb5ee0f30bce1c5eebd14bc

[root@centos7swarmtest01 ~]# docker network inspect 153
[
    {
        "Name": "ipam_test_config_only",
        "Id": "1533b1b79cbafbd8c79ccaeb0d14116144a6f2e00eb5ee0f30bce1c5eebd14bc",
        "Created": "2017-05-26T17:25:21.399703669-07:00",
        "Scope": "local",
        "Driver": "null",
        "EnableIPv6": false,
        "IPAM": {
            "Driver": "",
            "Options": {},
            "Config": []
        },
        "Internal": false,
        "Attachable": false,
        "Ingress": false,
        "ConfigFrom": {
            "Network": ""
        },
        "ConfigOnly": true,
        "Containers": {},
        "Options": {
            "parent": "ens192"
        },
        "Labels": {}
    }
]

[root@centos7swarmtest01 ~]# docker network create -d ipvlan --scope=swarm --config-from ipam_test_config_only --attachable ipam_test_swarm
izmjnk9h9coyfesetvjto3ttq

[root@centos7swarmtest01 ~]# docker network inspect iz
[
    {
        "Name": "ipam_test_swarm",
        "Id": "izmjnk9h9coyfesetvjto3ttq",
        "Created": "0001-01-01T00:00:00Z",
        "Scope": "swarm",
        "Driver": "ipvlan",
        "EnableIPv6": false,
        "IPAM": {
            "Driver": "default",
            "Options": null,
            "Config": []
        },
        "Internal": false,
        "Attachable": true,
        "Ingress": false,
        "ConfigFrom": {
            "Network": "ipam_test_config_only"
        },
        "ConfigOnly": false,
        "Containers": null,
        "Options": null,
        "Labels": null
    }
]

^^^ 👎 Driver is not set in config-only network, nor in global-scoped from config-only, and IPAM driver does not return Subnet nor Gateway

Describe the results you expected:

  • I expected the IPAM Driver to be set in the config-only network, and available to the global-scoped network which references it

Additional information you deem important (e.g. issue happens only occasionally):

Output of docker version:

Client:
 Version:      unknown-version
 API version:  1.30
 Go version:   go1.7.4
 Git commit:   883d28c
 Built:        Mon May 22 22:35:49 2017
 OS/Arch:      linux/amd64

Server:
 Version:      17.06.0-dev
 API version:  1.30 (minimum version 1.12)
 Go version:   go1.8.1
 Git commit:   5648a1a-unsupported
 Built:        Mon May 22 22:30:30 2017
 OS/Arch:      linux/amd64
 Experimental: true

Output of docker info:

Containers: 2
 Running: 2
 Paused: 0
 Stopped: 0
Images: 8
Server Version: 17.06.0-dev
Storage Driver: devicemapper
 Pool Name: docker-thinpool
 Pool Blocksize: 524.3kB
 Base Device Size: 10.74GB
 Backing Filesystem: xfs
 Data file: 
 Metadata file: 
 Data Space Used: 719.3MB
 Data Space Total: 40.8GB
 Data Space Available: 40.08GB
 Metadata Space Used: 225.3kB
 Metadata Space Total: 427.8MB
 Metadata Space Available: 427.6MB
 Thin Pool Minimum Free Space: 4.079GB
 Udev Sync Supported: true
 Deferred Removal Enabled: true
 Deferred Deletion Enabled: true
 Deferred Deleted Device Count: 0
 Library Version: 1.02.135-RHEL7 (2016-11-16)
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins: 
 Volume: local
 Network: bridge host ipvlan macvlan null overlay
 Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
Swarm: active
 NodeID: vup71mijb1fzmb69vef61crvm
 Is Manager: true
 ClusterID: 2iesnqh9gwb91wy04hiagzlyz
 Managers: 1
 Nodes: 3
 Orchestration:
  Task History Retention Limit: 5
 Raft:
  Snapshot Interval: 10000
  Number of Old Snapshots to Retain: 0
  Heartbeat Tick: 1
  Election Tick: 3
 Dispatcher:
  Heartbeat Period: 5 seconds
 CA Configuration:
  Expiry Duration: 3 months
  Force Rotate: 0
 Root Rotation In Progress: false
 Node Address: 10.210.102.215
 Manager Addresses:
  10.210.102.215:2377
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 3addd840653146c90a254301d6c3a663c7fd6429
runc version: 992a5be178a62e026f4069f443c6164912adbf09
init version: 949e6fa
Security Options:
 seccomp
  Profile: default
Kernel Version: 4.4.66-1.el7.elrepo.x86_64
Operating System: CentOS Linux 7 (Core)
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 3.859GiB
Name: tucevsswarmtest01
ID: ROMP:6ZSZ:V5EG:XQBH:WW7L:KZSE:K3EY:V3XP:TINW:VYW6:23GD:BYTJ
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Experimental: true
Insecure Registries:
 127.0.0.0/8
Live Restore Enabled: false

WARNING: bridge-nf-call-ip6tables is disabled

Additional environment details (AWS, VirtualBox, physical, etc.):

[root@centos7swarmtest01 ~]# uname -a
Linux centos7swarmtest01 4.4.66-1.el7.elrepo.x86_64 #1 SMP Thu May 4 08:30:11 EDT 2017 x86_64 x86_64 x86_64 GNU/Linux
[root@centos7swarmtest01 ~]# cat /etc/redhat-release 
CentOS Linux release 7.3.1611 (Core) 
[root@centos7swarmtest01 ~]# dmidecode | grep -i vmware
	Manufacturer: VMware, Inc.
	Product Name: VMware Virtual Platform
	Serial Number: VMware-42 3c 12 5d c6 59 7d 3b-5d 02 8c a3 37 6b bb fd

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/networkingkind/bugBugs are bugs. The cause may or may not be known at triage time so debugging may be needed.version/master

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0