diff --git a/circle.yml b/circle.yml index eb81a722..f5d2c147 100644 --- a/circle.yml +++ b/circle.yml @@ -62,17 +62,17 @@ deployment: - docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS - cd $SRCDIR; make clean-bin - cd $SRCDIR; make publish - - go get github.com/weaveworks/wordepress && cd /home/ubuntu/src/github.com/weaveworks/wordepress && git checkout master && cd cmd/wordepress && go get + - go get github.com/weaveworks/wordepress && cd /home/ubuntu/src/github.com/weaveworks/wordepress && git checkout v1.0.0 && cd cmd/wordepress && go get - cd $SRCDIR; bin/publish-site "$WP_DEV_URL" "$WP_DEV_USER" "$WP_DEV_PASSWORD" issues: branch: /issues\/.*/ owner: weaveworks commands: - - go get github.com/weaveworks/wordepress && cd /home/ubuntu/src/github.com/weaveworks/wordepress && git checkout master && cd cmd/wordepress && go get + - go get github.com/weaveworks/wordepress && cd /home/ubuntu/src/github.com/weaveworks/wordepress && git checkout v1.0.0 && cd cmd/wordepress && go get - cd $SRCDIR; bin/publish-site "$WP_DEV_URL" "$WP_DEV_USER" "$WP_DEV_PASSWORD" release: branch: /[0-9]+\.[0-9]+/ owner: weaveworks commands: - - go get github.com/weaveworks/wordepress && cd /home/ubuntu/src/github.com/weaveworks/wordepress && git checkout v0.1.0 && cd cmd/wordepress && go get + - go get github.com/weaveworks/wordepress && cd /home/ubuntu/src/github.com/weaveworks/wordepress && git checkout v1.0.0 && cd cmd/wordepress && go get - cd $SRCDIR; bin/publish-site "$WP_LIVE_URL" "$WP_LIVE_USER" "$WP_LIVE_PASSWORD" diff --git a/ipam/claim.go b/ipam/claim.go index 467a182e..9869bc8a 100644 --- a/ipam/claim.go +++ b/ipam/claim.go @@ -72,14 +72,14 @@ func (c *claim) Try(alloc *Allocator) bool { return false } + if c.ident == "_" { // Special "I don't have a unique ID" identifier + c.ident = c.cidr.Addr.String() + } // We are the owner, check we haven't given it to another container switch existingIdent := alloc.findOwner(c.cidr.Addr); existingIdent { case "": if err := alloc.space.Claim(c.cidr.Addr); err == nil { alloc.debugln("Claimed", c.cidr, "for", c.ident) - if c.ident == "_" { // Special "I don't have a unique ID" identifier - c.ident = c.cidr.String() - } alloc.addOwned(c.ident, c.cidr, c.isContainer) c.sendResult(nil) } else { @@ -89,7 +89,7 @@ func (c *claim) Try(alloc *Allocator) bool { // same identifier is claiming same address; that's OK alloc.debugln("Re-Claimed", c.cidr, "for", c.ident) c.sendResult(nil) - case c.cidr.String(): + case c.cidr.Addr.String(): // Address already allocated via "_" name c.sendResult(fmt.Errorf("address %s already in use", c.cidr)) default: