Uploaded image for project: 'DeltaCloud'
  1. DeltaCloud
  2. DTACLOUD-537

fgcp: cannot retrieve new image details because create_image returns dummy id

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Component/s: Server
    • Labels:
      None

      Description

      FGCP currently doesn't have an API to track image creation status: the image creation api does not return an id so all you can do is poll the image listing operation until the new image shows up.
      So now create_image with fgcp returns a dummy id ("PENDING-#

      {opts[:name]}

      ").

      A DC or CIMI client would poll image status using the returned id until it transitioned to 'AVAILABLE'.

      I'm proposing to implement the following to allow such clients to work:

      • return an id with a creation timestamp. As images can't be created simultaneously, it can be used to uniquely identify the image.
      • store the timestamp in the image description at creation time
      • when retrieving the image, the driver searches their descriptions for this id. If not found: if the timestamp is more than 1hr ago, assume image does not exist (anymore). If less than 1hr, return 'CREATING' state.
      • append the contract name to the id to make the id globally unique.

      That should address this use case. It will not be able to include CREATING images in the response from /images.

      Considerations:

      • Use DC's DB to store the image info? That way /images can also include images that are being CREATED.
      • Append the image name in the id (or in DB) for use in the CREATING image response? Images can be renamed after creation so only the timestamp portion should be used to identify the image (misuse of id?).

        Attachments

          Activity

            People

            • Assignee:
              dkoper Dies Koper
              Reporter:
              dkoper Dies Koper
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Due:
                Created:
                Updated: