简体   繁体   English

服务更新后Hyperledger对等方不在Docker群中

[英]Hyperledger peer not in docker swarm after service update

I have a Hyperledger Fabric network running with Docker swarm. 我有一个运行Docker群的Hyperledger Fabric网络。 I want to test Fabric by taking some peers down and see if the network still functions. 我想通过减少一些对等设备来测试Fabric,并查看网络是否仍然运行。

When the network is running I stop/start a peer container. 网络运行时,我停止/启动一个对等容器。 Then I use the 'docker service update $peer-service --force' command to see if it goes back to being a service. 然后,我使用“ docker service update $ peer-service --force”命令来查看它是否回到了服务状态。 Docker then makes a different new container and adds it to the service. Docker然后创建一个不同的新容器并将其添加到服务中。

The new container has not joined the channel and has no chaincode installed on it. 新容器尚未加入通道,并且没有安装链码。 The first container still exist but is not part of the swarm anymore. 第一个容器仍然存在,但不再是群集的一部分。 I think it will be very inconvenient to manually install everything on a peer when it goes down on an already running network with many chainscodes. 我认为,如果在已运行的具有许多chaincodes的网络上出现故障的同位体上发生故障,在同位体上手动安装所有内容将非常不便。

Is there a way to join the old peer container back as the same service to the swarm? 有没有一种方法可以将旧的对等容器作为相同的服务重新加入群集?

You need to use volumes so that the block/channel data persists. 您需要使用卷,以便块/通道数据持久存在。 So map the directory in the peer container that contains this information to a directory on your host machine. 因此,将包含此信息的对等容器中的目录映射到主机上的目录。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM