mirror of https://github.com/docker/docs.git
add error message
Signed-off-by: Victor Vieux <vieux@docker.com>
This commit is contained in:
parent
de66ff37d5
commit
c41d73dd50
|
@ -142,6 +142,11 @@ func (n *node) updateSpecs() error {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if info.NCPU == 0 || info.MemTotal == 0 {
|
||||||
|
return fmt.Errorf("cannot get resources for this node, make sure %s is a Docker Engine, not a Swarm manager", n.addr)
|
||||||
|
}
|
||||||
|
|
||||||
// Older versions of Docker don't expose the ID field and are not supported
|
// Older versions of Docker don't expose the ID field and are not supported
|
||||||
// by Swarm. Catch the error ASAP and refuse to connect.
|
// by Swarm. Catch the error ASAP and refuse to connect.
|
||||||
if len(info.ID) == 0 {
|
if len(info.ID) == 0 {
|
||||||
|
|
Loading…
Reference in New Issue