Detect cancelled allocation more cleanly
to avoid the weave script trying to parse an error message as a CIDR
This commit is contained in:
1 parent
1beaf79e47
commit
98b80c59d9
5 files changed
+26
-4
No files matched your search
+1
-1
@@ -59,7 +59,7 @@ func (g *allocate) Try(alloc *Allocator) bool {
|
||||
}
|
||||
|
||||
func (g *allocate) Cancel() {
|
||||
g.resultChan <- allocateResult{0, fmt.Errorf("Allocate request for %s cancelled", g.ident)}
|
||||
g.resultChan <- allocateResult{0, &errorCancelled{"Allocate", g.ident}}
|
||||
}
|
||||
|
||||
func (g *allocate) ForContainer(ident string) bool {
|
||||
|
||||
Reference in new issue
Block a user