error with ec2-init pkg when running apt-get upgrade

Bug #520734 reported by nateaune
20
This bug affects 6 people
Affects Status Importance Assigned to Milestone
ec2-init (Ubuntu)
Fix Released
Medium
Unassigned
Karmic
Fix Released
Medium
Thierry Carrez

Bug Description

Binary package hint: ec2-init

When I run the apt-get upgrade command on Ubuntu Karmic, I get this error:

$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages have been kept back:
 bind9-host dnsutils libbind9-50 libdns50 libisc50 libisccc50
libisccfg50 liblwres50 linux-ec2 linux-image-ec2 linux-image-virtual
linux-virtual
0 upgraded, 0 newly installed, 0 to remove and 12 not upgraded.
1 not fully installed or removed.
After this operation, 0B of additional disk space will be used.
Do you want to continue [Y/n]?
Setting up ec2-init (0.4.999-0ubuntu7.1) ...
Compiling /usr/lib/python2.4/site-packages/ec2init/__init__.py ...
 File "/usr/lib/python2.4/site-packages/ec2init/__init__.py", line 28
   class EC2Init():
                 ^
SyntaxError: invalid syntax

pycentral: pycentral pkginstall: error byte-compiling files (2)
pycentral pkginstall: error byte-compiling files (2)
dpkg: error processing ec2-init (--configure):
 subprocess installed post-installation script returned error exit
status 1
Errors were encountered while processing:
 ec2-init
E: Sub-process /usr/bin/dpkg returned an error code (1)

ProblemType: Bug
Architecture: i386
Date: Thu Feb 11 23:15:10 2010
DistroRelease: Ubuntu 9.10
Ec2AMI: ami-1515f67c
Ec2AMIManifest: ubuntu-images-us/ubuntu-karmic-9.10-i386-server-20091027.1.manifest.xml
Ec2AvailabilityZone: us-east-1b
Ec2InstanceType: m1.small
Ec2Kernel: aki-5f15f636
Ec2Ramdisk: ari-0915f660
Package: ec2-init 0.4.999-0ubuntu7.1
PackageArchitecture: all
ProcEnviron:
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: User Name 2.6.31-302.7-ec2
SourcePackage: ec2-init
Tags: ec2-images
Uname: Linux 2.6.31-302-ec2 i686

=== Begin SRU Information ===
- impact on users: 'apt-get upgrade' fails if python2.4 is installed. This is because the installation attempts byte compile for all installed python versions, but some syntax is not 2.4 compatible.
- how the bug has been addressed: The EC2Init class had python 2.5+ syntax ['class EC2Init:()']. This was replaced with python2.4 compatible syntax by removing the '()'.
- patch is available at: http://bazaar.launchpad.net/%7Esmoser/ubuntu/karmic/ec2-init/karmic-updates/revision/37.1.1
- regression pottential:
  There was no other dependency on python2.5+, other than the syntax listed above. As such, with the fix, the byte compile succeeds. The code has been quickly tested to even run with python2.4, although this is not strictly necessary as /usr/bin/python will not be python2.4 in karmic.

TEST CASE:
  - start ec2/uec instance (ami-1515f67c is current karmic us-east-1 GA -- 20091027.1.)
  - sudo apt-get update && sudo apt-get install python2.4
  - 'apt-get install ec2-init' will fail

=== End SRU Information ===

Revision history for this message
nateaune (natea) wrote :
Revision history for this message
Scott Moser (smoser) wrote :

This is not an issue with cloud-init (which replaced ec2-init) in lucid.

Changed in ec2-init (Ubuntu):
status: New → Fix Committed
importance: Undecided → Medium
assignee: nobody → Scott Moser (smoser)
assignee: Scott Moser (smoser) → nobody
status: Fix Committed → Fix Released
Changed in ec2-init (Ubuntu Karmic):
status: New → Fix Committed
assignee: nobody → Scott Moser (smoser)
importance: Undecided → Medium
milestone: none → karmic-updates
Scott Moser (smoser)
description: updated
Scott Moser (smoser)
description: updated
Revision history for this message
Scott Moser (smoser) wrote :

I'm in need of a sponsor for lp:~smoser/ubuntu/karmic/ec2-init/karmic-updates . That branch contains fixes for bug 520734 and bug 475354 .

Thierry Carrez (ttx)
Changed in ec2-init (Ubuntu Karmic):
status: Fix Committed → In Progress
assignee: Scott Moser (smoser) → Thierry Carrez (ttx)
Revision history for this message
Thierry Carrez (ttx) wrote :

Uploaded to -proposed

Changed in ec2-init (Ubuntu Karmic):
status: In Progress → Triaged
Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Accepted ec2-init into karmic-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in ec2-init (Ubuntu Karmic):
status: Triaged → Fix Committed
tags: added: verification-needed
Revision history for this message
Scott Moser (smoser) wrote :

I've tested this on karmic released uec image (20100121):

$ sudo apt-get update && sudo apt-get install python2.4
$ echo deb http://archive.ubuntu.com/ubuntu/ karmic-proposed restricted main multiverse universe | sudo tee /etc/apt/sources.list.d/proposed.list
$ sudo apt-get update
$ apt-cache policy ec2-init
ec2-init:
  Installed: 0.4.999-0ubuntu7.1
  Candidate: 0.4.999-0ubuntu7.2
$ sudo apt-get install ec2-init

The above install succeeded. before it would have failed.

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ec2-init - 0.4.999-0ubuntu7.2

---------------
ec2-init (0.4.999-0ubuntu7.2) karmic-proposed; urgency=low

  * fix install/upgrade failure if python2.4 is installed (LP: #520734)
  * set hostname to a hostname-like value (ip-W-X-Y-Z) if instance
    metadata includes a ip address rather than a hostname in
    local-hostname (LP: #475354)
 -- Scott Moser <email address hidden> Thu, 11 Feb 2010 20:35:41 -0500

Changed in ec2-init (Ubuntu Karmic):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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