image store broken on Lucid

Bug #516738 reported by Dustin Kirkland  on 2010-02-03
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fix Released
euca2ools (Ubuntu)
Dustin Kirkland 
Dustin Kirkland 
image-store-proxy (Ubuntu)
Jamu Kakar
Jamu Kakar

Bug Description

The basic operation of installing an image from the image-store-proxy in Lucid is broken.

Once the image downloads, an error is report (see screenshot).

The error message is:

Command 'euca-bundle-image' returned status code 1:
'NoneType' object has no attribute 'endswith'

Bundles an image for use with Eucalyptus or Amazon EC2.

euca-bundle-image -i, --image image_path -u, --user user [-c, --cert cert_path]
[-k, --privatekey private_key_path] [-p, --prefix prefix] [--kernel kernel_id]
[--ramdisk ramdisk_id] [-B, --block-device-mapping mapping]
[-d, --destination destination_path] [--ec2cert ec2cert_path]
[-r, --arch target_architecture] [--batch] [-h, --help] [--version] [--debug]


-i, --image Path to the image file to bundle.

-u, --user User ID (12-digit) of the user who is bundling the image.


-c, --cert Path to the user's PEM encoded certificate.

-k, --privatekey Path to the user's PEM encoded private key.

-p, --prefix The prefix for the bundle image files. (default: image name).

--kernel The kernel to be associated with the bundled image.

--ramdisk The ramdisk to be associated with the bundled image.

-B, --block-device-mapping Default block device mapping for the image (comma-separated list of key=value pairs).

-d, --destination Directory to store the bundled image in (default: "/tmp"). Recommended.

--ec2cert_path The path to the Cloud's X509 public key certificate.

-r, --arch Target architecture for the image ('x86_64' or 'i386' default: 'x86_64').

--batch Run in batch mode (compatibility only. has no effect).

-a, --access-key User's Access Key ID.

-s, --secret-key User's Secret Key.

-U, --url URL of the Cloud to connect to.

--config Read credentials and cloud settings from the
    specified config file (defaults to $HOME/.eucarc or /etc/euca2ools/eucarc).

-h, --help Display this help message.

--version Display the version of this tool.

--debug Turn on debugging.

Euca2ools will use the environment variables EC2_URL, EC2_ACCESS_KEY, EC2_SECRET_KEY, EC2_CERT, EC2_PRIVATE_KEY, S3_URL, EUCALYPTUS_CERT by default.

Mathias says that the $HOME environment variable is not set in the python twisted environment were euca-bundle-image runs.

Dustin Kirkland  (kirkland) wrote :

Screen shot attached.

Changed in image-store-proxy (Ubuntu):
status: New → Triaged
importance: Undecided → High
assignee: nobody → Jamu Kakar (jkakar)
Changed in image-store-proxy (Ubuntu Lucid):
milestone: none → lucid-alpha-3
Scott Moser (smoser) wrote :

please test this patch

Jamu Kakar (jkakar) wrote :

The real problem is actually in euca2ools. The issue is that it
assumes HOME will be defined in the environment and ends up running
os.path.join(HOME, ...) with HOME as None and then everything blows
up. The "'NoneType' object has no attribute 'endswith'" bubbles up
as a result of this.

Jamu Kakar (jkakar) wrote :

I can't seem to adjust the status without OOPSing Launchpad. This
bug should be marked 'Invalid'.

Scott Moser (smoser) on 2010-02-03
Changed in euca2ools (Ubuntu Lucid):
importance: Undecided → High
Scott Moser (smoser) wrote :

This patch fixes the problem in euca2ools. The issue is reproducible by:

   sh -c 'unset HOME; euca-bundle-image'

Changed in image-store-proxy (Ubuntu Lucid):
status: Triaged → Invalid
Changed in euca2ools (Ubuntu Lucid):
milestone: none → lucid-alpha-3
Neil Soman (neilsoman) wrote :

Thanks for the patch. Applied to upstream (revno 245).

Changed in eucalyptus:
status: New → Fix Committed
Changed in euca2ools (Ubuntu Lucid):
assignee: nobody → Dustin Kirkland (kirkland)
status: New → In Progress
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package euca2ools - 1.2~bzr245-0ubuntu1

euca2ools (1.2~bzr245-0ubuntu1) lucid; urgency=low

  * Merge from upstream bzr revision; should fix:
    - LP: #510982 - show kernel and ramdisk attributes
    - LP: #516486 - fix attribute display
    - LP: #516738 - fix ubuntu image store
 -- Dustin Kirkland <email address hidden> Thu, 11 Feb 2010 15:35:07 -0600

Changed in euca2ools (Ubuntu Lucid):
status: In Progress → Fix Released
Scott Moser (smoser) wrote :

The patch applied here broke reading of user config file.

+ user_eucarc = None
+ if 'HOME' in os.environ:
+ os.path.join(os.getenv('HOME'), ".eucarc")

should be:

+ user_eucarc = None
+ if 'HOME' in os.environ:
+ user_eucarc = os.path.join(os.getenv('HOME'), ".eucarc")

Changed in eucalyptus:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers