Buildjail fails on Lucid jail build due to missing python2.5

Bug #579073 reported by Matt Giuca
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
IVLE
Fix Released
Critical
William Grant

Bug Description

On Lucid, by default (at least, using bin/ivle-dev-setup), the /etc/ivle.conf will be created with 'lucid' as the Ubuntu version inside the jail. Running ivle-buildjail -r results in this error:

Package python2.5 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package python2.5 has no installation candidate
Traceback (most recent call last):
  File "/usr/local/bin/ivle-buildjail", line 89, in <module>
    ['python2.5', 'python-cjson', 'python-svn', 'python-configobj'])
  File "/usr/local/lib/python2.6/dist-packages/ivle/jailbuilder/debian.py", line 70, in apt_install
    _execute_in_chroot(path, ['apt-get', '-y', 'install'] + packages)
  File "/usr/local/lib/python2.6/dist-packages/ivle/jailbuilder/debian.py", line 56, in _execute_in_chroot
    raise JailBuildError('command failed with code %d' % pid.returncode)
ivle.jailbuilder.exceptions.JailBuildError: command failed with code 100

This is because buildjail specifically depends on python2.5, but that package has been removed in Lucid in favour of python2.6.

Not sure how to fix this and remain backwards-compatible, but this is going to keep happening, so we need a better solution. If buildjail were to depend on the same version of Python that is installed on the host machine, what problems would that cause? If buildjail *does* get the correct version of Python installed, are there any other issues? (Looks like it's working fine with me, by just modifying buildjail to use python2.6).

Workarounds:
- Change /etc/ivle.conf - jail/suite to karmic manually before running ivle-buildjail -r.
- In ivle-buildjail, manually s/python2.5/python2.6/g.

Tags: scripts

Related branches

Matt Giuca (mgiuca)
tags: added: scripts
Revision history for this message
Matt Giuca (mgiuca) wrote :

I managed to get a fresh build of IVLE running in Lucid (with a Lucid jail) just by modifying ivle-buildjail to use python2.6 instead of python2.5. So the fix for this should be to make ivle-buildjail somehow smart enough to figure out which version of Python to install.

But I don't think using sys.version is correct -- that will set the jail version to whichever version is running outside the jail, which isn't necessarily correct.

description: updated
Revision history for this message
William Grant (wgrant) wrote :

Why not s/python2.5/python/? The default Python version is probably the right one.

Revision history for this message
Matt Giuca (mgiuca) wrote :

Hmm, true. Is there any reason we wanted to be specific about the version in the first place?

Oh. I think it's because on Karmic, the default Python is 2.6, but we wanted IVLE to remain on 2.5. Therefore this is a policy decision: Does IVLE provide Python 2.5, or the system default Python?

Almost certainly, the correct answer is "system default", because otherwise this will keep happening.

William Grant (wgrant)
Changed in ivle:
milestone: none → 1.0.2
William Grant (wgrant)
Changed in ivle:
importance: Medium → Critical
Revision history for this message
Matt Giuca (mgiuca) wrote :

So we have agreed to simply s/python2.5/python? This is a quick fix but requires consideration/testing.

Are we planning to roll out Lucid on the servers after 1.0.2 is released?

Revision history for this message
David Coles (dcoles) wrote :

Yes. We want the current version of python in IVLE's console.

William's planning to roll a Lucid 1.0.1 package and then we'll start doing 1.0.2 fixes. Ideally we'll deploy 1.0.2.

William Grant (wgrant)
Changed in ivle:
status: Triaged → In Progress
assignee: nobody → William Grant (wgrant)
Revision history for this message
William Grant (wgrant) wrote :

Fixed in trunk r1794.

Changed in ivle:
status: In Progress → Fix Committed
William Grant (wgrant)
Changed in ivle:
status: Fix Committed → 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.