Support Search

Server States

Overview

When you launch an instance in the Cloud, a server will progress through the following states.  The time that is required to complete the launch process varies across clouds.  RightScale can only control the actual configuration process, but not the instantiation times.  Typically, we've observed launch times on EC2 to be around 10 minutes.


If there is a problem with the completion of one of the states, it will enter a stranded state.

 

Next, we'll explain each state in more detail.
 


Pending State

RightScale makes a request to the cloud infrastructure of your choice for a new instance on your behalf (using your cloud credentials).   For example, you could request an 'm1.small' instance type in the EC2-US region, specifically in availability zone 'us-east-1a'.

 

Booting State

Once an instance has been provisioned by a Cloud, RightScale will begin to configure the instance.  If you are using ServerTemplates, the instance will be configured appropriately so that upon completion of the installation and configuration process, it will be able to assume its designed server role.  For example, an instance can be configured to be a MySQL database server, FrontEnd PHP server, Rails application server, etc.  During the booting phase, boot scripts (RightScripts/Cookbooks) are executed in succession, Elastic IPs are assigned, and EBS volumes are attached to the server.  Although you can run a script during the booting phase of an instance, it is not recommended.

 

Operational State

If the server was successfully configured during the boot phase, the server will become operational.  It is now safe to run RightScripts on the server.  Typically, you will only want to execute operational scripts, however, you can also run boot and decommission scripts.  Server alerts and monitoring features are only enabled once a server becomes operational.

 

Decommissioning State

When a server is shutdown, a server will enter the decommissioning phase and attempt to execute all of its decommission scripts in succession.   Be careful, some decommission scripts may not be executed or completed if time does not permit.  Although you can run other scripts during the decommissioning phase of a server, it is not recommended.  Important tasks such as database backups that cannot be completed in the alotted time must be manually run during the operational phase.  Once you make a request to terminate an instance, you will have a very short amount of time to perform any actions before that instance is permanently terminated.   See Decommission Scripts for more information.

If you are terminating an instance on EC2, Amazon allows 120 seconds to perform any last minute actions before it is permanently terminated.

 

Stranded State

If a server does not successfully complete one of the phases, the server will enter a "stranded" state.   A server will strand whenever the execution of one of the scripts fails during the boot/decommission phase.  There are serveral reasons why a server can become stranded.    For troubleshooting, check the server's Audit Entries tab to see which script failed.   An incorrectly set input is often the cause for a stranded in booting server.  Check your inputs to make sure that the correct input parameter is being set.  Remember, inputs can be overwritten depending on where they're defined.  See Inputs and their Hierarchy for more information. 

If you are aware of the script failure and you still want to make the server operational, you have the option of forcing a "stranded" server to become operational.  Under the server's Info tab, click the "operational" link to force the server into the operational state. 

screen-ForceOperationalState-v1.png

When a server is stranded in booting, the server's alert and monitoring features are not functional.  A server will persist in the stranded in booting state until it is either manually terminated or forced into the operational state.  Rarely, a server will be displayed as stuck in the decommissioning state, but rest assured that Amazon did receive the terminate action.   If a server remains in the decommissioning state even after a logout/login of the Dashboard, please log a Support ticket.

Note: Amazon will still charge you the standard rate per hour even if a server is stuck in the stranded state.