From f2aefa4f7f3e9453feb66afcd74ddef01add0286 Mon Sep 17 00:00:00 2001 From: Madhu Venugopal Date: Fri, 8 Jul 2016 18:00:41 -0700 Subject: [PATCH] swarmkit expects network-id for as target For any operation that involves netwoks (other than network create), swarmkit expects the target as network-id. Service upate was using network-name as the target and that caused the issue. Signed-off-by: Madhu Venugopal Upstream-commit: b32cfb32a3f654f27bc9d4356b36c6a7e5e53b21 Component: engine --- components/engine/daemon/cluster/cluster.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/components/engine/daemon/cluster/cluster.go b/components/engine/daemon/cluster/cluster.go index 46e2419b05..8042d2c7fa 100644 --- a/components/engine/daemon/cluster/cluster.go +++ b/components/engine/daemon/cluster/cluster.go @@ -725,6 +725,13 @@ func (c *Cluster) UpdateService(serviceID string, version uint64, spec types.Ser return c.errNoManager() } + ctx := c.getRequestContext() + + err := populateNetworkID(ctx, c.client, &spec) + if err != nil { + return err + } + serviceSpec, err := convert.ServiceSpecToGRPC(spec) if err != nil { return err