[Buildbot] #3549: DockerLatentWorker not working

Buildbot trac trac at buildbot.net
Tue May 17 17:01:47 UTC 2016


#3549: DockerLatentWorker not working
--------------------------+--------------------
Reporter:  pranit.sirsat  |       Owner:
    Type:  defect         |      Status:  new
Priority:  major          |   Milestone:  0.9.+
 Version:  master         |  Resolution:
Keywords:  docker latent  |
--------------------------+--------------------
Changes (by dustin):

 * keywords:  DockerLatentWorker => docker latent
 * type:  undecided => defect
 * milestone:  undecided => 0.9.+


Old description:

> i am using buildbot with version 0.9.0b8. using the following docker
> version
> Client:
>  Version:      1.11.1
>  API version:  1.23
>  Go version:   go1.5.4
>  Git commit:   5604cbe
>  Built:        Tue Apr 26 23:30:23 2016
>  OS/Arch:      linux/amd64
>
> Server:
>  Version:      1.11.1
>  API version:  1.23
>  Go version:   go1.5.4
>  Git commit:   5604cbe
>  Built:        Tue Apr 26 23:30:23 2016
>  OS/Arch:      linux/amd64
>
> and using 'docker-py>=1.4'
>
> the implementation works well with the local docker (i.e. worker.Worker
> from buildbot.plugins) but when i switch to DockerLatentWorker, it gives
> following error
>
> 2016-04-26 09:33:33+0000 [-] while preparing workerforbuilder:
>         Traceback (most recent call last):
>           File "/usr/local/lib/python2.7/dist-
> packages/twisted/internet/defer.py", line 588, in _runCallbacks
>             current.result = callback(current.result, *args, **kw)
>           File "/usr/local/lib/python2.7/dist-
> packages/twisted/internet/defer.py", line 1184, in gotResult
>             _inlineCallbacks(r, g, deferred)
>           File "/usr/local/lib/python2.7/dist-
> packages/twisted/internet/defer.py", line 1126, in _inlineCallbacks
>             result = result.throwExceptionIntoGenerator(g)
>           File "/usr/local/lib/python2.7/dist-
> packages/twisted/python/failure.py", line 389, in
> throwExceptionIntoGenerator
>             return g.throw(self.type, self.value, self.tb)
>         --- <exception caught here> ---
>           File "/usr/local/lib/python2.7/dist-
> packages/buildbot/process/builder.py", line 357, in _startBuildFor
>             ready = yield workerforbuilder.prepare(self.builder_status,
> build)
>           File "/usr/local/lib/python2.7/dist-
> packages/twisted/internet/defer.py", line 1126, in _inlineCallbacks
>             result = result.throwExceptionIntoGenerator(g)
>           File "/usr/local/lib/python2.7/dist-
> packages/twisted/python/failure.py", line 389, in
> throwExceptionIntoGenerator
>             return g.throw(self.type, self.value, self.tb)
>           File "/usr/local/lib/python2.7/dist-
> packages/buildbot/worker/docker.py", line 144, in start_instance
>             res = yield threads.deferToThread(self._thd_start_instance,
> image, volumes)
>           File "/usr/local/lib/python2.7/dist-
> packages/twisted/python/threadpool.py", line 246, in inContext
>             result = inContext.theWork()
>           File "/usr/local/lib/python2.7/dist-
> packages/twisted/python/threadpool.py", line 262, in <lambda>
>             inContext.theWork = lambda: context.call(ctx, func, *args,
> **kw)
>           File "/usr/local/lib/python2.7/dist-
> packages/twisted/python/context.py", line 118, in callWithContext
>             return self.currentContext().callWithContext(ctx, func,
> *args, **kw)
>           File "/usr/local/lib/python2.7/dist-
> packages/twisted/python/context.py", line 81, in callWithContext
>             return func(*args,**kw)
>           File "/usr/local/lib/python2.7/dist-
> packages/buildbot/worker/docker.py", line 190, in _thd_start_instance
>             networking_config=self.networking_config
>           File "/usr/local/lib/python2.7/dist-
> packages/docker/api/container.py", line 120, in create_container
>             return self.create_container_from_config(config, name)
>           File "/usr/local/lib/python2.7/dist-
> packages/docker/api/container.py", line 131, in
> create_container_from_config
>             return self._result(res, True)
>           File "/usr/local/lib/python2.7/dist-packages/docker/client.py",
> line 158, in _result
>             self._raise_for_status(response)
>           File "/usr/local/lib/python2.7/dist-packages/docker/client.py",
> line 154, in _raise_for_status
>             raise errors.APIError(e, response, explanation=explanation)
>         docker.errors.APIError: 500 Server Error: Internal Server Error
> ("json: cannot unmarshal string into Go value of type
> network.NetworkingConfig")

New description:

 i am using buildbot with version 0.9.0b8. using the following docker
 version
 {{{
 Client:
  Version:      1.11.1
  API version:  1.23
  Go version:   go1.5.4
  Git commit:   5604cbe
  Built:        Tue Apr 26 23:30:23 2016
  OS/Arch:      linux/amd64

 Server:
  Version:      1.11.1
  API version:  1.23
  Go version:   go1.5.4
  Git commit:   5604cbe
  Built:        Tue Apr 26 23:30:23 2016
  OS/Arch:      linux/amd64
 }}}

 and using 'docker-py>=1.4'

 the implementation works well with the local docker (i.e. worker.Worker
 from buildbot.plugins) but when i switch to DockerLatentWorker, it gives
 following error

 {{{
 2016-04-26 09:33:33+0000 [-] while preparing workerforbuilder:
         Traceback (most recent call last):
           File "/usr/local/lib/python2.7/dist-
 packages/twisted/internet/defer.py", line 588, in _runCallbacks
             current.result = callback(current.result, *args, **kw)
           File "/usr/local/lib/python2.7/dist-
 packages/twisted/internet/defer.py", line 1184, in gotResult
             _inlineCallbacks(r, g, deferred)
           File "/usr/local/lib/python2.7/dist-
 packages/twisted/internet/defer.py", line 1126, in _inlineCallbacks
             result = result.throwExceptionIntoGenerator(g)
           File "/usr/local/lib/python2.7/dist-
 packages/twisted/python/failure.py", line 389, in
 throwExceptionIntoGenerator
             return g.throw(self.type, self.value, self.tb)
         --- <exception caught here> ---
           File "/usr/local/lib/python2.7/dist-
 packages/buildbot/process/builder.py", line 357, in _startBuildFor
             ready = yield workerforbuilder.prepare(self.builder_status,
 build)
           File "/usr/local/lib/python2.7/dist-
 packages/twisted/internet/defer.py", line 1126, in _inlineCallbacks
             result = result.throwExceptionIntoGenerator(g)
           File "/usr/local/lib/python2.7/dist-
 packages/twisted/python/failure.py", line 389, in
 throwExceptionIntoGenerator
             return g.throw(self.type, self.value, self.tb)
           File "/usr/local/lib/python2.7/dist-
 packages/buildbot/worker/docker.py", line 144, in start_instance
             res = yield threads.deferToThread(self._thd_start_instance,
 image, volumes)
           File "/usr/local/lib/python2.7/dist-
 packages/twisted/python/threadpool.py", line 246, in inContext
             result = inContext.theWork()
           File "/usr/local/lib/python2.7/dist-
 packages/twisted/python/threadpool.py", line 262, in <lambda>
             inContext.theWork = lambda: context.call(ctx, func, *args,
 **kw)
           File "/usr/local/lib/python2.7/dist-
 packages/twisted/python/context.py", line 118, in callWithContext
             return self.currentContext().callWithContext(ctx, func, *args,
 **kw)
           File "/usr/local/lib/python2.7/dist-
 packages/twisted/python/context.py", line 81, in callWithContext
             return func(*args,**kw)
           File "/usr/local/lib/python2.7/dist-
 packages/buildbot/worker/docker.py", line 190, in _thd_start_instance
             networking_config=self.networking_config
           File "/usr/local/lib/python2.7/dist-
 packages/docker/api/container.py", line 120, in create_container
             return self.create_container_from_config(config, name)
           File "/usr/local/lib/python2.7/dist-
 packages/docker/api/container.py", line 131, in
 create_container_from_config
             return self._result(res, True)
           File "/usr/local/lib/python2.7/dist-packages/docker/client.py",
 line 158, in _result
             self._raise_for_status(response)
           File "/usr/local/lib/python2.7/dist-packages/docker/client.py",
 line 154, in _raise_for_status
             raise errors.APIError(e, response, explanation=explanation)
         docker.errors.APIError: 500 Server Error: Internal Server Error
 ("json: cannot unmarshal string into Go value of type
 network.NetworkingConfig")
 }}}
 [edit: formatting]

--

--
Ticket URL: <http://trac.buildbot.net/ticket/3549#comment:1>
Buildbot <http://buildbot.net/>
Buildbot: build/test automation


More information about the bugs mailing list