Merge lp:~vila/uci-engine/update-doc-lxc into lp:uci-engine

Proposed by Vincent Ladeuil
Status: Merged
Approved by: Vincent Ladeuil
Approved revision: 840
Merged at revision: 848
Proposed branch: lp:~vila/uci-engine/update-doc-lxc
Merge into: lp:uci-engine
Diff against target: 23 lines (+14/-0)
1 file modified
docs/using-lxc-for-local-development.rst (+14/-0)
To merge this branch: bzr merge lp:~vila/uci-engine/update-doc-lxc
Reviewer Review Type Date Requested Status
Evan (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+237750@code.launchpad.net

Commit message

Update lxc doc about precise deployments and cloud-archive:icehouse apt source

Description of the change

My local deployments started failing for the rabbit workers with a non-sensical:

Traceback (most recent call last):
  File "./test_runner/tstrun/run_worker.py", line 28, in <module>
    from tstrun import (
  File "/srv/ci-airline-tr-rabbit-worker/code/r839_3cc7fe689dd554940efeeac2f23c08a60b77aad4/test_runner/tstrun/testbed.py", line 26, in <module>
    from novaclient import (
  File "/usr/lib/python2.7/dist-packages/novaclient/client.py", line 34, in <module>
    from six.moves.urllib import parse
ImportError: No module named urllib

The root cause was that the charm does (paraphrasing ;):

# add-apt-repository -y cloud-archive:icehouse
# apt-get install python-novaclient

and this doesn't upgrade python-six.

This happens only in local lxc deployments with a hacked
juju-precise-template (so tarmac is immune).

To post a comment you must log in.
Revision history for this message
Evan (ev) wrote :

Can you elaborate a bit further on what is going on? If python-novaclient needs a later version of python-six than what's specified in debian/control, then that's a bug in the python-novaclient packaging that we should at least file a bug for, if not fix outright.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

PASSED: Continuous integration, rev:840
http://s-jenkins.ubuntu-ci:8080/job/uci-engine-ci/1568/
Executed test runs:

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/uci-engine-ci/1568/rebuild

review: Approve (continuous-integration)
Revision history for this message
Vincent Ladeuil (vila) wrote :

> Can you elaborate a bit further on what is going on? If python-novaclient
> needs a later version of python-six than what's specified in debian/control,
> then that's a bug in the python-novaclient packaging that we should at least
> file a bug for, if not fix outright.

No, python-novaclient depends on python-six (any version).

As pitti explained to me (I'm a packaging noob ;) apt-get install does the minimal amount of work and just install the newest python-novaclient which only requires python-six (any version).

In the general case, you never install a package without doing apt-get update first or if you do, you know what you're doing.

Here, we run into a weird corner case which could be fixed by forcing apt-get update in the charm but that seems overkill since the only bogus setup is the hack we use for the juju lxc template.

Revision history for this message
Evan (ev) wrote :

Does python-novaclient depend on features in python-six that are only available in a specific version of python-six? If so, the solution is to put a versioned dependency on python-six in the python-novaclient packaging. For example:

Depends: python-six (>= 1.5.2-0)

Revision history for this message
Vincent Ladeuil (vila) wrote :

> Does python-novaclient depend on features in python-six that are only
> available in a specific version of python-six? If so, the solution is to put a
> versioned dependency on python-six in the python-novaclient packaging. For
> example:
>
> Depends: python-six (>= 1.5.2-0)

Right. The problem as I see it is that I only discovered a source of potential issues: in this case, we stopped using the python-novaclient package from the phase-0 PPA to use the icehouse one.

So fixing this by adding the version to the python-six package, while being the *correct* fix, is quite involved (do we take ownership of this package to put a fixed version into our PPA again or do we propose that fix upstream (after checking it makes sense for them, I can perfectly understand them if they prefer to *not* pin their dep, they don't have the same constraints as us ?)).

Both are quite out of scope for this docfix proposal though ;)

I would rather spend time purging our ppa from deps we don't care about anymore.

Revision history for this message
Evan (ev) wrote :

Huh? This isn't about pinning dependencies. Packages must be functional at install time without needing an apt-get upgrade.

If parts of python-novaclient do not function with older versions of python-six, *that is a bug.* It's not specific to us. In fact, the version in utopic already has the fix:

python-six (>= 1.7.0)

So we could experiment with using the utopic version in our PPA, or ask the Server Team to pull the fix from utopic to the icehouse cloud archive with us then PPA-copying it over.

Revision history for this message
Vincent Ladeuil (vila) wrote :

> Huh? This isn't about pinning dependencies. Packages must be functional at
> install time without needing an apt-get upgrade.
>
> If parts of python-novaclient do not function with older versions of python-
> six, *that is a bug.* It's not specific to us. In fact, the version in utopic
> already has the fix:
>
> python-six (>= 1.7.0)
>
> So we could experiment with using the utopic version in our PPA, or ask the
> Server Team to pull the fix from utopic to the icehouse cloud archive with us
> then PPA-copying it over.

Ok, summarizing again: I'm not denying there is a potential bug, I ran into it. But it seems that a broken setup leave me with some inconsistent archives and I know wonder whether someone can even reproduce it (the rabbitmq-worker should do the right thing). In any case, I've filed https://app.asana.com/0/8309126707866/17625138719505 to continue this discussion.

But that shouldn't block *this* MP which document the use of the icehouse cloud archive in the lxc template.

Revision history for this message
Evan (ev) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'docs/using-lxc-for-local-development.rst'
2--- docs/using-lxc-for-local-development.rst 2014-09-18 14:14:15 +0000
3+++ docs/using-lxc-for-local-development.rst 2014-10-09 09:59:14 +0000
4@@ -104,6 +104,20 @@
5 sudo lxc-stop --name juju-trusty-template
6
7
8+Alternatively for a precise deployment you want:
9+
10+.. code-block:: none
11+
12+ # You'll now have an lxc container named juju-precise-template.
13+ # Modify it with these commands:
14+ sudo lxc-start -d --name juju-precise-template
15+ sudo lxc-attach --name juju-precise-template -- add-apt-repository -y ppa:canonical-ci-engineering/ci-airline-phase-0
16+ sudo lxc-attach --name juju-precise-template -- add-apt-repository -y cloud-archive:icehouse
17+ sudo lxc-attach --name juju-precise-template -- apt-get update
18+ sudo lxc-attach --name juju-precise-template -- apt-get install -y rabbitmq-server python-amqplib python-pip python-jinja2 mercurial git-core subversion bzr gettext python-django-south python-lazr.enum python-tastypie python-amqplib python-swiftclient postgresql-9.1 postgresql-contrib-9.1 python-psutil dput python-dput lazr.enum python-tz python-gnupg qemu-utils python-glanceclient python-amqplib python-requests python-novaclient python-psycopg2 pwgen postgresql-client gunicorn python-support pgtune postgresql-9.1-debversion postgresql-plpython-9.1 python-dnspython
19+
20+ sudo lxc-stop --name juju-precise-template
21+
22 Host Configuration
23 ==================
24

Subscribers

People subscribed via source and target branches