Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

Commit

Permalink
Fix crash
Browse files Browse the repository at this point in the history
  • Loading branch information
bboreham committed Feb 10, 2017
1 parent 9cd353a commit 3552773
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion prog/weaver/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ func main() {
allContainerIDs, err = dockerCli.AllContainerIDs()
checkFatal(err)
}
preClaims, err := findExistingAddresses(dockerCli.Client, allContainerIDs, weavenet.WeaveBridgeName)
preClaims, err := findExistingAddresses(dockerCli, allContainerIDs, weavenet.WeaveBridgeName)
checkFatal(err)
allocator, defaultSubnet = createAllocator(router, ipamConfig, preClaims, db, t, isKnownPeer)
observeContainers(allocator)
Expand Down
3 changes: 2 additions & 1 deletion prog/weaver/reclaim.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (

"github.com/weaveworks/weave/api"
"github.com/weaveworks/weave/common"
weavedocker "github.com/weaveworks/weave/common/docker"
"github.com/weaveworks/weave/ipam"
weavenet "github.com/weaveworks/weave/net"
"github.com/weaveworks/weave/net/address"
Expand All @@ -19,7 +20,7 @@ func a(cidr *net.IPNet) address.CIDR {

// Get all the existing Weave IPs at startup, so we can stop IPAM
// giving out any as duplicates
func findExistingAddresses(dockerCli *docker.Client, containerIDs []string, bridgeName string) (addrs []ipam.PreClaim, err error) {
func findExistingAddresses(dockerCli *weavedocker.Client, containerIDs []string, bridgeName string) (addrs []ipam.PreClaim, err error) {
Log.Infof("Checking for pre-existing addresses on %s bridge", bridgeName)
// First get the address for the bridge
bridgeNetDev, err := weavenet.GetBridgeNetDev(bridgeName)
Expand Down

0 comments on commit 3552773

Please sign in to comment.