deploy.py should prepend to PYTHONPATH or we get confusing errors

Bug #1287740 reported by Vincent Ladeuil
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu CI Engine
Fix Released
Critical
Vincent Ladeuil
Ubuntu CI Services
Fix Released
Critical
Vincent Ladeuil

Bug Description

$ time ./juju-deployer/deploy.py
Checking juju status
Uploading local branch to swift ...
No handlers could be found for logger "keystoneclient.httpclient"
Building charm: rabbitmq-worker
rm -fr hooks/charmhelpers build/charm-helpers ../.sourcecode
Updating source dependencies...
           build/charm-helpers: checked out r99 of lp:~charm-helpers/charm-helpers/devel
INFO:root:Loading charm helper config from charm-helpers.yaml.
INFO:root:Checking out build/charm-helpers to /tmp/tmpL0iTvC/charm-helpers.
Branched 99 revisions.
INFO:root:Syncing directory: /tmp/tmpL0iTvC/charm-helpers/charmhelpers/core -> hooks/charmhelpers/core.
INFO:root:Adding missing __init__.py: hooks/charmhelpers/__init__.py
INFO:root:Syncing directory: /tmp/tmpL0iTvC/charm-helpers/charmhelpers/fetch -> hooks/charmhelpers/fetch.
INFO:root:Syncing directory: /tmp/tmpL0iTvC/charm-helpers/charmhelpers/contrib/charmsupport -> hooks/charmhelpers/contrib/charmsupport.
INFO:root:Adding missing __init__.py: hooks/charmhelpers/contrib/__init__.py
Do not forget to commit the updated files if any.
#@cd /home/vila/ci/ubuntu-ci-services-itself/trunk/charms/precise/rabbitmq-worker/build/charm-helpers; \
  #@/usr/bin/env python setup.py install --install-purelib=/home/vila/ci/ubuntu-ci-services-itself/trunk/charms/precise/rabbitmq-worker/lib \
   #--install-scripts=/home/vila/ci/ubuntu-ci-services-itself/trunk/charms/precise/rabbitmq-worker/lib/bin
Building charm: webui
rm -fr hooks/charmhelpers build/charm-helpers files/webroot revision ../.sourcecode
Updating source dependencies...
           build/charm-helpers: checked out r99 of lp:~charm-helpers/charm-helpers/devel
INFO:root:Loading charm helper config from charm-helpers.yaml.
INFO:root:Checking out build/charm-helpers to /tmp/tmpjQ7XSZ/charm-helpers.
Branched 99 revisions.
INFO:root:Syncing directory: /tmp/tmpjQ7XSZ/charm-helpers/charmhelpers/core -> hooks/charmhelpers/core.
INFO:root:Adding missing __init__.py: hooks/charmhelpers/__init__.py
INFO:root:Syncing directory: /tmp/tmpjQ7XSZ/charm-helpers/charmhelpers/fetch -> hooks/charmhelpers/fetch.
INFO:root:Syncing directory: /tmp/tmpjQ7XSZ/charm-helpers/charmhelpers/contrib/charmsupport -> hooks/charmhelpers/contrib/charmsupport.
INFO:root:Adding missing __init__.py: hooks/charmhelpers/contrib/__init__.py
Do not forget to commit the updated files if any.
#@cd /home/vila/ci/ubuntu-ci-services-itself/trunk/charms/precise/webui/build/charm-helpers; \
  #@/usr/bin/env python setup.py install --install-purelib=/home/vila/ci/ubuntu-ci-services-itself/trunk/charms/precise/webui/lib \
   #--install-scripts=/home/vila/ci/ubuntu-ci-services-itself/trunk/charms/precise/webui/lib/bin
Running juju-deployer -v -c /tmp/tmpQAWMDF/deployer/ticket-system.yaml -c /tmp/tmpQAWMDF/deployer/ppa-assigner.yaml -c /tmp/tmpQAWMDF/deployer/test-runner.yaml -c /tmp/tmpQAWMDF/deployer/image-builder.yaml -c /tmp/tmpQAWMDF/deployer/branch-source-builder.yaml -c /tmp/tmpQAWMDF/deployer/lander.yaml -c /tmp/tmpQAWMDF/deployer/relations.yaml -c /tmp/tmpQAWMDF/deployer/juju-gui.yaml -c /tmp/tmpQAWMDF/deployer/production-only.yaml ci-airline-staging
Traceback (most recent call last):
  File "/tmp/tmpbBopcg/deployer/cli.py", line 20, in <module>
    from deployer.utils import ErrorExit, setup_logging, get_env_name
ImportError: cannot import name get_env_name
Problem deploying "ci-airline-staging": Command '['juju-deployer', '-v', '-c', '/tmp/tmpQAWMDF/deployer/ticket-system.yaml', '-c', '/tmp/tmpQAWMDF/deployer/ppa-assigner.yaml', '-c', '/tmp/tmpQAWMDF/deployer/test-runner.yaml', '-c', '/tmp/tmpQAWMDF/deployer/image-builder.yaml', '-c', '/tmp/tmpQAWMDF/deployer/branch-source-builder.yaml', '-c', '/tmp/tmpQAWMDF/deployer/lander.yaml', '-c', '/tmp/tmpQAWMDF/deployer/relations.yaml', '-c', '/tmp/tmpQAWMDF/deployer/juju-gui.yaml', '-c', '/tmp/tmpQAWMDF/deployer/production-only.yaml', 'ci-airline-staging']' returned non-zero exit status 1

real 52m23.976s
user 0m45.369s
sys 0m5.246s

The root cause is that I had a different version of juju-deployer locally installed and importable from PYTHONPATH.

"/tmp/tmpbBopcg/deployer/cli.py" was used because it's the script entry point but then the modules were imported from the wrong version.

Tags: airline

Related branches

Vincent Ladeuil (vila)
Changed in ubuntu-ci-services-itself:
status: Confirmed → In Progress
Vincent Ladeuil (vila)
Changed in ubuntu-ci-services-itself:
status: In Progress → Fix Committed
Vincent Ladeuil (vila)
Changed in ubuntu-ci-services-itself:
status: Fix Committed → Fix Released
Ursula Junque (ursinha)
Changed in uci-engine:
assignee: nobody → Vincent Ladeuil (vila)
importance: Undecided → Critical
milestone: none → phase-0
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.