There should have been only one entry created. Seems like both these
operations are working independently at the moment.
So when download volume happens you create a db entry in volume_store_ref.
You request migration of volume then it should not have to copy the volume
to sec. storage since it exists there already.
When migration is done you need to see that the url hasn't expired so you
shouldn¹t delete the entry and similarly when url expires you would have
to know that migration is in progress so you shouldn¹t delete the volume.
You need to figure out a mechanism so that this is solved elegantly (say
keeping a reference count, incrementing it when migration or download is
requested and then decrementing it once the operation is done or url is
expired)

Thanks,
-Nitin

On 19/06/14 1:51 AM, "Anshul Gangwar" <anshul.gang...@citrix.com> wrote:

>Hi,
>
>
>I am looking into fixing bug
>https://issues.apache.org/jira/browse/CLOUDSTACK-6900. When we download
>volume then we create entry for that volume in volume_store_ref table. We
>mark the volume in ready state. When we migrate that volume, then again
>one more entry is created with same volume id. Its state is marked as
>allocated. This way there are two entries in volume_store_ref table. In
>one case it is marked as allocated and in other case it is marked as in
>ready state.
>
>Later we try to list only one dataobject in datastore for state
>transition during volume migration. If the listed volume's state is
>allocated then it passes otherwise it fails.
>
>Download url expires after 4 hrs. After 4 hrs migration should pass as
>there will be unique dataobject in datastore for the volume.
>
>What should be the expected behavior in this transition period i.e. till
>the download volume of url expires?
>
>Thanks,
>
>Anshul
>
>

Reply via email to