« Previous | Next » 

Revision 2bbf1544

ID2bbf1544acf5b83a2fb8ed3ccba06bcc6e122b32

Added by Georgios D. Tsoukalas over 8 years ago

Fix UUID bug breaking image list and VM creation

latest_uuid(uuid) returned the latest version with the given uuid.
This is called from pithos backend method get_uuid(),
which is called from plankton backend method get_image().

For the use in get_image() the uuid alone is not enough,
since we need the latest version that is accessible,
i.e. not deleted or trashed (in pithos parlance, in CLUSTER_NORMAL)

The problematic scenario is cause by a MOVEing (renaming)
a plankton image to a different name.
Internally, pithos handles a 'move src dest' as a
'copy src dest' + 'delete src'.
Both copy and delete create a new version of the source,
with the same UUID.
We need the 'copy' version but because the delete is executed
after the copy, the 'deleted' version becomes the latest,
thus the one latest_uuid() would return.

This has been fixed by adding a mandatory cluster argument:
latest_uid(uuid, cluster), to which get_uuid() now specifies
CLUSTER_NORMAL.
The previous cluster-unaware behavior can be obtained by
specifying cluster as None.

Refs #3391

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences