contiv / netplugin

Container networking for various use cases
Apache License 2.0
512 stars 177 forks source link

ipAllocMap is not correct #1165

Open arnolix opened 5 years ago

arnolix commented 5 years ago

Description

[root@gs-predcos-node21 ~]# netctl net inspect vlan45 |more { "Config": { "key": "default:vlan45", "encap": "vlan", "gateway": "10.0.45.254", "networkName": "vlan45", "nwType": "data", "pktTag": 45, "subnet": "10.0.45.0/24", "tenantName": "default", "link-sets": {}, "links": { "Tenant": { "type": "tenant", "key": "default" } } }, "Oper": { "allocatedAddressesCount": 233, "allocatedIPAddresses": "10.0.45.1-10.0.45.171, 10.0.45.173-10.0.45.196, 10.0.45.199-10.0.45.200, 10.0.45.204, 10.0.45.206-10.0.45.210, 10.0.45.214-10.0.4 5.215, 10.0.45.218, 10.0.45.220-10.0.45.221, 10.0.45.228-10.0.45.231, 10.0.45.233-10.0.45.254", "availableIPAddresses": "10.0.45.172, 10.0.45.197-10.0.45.198, 10.0.45.201-10.0.45.203, 10.0.45.205, 10.0.45.211-10.0.45.213, 10.0.45.216-10.0.45.217, 10. 0.45.219, 10.0.45.222-10.0.45.227, 10.0.45.232",

Expected Behavior

Observed Behavior

allocatedAddressesCount and allocatedIPAddresses is not correct, actully It is only 126 ip.

Steps to Reproduce (for bugs)

My mechine is rebooted. I delete dirty data in etcd throngh etcdctl rm /xxx/oper/xxx and /xxx/state/xxxx, but netctl net inspect vlanxx , is not correct.

how I do ?

Your Environment

liucimin commented 5 years ago

yes the netctl net inpsect is use the netmaster cache. So maybe u should restart the netmaster.

arnolix commented 5 years ago

not netmaster cache , when server is hang, server is poweroff, netmaster will make many no-released ip. contiv is plugin for docker, product env is not permitted restart docker.

liucimin commented 5 years ago

not netmaster cache , when server is hang, server is poweroff, netmaster will make many no-released ip. contiv is plugin for docker, product env is not permitted restart docker.

u dont understand my answer. I mean the when u use net inspect command,the result show u the netmaster cache although u delete the data in etcd.