ec2-init: fetch-credentials not run on rebundled image

Bug #407919 reported by Eric Hammond
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
EC2 init scripts
Fix Released
Undecided
Unassigned
Ubuntu on EC2
Fix Released
High
Unassigned

Bug Description

This applies to dev testing ami-af3fdec6

When a running instance is rebundled and run as a new instance, ssh attempts are rejected.

I tracked this down to the ec2-fetch-credentials being inside a "run_once_ever" check in /etc/init.d/ec2-init script. This means that the ssh keys are not loaded into authorized_keys file for a rebundled image.

This should be changed to "run_once_per_ami" or "run_once_per_instance" (which do the same thing).

Related branches

Chuck Short (zulcss)
Changed in ubuntu-on-ec2:
status: New → Confirmed
importance: Undecided → High
Revision history for this message
Scott Moser (smoser) wrote :

This is fixed in ec2-init scripts 0.4.99-0ubuntu1 .

/etc/init.d/ec2-init now has:
        if run_once_per_ami ssh_authorized_keys
        then
            log_daemon_msg "Fetching EC2 SSH keys"
            if ec2-fetch-credentials 2> /dev/null
            then
                log_end_msg 0
            else
                log_end_msg 1
            fi
        fi

I've verified that inside of http://ec2-images.ubuntu.com/karmic/20090811.2/ubuntu-ec2-karmic-amd64.img.gz

Please re-open if the fix is not working.

Changed in ec2-init:
status: New → Fix Released
Changed in ubuntu-on-ec2:
status: Confirmed → 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.