复制服务未更新

时间:2018-09-10 14:37:47

标签: docker docker-swarm

我有一个已配置为具有3个副本(在3个节点的群集中)的服务。当需要将服务更新到新版本时,我运行以下命令:

docker stack deploy -c docker-compose.yml authentication

我还尝试使用以下方法强制进行更新:

 docker service update --force authentication_authentication

一个实例将被更新,其他实例将保持相同版本。上面的update命令永远挂在这里:

overall progress: 1 out of 3 tasks 
1/3: running   [==================================================>] 
2/3:   
3/3:   

在docker的systemd日志中,我看到以下条目:

Sep 10 10:24:28 docker01 dockerd[1478]: time="2018-09-10T10:24:28.910584651-04:00" level=warning msg="rmServiceBinding 489e7143d27eaa4e4210b080f77b60018a033b29a291599d63def87fb0bed903 possible transient state ok:false entries:0 set:false "
Sep 10 10:24:28 docker01 dockerd[1478]: time="2018-09-10T10:24:28.911078594-04:00" level=warning msg="rmServiceBinding fa961a79dc139cfcc31e7ae671b6305f83887d804c4ce28aaae6f7221de08021 possible transient state ok:false entries:0 set:false "

如何获得这些服务的更新?

其他详细信息:

  • Docker 18.06.0-ce
  • Ubuntu 16.04.5 LTS

docker-compose.yml:

version: "3.1"

services:
   authentication:
    image: "<private registry>/authentication:1.0.11"
    ports:
      - 8008:8008
    deploy:
      mode: replicated
      replicas: 3
      placement:
        constraints:
          - node.platform.os==linux

在docker配置文件中打开调试功能,现在在日志中反复看到它:

Sep 10 13:14:08 docker01 dockerd[1532]: time="2018-09-10T13:14:08.283136216-04:00" level=debug msg="Calling GET /v1.38/nodes"
Sep 10 13:14:08 docker01 dockerd[1532]: time="2018-09-10T13:14:08.487369825-04:00" level=debug msg="Calling GET /v1.38/services/authentication_authentication?insertDefaults=false"
Sep 10 13:14:08 docker01 dockerd[1532]: time="2018-09-10T13:14:08.488713081-04:00" level=debug msg="error handling rpc" error="rpc error: code = NotFound desc = service authentication_authentication not found" rpc=/docker.swarmkit.v1.Control/GetService
Sep 10 13:14:08 docker01 dockerd[1532]: time="2018-09-10T13:14:08.492766895-04:00" level=debug msg="Calling GET /v1.38/tasks?filters=%7B%22_up-to-date%22%3A%7B%22true%22%3Atrue%7D%2C%22service%22%3A%7B%22authentication_authentication%22%3Atrue%7D%7D"
Sep 10 13:14:08 docker01 dockerd[1532]: time="2018-09-10T13:14:08.494021275-04:00" level=debug msg="error handling rpc" error="rpc error: code = NotFound desc = service authentication_authentication not found" rpc=/docker.swarmkit.v1.Control/GetService

1 个答案:

答案 0 :(得分:1)

18.06.0-ce升级到18.06.1-ce为我解决了这个问题。