+
Skip to content

"check swarm status" only works on manager node #80

@guillomovitch

Description

@guillomovitch

check_swarm status checking is implemented by requesting http:/swarm URL, whereas this seems to works only on manager nodes:
$> curl --unix-socket /var/run/docker.sock http:/swarm
{"message":"This node is not a swarm manager. Worker nodes can't be used to view or modify cluster state. Please run this command on a manager node or promote the current node to a manager."}

Parsing http:/info result seems a more portable option.

I checked it with docker versions 19.03.14 and 20.10.7.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载