netplugin icon indicating copy to clipboard operation
netplugin copied to clipboard

legacy plugin netplugin of type NetworkDriver is not supported in swarm mode

Open rootsongjc opened this issue 7 years ago • 3 comments

environment

docker 1.13.1 netplugin

Version: 1.0.0-beta.3-03-08-2017.18-51-20.UTC
GitCommit: 5cc4797
BuildTime: 03-08-2017.18-51-20.UTC

I see the release note 8afd1b7 Docker 1.13 swarm-mode support for contiv

Command to create a contiv network netctl --netmaster http://172.20.0.113:9999 network create --subnet=10.1.2.0/24 contiv-net

Error messages from netmaster daemon

time="Mar  9 21:44:14.746627381" level=debug msg="NwInfra type is default, no ACI" 
time="Mar  9 21:44:14.750278056" level=info msg="Creating docker network: {CheckDuplicate:true Driver:netplugin EnableIPv6:false IPAM:0xc4204d8ea0 Internal:false Attachable:true Options:map[tenant:default encap:vxlan pkt-tag:1] Labels:map[]}" 
time="Mar  9 21:44:14.752034749" level=error msg="Error creating network contiv-net. Err: Error response from daemon: legacy plugin netplugin of type NetworkDriver is not supported in swarm mode" 
time="Mar  9 21:44:14.752067294" level=error msg="Error creating network contiv-net.default in docker. Err: Error response from daemon: legacy plugin netplugin of type NetworkDriver is not supported in swarm mode" 
time="Mar  9 21:44:14.752102735" level=error msg="Error creating network {&{Key:default:contiv-net Encap:vxlan Gateway: Ipv6Gateway: Ipv6Subnet: NetworkName:contiv-net NwType:data PktTag:0 Subnet:10.1.2.0/24 TenantName:default LinkSets:{EndpointGroups:map[] Servicelbs:map[] Services:map[]} Links:{Tenant:{ObjType: ObjKey:}}}}. Err: Error response from daemon: legacy plugin netplugin of type NetworkDriver is not supported in swarm mode" 
time="Mar  9 21:44:14.752129195" level=error msg="NetworkCreate retruned error for: &{Key:default:contiv-net Encap:vxlan Gateway: Ipv6Gateway: Ipv6Subnet: NetworkName:contiv-net NwType:data PktTag:0 Subnet:10.1.2.0/24 TenantName:default LinkSets:{EndpointGroups:map[] Servicelbs:map[] Services:map[]} Links:{Tenant:{ObjType: ObjKey:}}}. Err: Error response from daemon: legacy plugin netplugin of type NetworkDriver is not supported in swarm mode" 
time="Mar  9 21:44:14.752155973" level=error msg="CreateNetwork error for: {Key:default:contiv-net Encap:vxlan Gateway: Ipv6Gateway: Ipv6Subnet: NetworkName:contiv-net NwType:data PktTag:0 Subnet:10.1.2.0/24 TenantName:default LinkSets:{EndpointGroups:map[] Servicelbs:map[] Services:map[]} Links:{Tenant:{ObjType: ObjKey:}}}. Err: Error response from daemon: legacy plugin netplugin of type NetworkDriver is not supported in swarm mode" 
time="Mar  9 21:44:14.752172138" level=error msg="Handler for POST /api/v1/networks/default:contiv-net/ returned error: Error response from daemon: legacy plugin netplugin of type NetworkDriver is not supported in swarm mode" 

Should I start the netplugin daemon first before create a contiv network?

rootsongjc avatar Mar 09 '17 14:03 rootsongjc

@rootsongjc, docker swarm-mode supports v2 plugins. You need to install contiv's v2 plugin

  1. start etcd on the host
  2. docker plugin install contiv/v2plugin:1.0.0-beta.3 iflist=
  3. docker plugin ls This starts bothnetplugin and netmaster in the v2plugin. I will document the steps and add it to the repo soon

gkvijay avatar Mar 09 '17 17:03 gkvijay

@gkvijay Thanks, I can build the v2plugin with this command belowing.

bash scripts/v2plugin_rootfs.sh

The rootfs at install/v2plugin/rootfs ,then docker network create contiv/v2plugin install/v2plugin/

rootsongjc avatar Mar 10 '17 03:03 rootsongjc

I got it working with the following commands:

docker plugin install contiv/v2plugin:1.0.0-beta.6
Plugin "contiv/v2plugin:1.0.0-beta.6" is requesting the following privileges:
 - network: [host]
 - mount: [/etc/openvswitch]
 - mount: [/var/log/openvswitch]
 - mount: [/var/run]
 - mount: [/lib/modules]
 - capabilities: [CAP_SYS_ADMIN CAP_NET_ADMIN CAP_SYS_MODULE]
Do you grant the above permissions? [y/N] y
...
...
service netmaster restart
service netplugin restart

After the service restarts, I was able to create networks using netctl:

netctl net create -p 123 -e vlan -s 192.168.123.0/24 prod-docker

Regards, Philip

PhilipSchmid avatar Apr 13 '17 18:04 PhilipSchmid