瀏覽代碼

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 <madhu@docker.com>
Madhu Venugopal 9 年之前
父節點
當前提交
b32cfb32a3
共有 1 個文件被更改,包括 7 次插入0 次删除
  1. 7 0
      daemon/cluster/cluster.go

+ 7 - 0
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