stratos-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Imesh Gunaratne (JIRA)" <>
Subject [jira] [Created] (STRATOS-322) Cloud Controller StartInstance() Method is Not Atomic
Date Tue, 24 Dec 2013 06:25:52 GMT
Imesh Gunaratne created STRATOS-322:

             Summary: Cloud Controller StartInstance() Method is Not Atomic
                 Key: STRATOS-322
             Project: Stratos
          Issue Type: Bug
    Affects Versions: 4.0.0 M5
            Reporter: Imesh Gunaratne
            Assignee: Lahiru Sandaruwan

As we found when Autoscaler invokes the StartInstance() service method in Cloud Controller
it spawn a new VM instance and then try to execute the following operations:
1. Assign a public IP
2. Publish Instance Spawned event.

However if an error occurred while trying to assign a public IP (even after spawning the instance)
the StartInstance() method throw an exception to the caller. As a result Autoscaler assume
that the instance was not spawned and another call is made. This is not correct.

Proposed Solution:
1. Autoscaler invokes cloud controller -> startInstance() 
2. Cloud controller:
    2.1 Spawn a new instance
    2.2 Start a background thread to assign IPs
    2.3 Send the Instance Spawned event if IPs successfully assigned in the background thread.
    2.4 Return the startInstance() method call without waiting for the above background thread.

This message was sent by Atlassian JIRA

View raw message