ec2-init: RightScale startup script removes itself

Bug #417292 reported by Eric Hammond
This bug report is a duplicate of:  Bug #434181: rightscale init script. Edit Remove
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
EC2 init scripts
Invalid
Undecided
Unassigned
Ubuntu on EC2
Invalid
Low
Unassigned
ec2-init (Ubuntu)
Triaged
Low
Scott Moser

Bug Description

The ec2-init package includes a startup script in /etc/init.d/rightscale which checks to see if the instance was started from with in a RightScale environment.

In either case, this script removes itself. There are a couple issues with this:

1. It is unexpected and possibly a bit threatening to have an AMI run code on startup which is then removed before the user is given a chance to log in and see it. It is impossible for a user to view the source of the AMI before running it, so there is no way to verify what code is being run on the instance. This can be a cause of concern, especially if it is a publisher's known practice to delete startup code.

2. If a user runs an instance of the AMI and rebundles the instance as a new AMI, that new AMI no longer has support for being run inside RightScale with startup hooks.

A more appropriate approach for RightScale startup code would be to check and install the software on the first boot of each instance/AMI. Once the software gets installed, the script could disable (but not remove) itself.

Scott Moser (smoser)
Changed in ubuntu-on-ec2:
status: New → Confirmed
Changed in ec2-init:
status: New → Confirmed
Scott Moser (smoser)
Changed in ubuntu-on-ec2:
importance: Undecided → Low
Scott Moser (smoser)
tags: added: ec2-images uec-images
Scott Moser (smoser)
Changed in ec2-init (Ubuntu):
importance: Undecided → Low
status: New → Confirmed
Changed in ubuntu-on-ec2:
status: Confirmed → Invalid
Eric Hammond (esh)
Changed in ec2-init:
status: Confirmed → Invalid
Revision history for this message
Scott Moser (smoser) wrote :

I'd like to fix this by making the rightscale init script (debian/ec2-init.rightscale-init.init)[1] to use logic more like ec2-init's [2] run_once_per_ami

--
[1] http://bazaar.launchpad.net/%7Eubuntu-branches/ubuntu/karmic/ec2-init/karmic/annotate/head%3A/debian/ec2-init.rightscale-init.init
[2] http://bazaar.launchpad.net/%7Eubuntu-branches/ubuntu/karmic/ec2-init/karmic/annotate/head%3A/ec2-init

Changed in ec2-init (Ubuntu):
assignee: nobody → Scott Moser (smoser)
status: Confirmed → Triaged
Revision history for this message
Eric Hammond (esh) wrote :

Some or all of the concerns here may be solved by bug 434181.

Revision history for this message
Eric Hammond (esh) wrote :

Yes, bug 434181 should solve the "removes itself" problem.

RightScale has indicated that the desired rebundling approach should be to run the image within RightScale which will install all of the RightScale software. When this instance is rebundled (perhaps with RightScale) then the new image will still run RightScale tasks on startup.

Marking this a duplicate.

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.