Commit Graph

4 Commits

Author SHA1 Message Date
Alessandro Boch 3bf164e48d Do not panic on redundant UpdateAttachment
Signed-off-by: Alessandro Boch <aboch@docker.com>
2017-03-27 08:52:03 -07:00
Vincent Demeester 250e05e427
Add a lockedManagerAction method to Cluster…
… in order to remove duplication.
Each time we update a cluster object, we do some common
operations (lock, verify it's on a manager, get the request context,
and the update). This introduce a method and refactor few
update/remove method that allows to duplicate less code.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-02-28 11:12:11 +01:00
Alessandro Boch 91820b6941 Release the network attachment on allocation failure
- otherwise the attachment task will stay in store and
  consume IP addresses and there is no way to remove it.

Signed-off-by: Alessandro Boch <aboch@docker.com>
2017-02-16 05:21:06 -08:00
allencloud 4f4151bba4 create a new file networks.go and move network part codes from cluster.go into networks.go
Signed-off-by: allencloud <allen.sun@daocloud.io>
2017-02-12 02:50:17 +08:00