使用 docker 的编织网络驱动程序插件配置多个网络时出错

Error in configuring multiple networks using weave network driver plugin for docker

我正在浏览一篇文章 weave net driver 并且正在尝试着手研究它。我能够使用默认的 weavemesh 驱动程序在单个主机上进行容器到容器的通信。当我尝试使用 weave 网络驱动程序插件创建多个网络时出现问题。我收到以下错误。

[ankit@local-machine]$ docker network create -d weave netA
Error response from daemon: failed to parse pool request for address space "GlobalDefault" pool "" subpool "": cannot find address space GlobalDefault (most likely the backing datastore is not configured)

现在,正如我从 Getting Started with Docker Multi-host Networking 的 docker 文档中了解到的那样,它需要配置一个键值存储。我想知道我的理解是否正确?有什么方法可以在 weave 网络上创建多个网络来实现网络隔离。我希望能够在同一个盒子上将一个容器的网络流量与另一个容器 运行 隔离。

最近有一个新的 weave 1.4 plugin docker networking without cluster store plugin 公告说它支持 docker 没有外部集群存储的网络。它是如何工作的。目前还不清楚它是否可以用于在 weave.

上创建多个网络

This issue 问:

Did you start the docker daemon with --cluster-store?

You need to pass peers ips to weave launch-router $peers when starting docker with --cluster-store and --cluster-advertise.

文档提到:

The Weave plugin actually provides two network drivers to Docker

  • one named weavemesh that can operate without a cluster store and
  • one named weave that can only work with one (like Docker’s overlay driver).

因此需要先Set up a key-value store

如果您使用的是weave插件,那么您的理解是正确的。

PR 1738 has more on the new weave 1.4+ ability to operate without a keystore with the weavemesh driver. Its doc does mention:

If you do create additional networks using the weavemesh driver, containers attached to them will be able to communicate with containers attached to weave; there is no isolation between those networks.

但是PR 1742仍然开放"Allow user to specify a subnet range for each docker host"。