Uploaded image for project: 'Stratos'
  1. Stratos
  2. STRATOS-322

Cloud Controller StartInstance() Method is Not Atomic

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 4.0.0 M5
    • None
    • None

    Description

      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.

      Attachments

        Activity

          People

            lahirugamage Lahiru Sandaruwan
            imesh Imesh Gunaratne
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: