Pass check-alive flag to IPAM API

This commit is contained in:
Bryan Boreham committed 2017-05-12 06:56:52 +00:00
1 parent b1917d909a
commit 0273491e6e
4 files changed
+23 -14

No files matched your search

+2 -2
View File
@@ -78,7 +78,7 @@ func (i *Ipam) RequestAddress(poolID string, address net.IP, options map[string]
i.logReq("RequestAddress", poolID, address, options)
defer func() { i.logRes("RequestAddress", err, ip) }()
if poolID == "weavepool" { // old-style
ip, err = i.weave.AllocateIP(api.NoContainerID)
ip, err = i.weave.AllocateIP(api.NoContainerID, false)
return
}
subnet, iprange, err := splitPoolID(poolID)
@@ -92,7 +92,7 @@ func (i *Ipam) RequestAddress(poolID string, address net.IP, options map[string]
}
} else {
// We are lying slightly to IPAM here: the range is not a subnet
if ip, err = i.weave.AllocateIPInSubnet(api.NoContainerID, iprange); err != nil {
if ip, err = i.weave.AllocateIPInSubnet(api.NoContainerID, iprange, false); err != nil {
return
}
ip.Mask = subnet.Mask // fix up the subnet we lied about