[openstack-dev] [Magnum][Kuryr] Help with using docker-python client in gate
Egor Guz
EGuz at walmartlabs.com
Thu Dec 17 18:07:27 UTC 2015
Gal,
I think you need to setup your Docker environment to allow run cli without sudo permission (https://docs.docker.com/engine/installation/ubuntulinux/).
Or use tcp socket instead (https://docs.docker.com/v1.8/articles/basics/), Magnum/Swarm/docker-machine uses this approach all the time.
—
Egor
On Dec 17, 2015, at 07:53, Gal Sagie <gal.sagie at gmail.com<mailto:gal.sagie at gmail.com>> wrote:
Hello Everyone,
We are trying to add some gate testing for Kuryr and hopefully convert these also to Rally
plugins.
What i am facing in the gate right now is this:
I configure the docker client:
self.docker_client = docker.Client(
base_url='unix://var/run/docker.sock')
And call this:
self.docker_client.create_network(name='fakenet', driver='kuryr')
This works locally, and i also tried to run this code with a different user
But on the gate this fails:
http://logs.openstack.org/79/258379/5/check/gate-kuryr-dsvm-fullstack-nv/f46ebdb/
2-17 05:22:16.900<http://logs.openstack.org/79/258379/5/check/gate-kuryr-dsvm-fullstack-nv/f46ebdb/console.html#_2015-12-17_05_22_16_900> | 2015-12-17 05:22:16.851 |
2015-12-17 05:22:16.902<http://logs.openstack.org/79/258379/5/check/gate-kuryr-dsvm-fullstack-nv/f46ebdb/console.html#_2015-12-17_05_22_16_902> | 2015-12-17 05:22:16.852 | {0} kuryr.tests.fullstack.test_network.NetworkTest.test_create_delete_network [0.093287s] ... FAILED
2015-12-17 05:22:16.934<http://logs.openstack.org/79/258379/5/check/gate-kuryr-dsvm-fullstack-nv/f46ebdb/console.html#_2015-12-17_05_22_16_934> | 2015-12-17 05:22:16.854 |
2015-12-17 05:22:16.935<http://logs.openstack.org/79/258379/5/check/gate-kuryr-dsvm-fullstack-nv/f46ebdb/console.html#_2015-12-17_05_22_16_935> | 2015-12-17 05:22:16.855 | Captured traceback:
2015-12-17 05:22:16.935<http://logs.openstack.org/79/258379/5/check/gate-kuryr-dsvm-fullstack-nv/f46ebdb/console.html#_2015-12-17_05_22_16_935> | 2015-12-17 05:22:16.856 | ~~~~~~~~~~~~~~~~~~~
2015-12-17 05:22:16.935<http://logs.openstack.org/79/258379/5/check/gate-kuryr-dsvm-fullstack-nv/f46ebdb/console.html#_2015-12-17_05_22_16_935> | 2015-12-17 05:22:16.857 | Traceback (most recent call last):
2015-12-17 05:22:16.935<http://logs.openstack.org/79/258379/5/check/gate-kuryr-dsvm-fullstack-nv/f46ebdb/console.html#_2015-12-17_05_22_16_935> | 2015-12-17 05:22:16.859 | File "kuryr/tests/fullstack/test_network.py", line 27, in test_create_delete_network
2015-12-17 05:22:16.936<http://logs.openstack.org/79/258379/5/check/gate-kuryr-dsvm-fullstack-nv/f46ebdb/console.html#_2015-12-17_05_22_16_936> | 2015-12-17 05:22:16.860 | self.docker_client.create_network(name='fakenet', driver='kuryr')
2015-12-17 05:22:16.936<http://logs.openstack.org/79/258379/5/check/gate-kuryr-dsvm-fullstack-nv/f46ebdb/console.html#_2015-12-17_05_22_16_936> | 2015-12-17 05:22:16.861 | File "/opt/stack/new/kuryr/.tox/fullstack/local/lib/python2.7/site-packages/docker/utils/decorators.py", line 35, in wrapper
2015-12-17 05:22:16.936<http://logs.openstack.org/79/258379/5/check/gate-kuryr-dsvm-fullstack-nv/f46ebdb/console.html#_2015-12-17_05_22_16_936> | 2015-12-17 05:22:16.862 | return f(self, *args, **kwargs)
2015-12-17 05:22:16.936<http://logs.openstack.org/79/258379/5/check/gate-kuryr-dsvm-fullstack-nv/f46ebdb/console.html#_2015-12-17_05_22_16_936> | 2015-12-17 05:22:16.864 | File "/opt/stack/new/kuryr/.tox/fullstack/local/lib/python2.7/site-packages/docker/api/network.py", line 28, in create_network
2015-12-17 05:22:16.936<http://logs.openstack.org/79/258379/5/check/gate-kuryr-dsvm-fullstack-nv/f46ebdb/console.html#_2015-12-17_05_22_16_936> | 2015-12-17 05:22:16.865 | res = self._post_json(url, data=data)
2015-12-17 05:22:16.937<http://logs.openstack.org/79/258379/5/check/gate-kuryr-dsvm-fullstack-nv/f46ebdb/console.html#_2015-12-17_05_22_16_937> | 2015-12-17 05:22:16.866 | File "/opt/stack/new/kuryr/.tox/fullstack/local/lib/python2.7/site-packages/docker/client.py", line 166, in _post_json
2015-12-17 05:22:16.937<http://logs.openstack.org/79/258379/5/check/gate-kuryr-dsvm-fullstack-nv/f46ebdb/console.html#_2015-12-17_05_22_16_937> | 2015-12-17 05:22:16.867 | return self._post(url, data=json.dumps(data2), **kwargs)
2015-12-17 05:22:16.937<http://logs.openstack.org/79/258379/5/check/gate-kuryr-dsvm-fullstack-nv/f46ebdb/console.html#_2015-12-17_05_22_16_937> | 2015-12-17 05:22:16.870 | File "/opt/stack/new/kuryr/.tox/fullstack/local/lib/python2.7/site-packages/docker/client.py", line 107, in _post
2015-12-17 05:22:16.937<http://logs.openstack.org/79/258379/5/check/gate-kuryr-dsvm-fullstack-nv/f46ebdb/console.html#_2015-12-17_05_22_16_937> | 2015-12-17 05:22:16.871 | return self.post(url, **self._set_request_timeout(kwargs))
2015-12-17 05:22:16.937<http://logs.openstack.org/79/258379/5/check/gate-kuryr-dsvm-fullstack-nv/f46ebdb/console.html#_2015-12-17_05_22_16_937> | 2015-12-17 05:22:16.873 | File "/opt/stack/new/kuryr/.tox/fullstack/local/lib/python2.7/site-packages/requests/sessions.py", line 511, in post
2015-12-17 05:22:16.937<http://logs.openstack.org/79/258379/5/check/gate-kuryr-dsvm-fullstack-nv/f46ebdb/console.html#_2015-12-17_05_22_16_937> | 2015-12-17 05:22:16.874 | return self.request('POST', url, data=data, json=json, **kwargs)
2015-12-17 05:22:16.938<http://logs.openstack.org/79/258379/5/check/gate-kuryr-dsvm-fullstack-nv/f46ebdb/console.html#_2015-12-17_05_22_16_938> | 2015-12-17 05:22:16.876 | File "/opt/stack/new/kuryr/.tox/fullstack/local/lib/python2.7/site-packages/requests/sessions.py", line 468, in request
2015-12-17 05:22:16.938<http://logs.openstack.org/79/258379/5/check/gate-kuryr-dsvm-fullstack-nv/f46ebdb/console.html#_2015-12-17_05_22_16_938> | 2015-12-17 05:22:16.877 | resp = self.send(prep, **send_kwargs)
2015-12-17 05:22:16.938<http://logs.openstack.org/79/258379/5/check/gate-kuryr-dsvm-fullstack-nv/f46ebdb/console.html#_2015-12-17_05_22_16_938> | 2015-12-17 05:22:16.878 | File "/opt/stack/new/kuryr/.tox/fullstack/local/lib/python2.7/site-packages/requests/sessions.py", line 576, in send
2015-12-17 05:22:16.938<http://logs.openstack.org/79/258379/5/check/gate-kuryr-dsvm-fullstack-nv/f46ebdb/console.html#_2015-12-17_05_22_16_938> | 2015-12-17 05:22:16.880 | r = adapter.send(request, **kwargs)
2015-12-17 05:22:16.938<http://logs.openstack.org/79/258379/5/check/gate-kuryr-dsvm-fullstack-nv/f46ebdb/console.html#_2015-12-17_05_22_16_938> | 2015-12-17 05:22:16.881 | File "/opt/stack/new/kuryr/.tox/fullstack/local/lib/python2.7/site-packages/requests/adapters.py", line 426, in send
2015-12-17 05:22:16.938<http://logs.openstack.org/79/258379/5/check/gate-kuryr-dsvm-fullstack-nv/f46ebdb/console.html#_2015-12-17_05_22_16_938> | 2015-12-17 05:22:16.882 | raise ConnectionError(err, request=request)
2015-12-17 05:22:16.939<http://logs.openstack.org/79/258379/5/check/gate-kuryr-dsvm-fullstack-nv/f46ebdb/console.html#_2015-12-17_05_22_16_939> | 2015-12-17 05:22:16.883 | requests.exceptions.ConnectionError: ('Connection aborted.', error(13, 'Permission denied'))
Anyone might have any clue how to get this to work? :)
Thanks
Gal.
__________________________________________________________________________
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: OpenStack-dev-request at lists.openstack.org<mailto:OpenStack-dev-request at lists.openstack.org>?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
More information about the OpenStack-dev
mailing list