Skip to content

Conversation

hannseman
Copy link
Contributor

@hannseman hannseman commented Mar 31, 2019

This PR adds support for setting the swarm DataPathAddr by the argument data_path_addr when initialising and joining a swarm. The reason why the integration tests do not check for DataPathAddr is because it isn't returned on inspect. See moby/moby#33938

I also added a test to get some coverage on join_swarm as I couldn't find any tests for this.

See:
https://docs.docker.com/engine/api/v1.39/#operation/SwarmInit
https://docs.docker.com/engine/reference/commandline/swarm_init/

@hannseman hannseman force-pushed the swarm-DataPathAddr branch from 77323c4 to 4347bb9 Compare March 31, 2019 21:32
@shin-
Copy link
Contributor

shin- commented Apr 1, 2019

Thanks!

Not a full review, but why is DataPathAddr becoming data_addr_path instead of the more intuitive data_path_addr?

@hannseman
Copy link
Contributor Author

hannseman commented Apr 1, 2019

@shin- haha wow, I don't know how I ended up getting that messed up. data_path_addr absolutely makes more sense.

Fixed now. Thanks for the correction.

@hannseman hannseman force-pushed the swarm-DataPathAddr branch from 4347bb9 to 8c25e52 Compare April 1, 2019 18:33
Copy link
Contributor

@shin- shin- left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Overall LGTM, just a couple things on the tests side.

@hannseman hannseman force-pushed the swarm-DataPathAddr branch 2 times, most recently from 51544fb to 16996b0 Compare April 15, 2019 08:16
@hannseman hannseman closed this Apr 15, 2019
@hannseman hannseman reopened this Apr 15, 2019
@hannseman
Copy link
Contributor Author

Not really sure why the Jenkins build keeps failing. Can't seem to find the cause by looking at the build logs.

@shin-
Copy link
Contributor

shin- commented Apr 17, 2019

Not really sure why the Jenkins build keeps failing. Can't seem to find the cause by looking at the build logs.

The job that was building new versions of the dockerswarm/dind image isn't detecting new versions anymore, causing our integration tests to fail when attempting to use the missing dockerswarm/dind:19.03.0 image :(

@shin-
Copy link
Contributor

shin- commented May 1, 2019

@hannseman CI issues should be fixed now, can you rebase against current master? Thanks!

hannseman added 2 commits May 1, 2019 10:24
Signed-off-by: Hannes Ljungberg <hannes@5monkeys.se>
Signed-off-by: Hannes Ljungberg <hannes@5monkeys.se>
@hannseman hannseman force-pushed the swarm-DataPathAddr branch from 16996b0 to 110c676 Compare May 1, 2019 08:25
@hannseman
Copy link
Contributor Author

@shin- sweet! I've rebased my PR:s but this one and #2295 seems to be failing on:
tests/integration/api_container_test.py::RestartContainerTest::test_restart_with_low_timeout

10:33:43 ______________ RestartContainerTest.test_restart_with_low_timeout ______________
10:33:43 tests/integration/api_container_test.py:1167: in test_restart_with_low_timeout
10:33:43     self.client.restart(container, timeout=3)
10:33:43 docker/utils/decorators.py:19: in wrapped
10:33:43     return f(self, resource_id, *args, **kwargs)
10:33:43 docker/api/container.py:1052: in restart
10:33:43     res = self._post(url, params=params, timeout=conn_timeout)
10:33:43 docker/utils/decorators.py:46: in inner
10:33:43     return f(self, *args, **kwargs)
10:33:43 docker/api/client.py:226: in _post
10:33:43     return self.post(url, **self._set_request_timeout(kwargs))
10:33:43 /usr/local/lib/python2.7/site-packages/requests/sessions.py:572: in post
10:33:43     return self.request('POST', url, data=data, json=json, **kwargs)
10:33:43 /usr/local/lib/python2.7/site-packages/requests/sessions.py:524: in request
10:33:43     resp = self.send(prep, **send_kwargs)
10:33:43 /usr/local/lib/python2.7/site-packages/requests/sessions.py:637: in send
10:33:43     r = adapter.send(request, **kwargs)
10:33:43 /usr/local/lib/python2.7/site-packages/requests/adapters.py:529: in send
10:33:43     raise ReadTimeout(e, request=request)
10:33:43 E   ReadTimeout: HTTPConnectionPool(host='dpy-dind-6-0-py2.7-19.03.0-beta3', port=2375): Read timed out. (read timeout=4)

@shin-
Copy link
Contributor

shin- commented May 1, 2019

Thanks!

And yep, I'm still addressing a bunch of flakes, hopefully to get us in a state where those are rare-to-nonexistent again. The particular one you mentioned was just addressed in 1a4881a

Copy link
Contributor

@shin- shin- left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯 Thanks!

@shin- shin- merged commit 9682422 into docker:master May 1, 2019
@shin- shin- added this to the 4.0.0 milestone May 1, 2019
@hannseman
Copy link
Contributor Author

@shin- thanks for the review!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants