ec2metadata fails with traceback within ensemble nodes

Bug #823866 reported by Adam Gandelman
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloud-utils
Fix Released
Medium
Unassigned
pyjuju
Won't Fix
Low
Unassigned

Bug Description

On nodes that have been bootstrapped via ensemble, ec2metadata fails with the following traceback:

# ec2metadata
ami-e7c5048e
0
(unknown)
unavailable
us-east-1b
ami
ephemeral0
root
swap
none
i-97e895f6
m1.small
ip-10-72-203-28.ec2.internal
10.72.203.28
aki-805ea7e9
12:31:39:24:cb:ee
default-paravirtual
unavailable
ec2-184-73-62-175.compute-1.amazonaws.com
184.73.62.175
Traceback (most recent call last):
  File "/usr/bin/ec2metadata", line 212, in <module>
    main()
  File "/usr/bin/ec2metadata", line 208, in main
    display(metaopts, burl)
  File "/usr/bin/ec2metadata", line 164, in display
    value = m.get(metaopt)
  File "/usr/bin/ec2metadata", line 139, in get
    keyids = [ line.split('=')[0] for line in data.splitlines() ]
AttributeError: 'NoneType' object has no attribute 'splitlines'

The following userdata is injected into image via ensemble:

#part-000
#cloud-config
apt-update: true
apt-upgrade: true
apt_sources:
- {source: 'ppa:ensemble/ppa'}
machine-data: {ensemble-provider-type: ec2, ensemble-zookeeper-hosts: 'ip-10-85-67-223.ec2.internal:2181',
  machine-id: 14}
packages: [bzr, tmux, python-setuptools, python-twisted, python-argparse, python-txaws,
  python-zookeeper]
runcmd: [sudo apt-get -y install ensemble, sudo mkdir -p /var/lib/ensemble, sudo mkdir
    -p /var/log/ensemble, 'ENSEMBLE_MACHINE_ID=14 ENSEMBLE_ZOOKEEPER=ip-10-85-67-223.ec2.internal:2181
    python -m ensemble.agents.machine -n --logfile=/var/log/ensemble/machine-agent.log
    --pidfile=/var/run/ensemble/machine-agent.pid']
ssh_authorized_keys: ['ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC27Us7lSjCpa7bumXAgcT1CMVTJPKZAVahcsroMghwV23CMmVz/rR7+vJ8SHdPDbBQY8ZpY2rREDzc9k2YyI+PzL189JvUMQhQ3n2iByfSrhWbvGygSTtY06cAfZG4ln2zCIe30k6YJzglYMwMPAdbFPoJS5wXCoJ+vaxQT3lUuoJ+s4JyMoQkm2Em62TBHsFLtrtrX2p1d932i6jVDOOM9+Aa4q2HpojxvxOUZX83xLCZQYMdkVE+c/vdDNZ4UlpOw2hRYlHi95ofXwoQeXwQv6vfFw5SjZDkXzduhjbOxGkoPmfVpKz081Vxchakb2P+ayxziqyDiQcfRRF4QDep

Related branches

description: updated
Revision history for this message
Scott Moser (smoser) wrote :

The issue here is that ensemble launches instances with no public key (euca-run-instances --key).
fix coming.

Scott Moser (smoser)
Changed in cloud-utils:
importance: Undecided → Medium
status: New → Fix Committed
Revision history for this message
Scott Moser (smoser) wrote :

This should be fixed in 0.23-0ubuntu4.

Changed in cloud-utils:
status: Fix Committed → Fix Released
Revision history for this message
Clint Byrum (clint-fewbar) wrote :

So this still affects spawning lucid thru natty... marking Confirmed in juju.

Changed in juju:
status: New → Confirmed
importance: Undecided → Low
Revision history for this message
Kapil Thangavelu (hazmat) wrote :

i'd rather not grow unesc. things in juju because of a historical bug in a third party package. i think this is a won't fix issue.

Changed in juju:
milestone: none → eureka
status: Confirmed → Won't Fix
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.