You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stratos.apache.org by "Imesh Gunaratne (JIRA)" <ji...@apache.org> on 2013/12/24 07:25:52 UTC
[jira] [Created] (STRATOS-322) Cloud Controller StartInstance()
Method is Not Atomic
Imesh Gunaratne created STRATOS-322:
---------------------------------------
Summary: Cloud Controller StartInstance() Method is Not Atomic
Key: STRATOS-322
URL: https://issues.apache.org/jira/browse/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
(v6.1.5#6160)