[users at bb.net] Twisted issue or?

Francesco Di Mizio francescodimizio at gmail.com
Fri Mar 24 13:19:02 UTC 2017


Hey Pierre,

thanks for answering. I am trying to create a minimal config showing the
error. Meanwhile here's my full config:

FROM ubuntu:15.10
MAINTAINER Francesco <>
LABEL image_name="master"
LABEL description="test"

RUN apt-get update && apt-get install -y python \
        python-dev\
         curl\
         sudo\
         python-virtualenv\
        python-pip\
        sqlite\
        wget\
        python-psycopg2\
        libmysqlclient-dev

RUN pip install pyvmomi \
    mysql-python \
    six==1.10.0 \
    statprof \
    service_identity \
    twisted==15.5.0 \
    "buildbot[bundle]==0.9.3" \
    buildbot_profiler \
    psutil

RUN mkdir -p /buildbot/master

RUN useradd -m -d /buildbot/master -p sa1aY64JOY94w buildbot
RUN useradd -G adm ubuntu
RUN chown -R buildbot:buildbot buildbot


EXPOSE :8050
EXPOSE 9989

USER buildbot

RUN cd /buildbot && buildbot create-master master
WORKDIR /buildbot/master


RUN usermod -d /buildbot/master buildbot
RUN mv /buildbot/master/master.cfg.sample /buildbot/master/master.cfg


#ENTRYPOINT ["/buildbot/master/start.sh"]
# Keep the following line should we need it
# CMD twistd --savestats -n --profiler=cprofile
 --profile=/profiling/profile.stats -y ./buildbot.tac
CMD twistd -n -y ./buildbot.tac


where start.sh is simply:

#!/bin/bash
buildbot upgrade-master /buildbot/master
echo "$@"
exec "$@"


As for the buildsteps messing with env, it's just not possible as bbot
doesnt even start.
As far as I am aware this docker file used to work until recently. My live
env is in fact still running it...


On Thu, Mar 23, 2017 at 1:26 PM, Pierre Tardy <tardyp at gmail.com> wrote:

> Twisted does not upgrade itself, but there might be in your dockerfile
> some of the command which does.
> - is there a pip install -U somewhere?
> - Is there some worker build or master shell command running some pip
> later in the build, which could overwrite twisted in the middle of buildbot
> running? If so, you should separate the virtualenv of the master/worker,
> and the virtualenv of your builds
>
> It will be really hard to help without the full dockerfile, or a simplify
> dockerfile reproducing the problem
>
> Regards
> Pierre
>
>
>
> On Wed, Mar 22, 2017 at 11:50 AM Francesco Di Mizio <
> francescodimizio at gmail.com> wrote:
>
>> Hey,
>>
>> found myself in a strange situation. I do run custom schedulers that
>> require me to hardcode the twisted version that gets installed in my bbot
>> server container.
>>
>> RUN pip install pyvmomi \
>>     bla bla .... \
>>     twisted==15.5.0 \
>>     "buildbot[bundle]==0.9.3"
>>
>> Now somehow I am failing to start it with
>>
>>  File "/usr/local/bin/twistd", line 17, in <module>
>>     from twisted.scripts.twistd import run
>>   File "/buildbot/master/.local/lib/python2.7/site-packages/twisted/scripts/twistd.py",
>> line 13, in <module>
>>     from twisted.application import app
>>   File "/buildbot/master/.local/lib/python2.7/site-packages/twisted/application/app.py",
>> line 17, in <module>
>>     from twisted import copyright, plugin, logger
>>   File "/buildbot/master/.local/lib/python2.7/site-packages/twisted/plugin.py",
>> line 35, in <module>
>>     from twisted.python import log
>>   File "/buildbot/master/.local/lib/python2.7/site-packages/twisted/python/log.py",
>> line 26, in <module>
>>     from twisted.logger import (
>>   File "/buildbot/master/.local/lib/python2.7/site-packages/twisted/logger/__init__.py",
>> line 89, in <module>
>>     from ._levels import InvalidLogLevelError, LogLevel
>>   File "/buildbot/master/.local/lib/python2.7/site-packages/twisted/logger/_levels.py",
>> line 9, in <module>
>>     from constantly import NamedConstant, Names
>>
>> Now constantly doesnt exist in the container and never did because in
>> fact I never needed it.
>>
>> It looks like that twisted code being run is not 15.5 I've installed but
>> a newer version. In particular the following line:
>>
>> from constantly import NamedConstant, Names
>>
>> was different in 15.5. As a matter of fact
>>
>> cat /usr/local/lib/python2.7/dist-packages/twisted/logger/_levels.py |
>> more
>> ....
>> from twisted.python.constants import NamedConstant, Names
>>
>>
>> So where the hell is /buildbot/master/.local/lib/python2.7/site-packages/twisted/logger/_levels.py
>> coming from? Is twisted auto downloading/extracting latest Twisted itself
>> in that folder?
>>
>> Thanks for hte help!
>>
>> Francesco
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> users mailing list
>> users at buildbot.net
>> https://lists.buildbot.net/mailman/listinfo/users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.buildbot.net/pipermail/users/attachments/20170324/74659e66/attachment.html>


More information about the users mailing list