欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

Error response from daemon: rpc error: code = FailedPrecondition

程序员文章站 2022-03-12 12:27:37
...

删除docker swarm下的节点报错:
Error response from daemon: rpc error: code = FailedPrecondition desc = node y2qsyjdbfmm4tjwh4p9wqlmq1 is not down and can’t be removed

解决(需要把active状态的节点修改掉):

[[email protected] ~]$ docker node ls
ID                            HOSTNAME            STATUS              AVAILABILITY        MANAGER STATUS      ENGINE VERSION
875ul8zt886yee5bp115xevpe *   centos-node1        Ready               Active              Leader              19.03.5
y2qsyjdbfmm4tjwh4p9wqlmq1     centos-node2        Down                Active                                  19.03.5
[[email protected] ~]$ docker node update --help
[[email protected] ~]$ docker node update --availability drain y2qsyjdbfmm4tjwh4p9wqlmq1
[[email protected] ~]$ docker node rm y2qsyjdbfmm4tjwh4p9wqlmq1