我正在尝试在buildbot工作中使DockerLatentWorker。但到目前为止,buildbot总是被困在准备工作阶段几个小时。 这是终端上的输出
2017-06-09 14:16:55+0000 [-] starting build <Build runtests number:None results:success> using worker <LatentWorkerForBuilder builder=u'runtests' worker=u'example-worker' state=AVAILABLE>
2017-06-09 14:16:55+0000 [-] <Build runtests number:None results:success>.startBuild
2017-06-09 14:16:57+0000 [-] acquireLocks(worker <DockerLatentWorker u'example-worker'>, locks [])
2017-06-09 14:16:57+0000 [-] substantiating worker <LatentWorkerForBuilder builder=u'runtests' worker=u'example-worker' state=DETACHED>
2017-06-09 14:16:58+0000 [-] Container created, Id: b6eb4d...
2017-06-09 14:16:58+0000 [-] Container started
对于master我修改了https://hub.docker.com/r/buildbot/buildbot-master/~/dockerfile/这个dockerfile来添加docker-py依赖。
我使用buildbot 0.9.7和Docker版本17.03.1-ce,构建c6d412e。
这是我的master.cfg文件(它的片段)
from buildbot.plugins import *
c = BuildmasterConfig = {}
####### WORKERS
c['workers'] = [
worker.DockerLatentWorker('example-worker', 'password',
docker_host='tcp://10.29.21.172:2375',
image='buildbot/buildbot-worker:master')
]
c['protocols'] = {'pb': {'port': 9989}}
####### CHANGESOURCES
c['change_source'] = []
c['change_source'].append(changes.GitPoller(
'git://github.com/buildbot/pyflakes.git',
workdir='gitpoller-workdir', branch='master',
pollinterval=300))
####### SCHEDULERS
c['schedulers'] = []
c['schedulers'].append(schedulers.SingleBranchScheduler(
name="all",
change_filter=util.ChangeFilter(branch='master'),
treeStableTimer=None,
builderNames=["runtests"]))
c['schedulers'].append(schedulers.ForceScheduler(
name="force",
builderNames=["runtests"]))
c['builders'] = []
c['builders'].append(
util.BuilderConfig(name="runtests",
workernames=["example-worker"],
factory=factory))
####### PROJECT IDENTITY
c['title'] = "Pyflakes"
c['titleURL'] = "https://launchpad.net/pyflakes"
c['buildbotURL'] = "http://localhost:8010/"
c['www'] = dict(port=8010,
plugins=dict(waterfall_view={}, console_view={}))
####### DB URL
c['db'] = {
'db_url' : "sqlite:///state.sqlite",
}
我已经将我的Docker守护进程配置为侦听tcp://0.0.0.0:2375,并且还拉出了buildbot / buildbot-worker:master映像。
以下是Buildbot的截图
我无法弄清楚问题所在。
答案 0 :(得分:1)
只要系统上存在泊坞窗图像,泊坞窗准备工作就需要几百毫秒。 无需等待数小时。 解码器工作人员无法启动的原因有很多。
你可以使用DockerLatentWorker调试参数followStartupLogs = True来让master在twisted.log中显示worker的日志