docker-archive / classicswarm

Swarm Classic: a container clustering system. Not to be confused with Docker Swarm which is at https://github.com/docker/swarmkit
Apache License 2.0
5.75k stars 1.08k forks source link

Strip off node name network prefixes in endpoint configs in networking configs #2941

Closed wsong closed 5 years ago

wsong commented 5 years ago

Previously, if you specified something like:

docker run --rm \
  --net=mynode/testnet
  --network-alias=foobar \
  alpine

Swarm classic would fail because it would try to pass an endpoint config to the daemon with mynode/testnet as the network name

GordonTheTurtle commented 5 years ago

Please sign your commits following these rules: https://github.com/moby/moby/blob/master/CONTRIBUTING.md#sign-your-work The easiest way to do this is to amend the last commit:

$ git clone -b "fix_endpoints_config2" git@github.com:wsong/swarm.git somewhere
$ cd somewhere
$ git commit --amend -s --no-edit
$ git push -f

Amending updates the existing PR. You DO NOT need to open a new one.

dperny commented 5 years ago

OK yes that makes sense.

I feel like the CI should not be failing on every single version, though.

wsong commented 5 years ago

@dperny and I looked at the failures and it looks like most of the failures are actually from DinD failing to start. Not sure what's going on there but it seems clearly unrelated to this PR.

dperny commented 5 years ago

ok, that's good enough for me. i don't have write permissions, though.

wsong commented 5 years ago

Okay, I refactored this so that we check the list of node names and make sure that the part we're stripping off is the name of a node. PTAL

thaJeztah commented 5 years ago

17.06 is green now; let's merge