global image id

Asked by Kevin Wilson

Working with a patch process and the concept of shared images across cloud boundaries, I am looking for a way to uniquely identify images that may have been built in one cloud and then transported and imported into another cloud. Is there a create api for a image that can take in a UUID as the image identifier, so that the image ID can be preserved across clouds.

Or are the ID generated when creating a image only garanteed unique within the current cloud?

As I look at patching a image, I need to upload a new image potentially based off a previous image. It would be great to be able to use a consistent ID across clouds.


Question information

English Edit question
Glance Edit question
No assignee Edit question
Solved by:
Erno Kuvaja
Last query:
Last reply:
Revision history for this message
Best Erno Kuvaja (jokke) said :

Hi Kevin,

You can pass --id to glance image-create to specify the image ID you would like to use. Obviosly the creation fails if you provide ID that already exists in db.

Please note the bug linked to the question, you cannot re-use the ID after the image has been deleted until that bug is solved.


Revision history for this message
Kevin Wilson (kevin-l-wilson) said :

Thanks Erno Kuvaja, that solved my question.

Revision history for this message
ephem (tpiperatgod) said :

It's wonderful.Is there has a similar function which can add --id to create instance?

Revision history for this message
Kevin Wilson (kevin-l-wilson) said :

After further research on this topic. Although it seemed like a good idea at the onset... Setting the id has issues in multi-tenant environment when it comes to ownership of the image.

IE a tenant may decide to import a image(id = x) from a common repository . If another tenant on the same system want to import the image(id=x) into the same repository, there will be a id conflict and the user cannot import the image as they do not own the image with id=x.

We have moved to using a source_id property on the image so that many images in the repository each with there own unique ID can import the image into there tenant or private space. If image requires upgrading then the source ID property can be used to find the image in the current users visibility scope.