moby / swarmkit

A toolkit for orchestrating distributed systems at any scale. It includes primitives for node discovery, raft-based consensus, task scheduling and more.
Apache License 2.0
3.36k stars 616 forks source link

node crashes when promoted and no listen-addr is provided #867

Open diogomonica opened 8 years ago

diogomonica commented 8 years ago
➜  swarmd node -l debug -d /tmp/swarm-node3 --join-addr 0.0.0.0:4242
...
sha256:4d32bf566ad1a00bcdbaed7c047c704d2f77d32e4477
INFO[0083] Downloaded new TLS credentials with role: swarm-worker.
DEBU[0083] (*Agent).run exited
Error: failed to create socket directory: mkdir /var/run/docker: permission denied
aluzzardi commented 8 years ago

/cc @tonistiigi @LK4D4

tonistiigi commented 8 years ago

Maybe we should not allow promotion on nodes that didn't provide advertise address. Writing some kind of retry mechanism there doesn't make sense because this will always be unrecoverable.

diogomonica commented 8 years ago

Agreed. We should also verify that a return address is valid when on join.

aaronlehmann commented 8 years ago

988 should address problems that arise from not providing a listen address through the API.

But I don't think that's what's happening here. In swarmd, the listen address should default to 0.0.0.0:4242. The problem I see reported in the log is a permissions issue with the state directory.

abronan commented 8 years ago

Can this one be closed? This is most likely fixed now and the original error seems unrelated.

tonistiigi commented 8 years ago

This is only fixed in a way that default control socket is now relative to working dir and docker always runs as root. There is still no way for the node to check if it is capable of promotion of cluster to check is node can be promoted.

olljanat commented 6 years ago

@diogomonica I just going through old issues here.

Is this one still valid or can we close it?