GitHub user anshul1886 opened a pull request: https://github.com/apache/cloudstack/pull/68
CLOUDSTACK-6900: This fixes volume migration failing after that volume is downloaded When we download volume then we create entry in volume_store_ref table. We mark the volume entry to ready state once download_url gets generated. When we migrate that volume, then again one more entry is created with same volume id. Its state is marked as allocated. 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 migration passes otherwise it fails. Below fix will remove the randomness and give priority to volume entry which is made for migration (download_url/extracturl will be null in case of migration). Giving priority to download volume case is not needed as there will be only one entry in that case so no randomness. You can merge this pull request into a Git repository by running: $ git pull https://github.com/anshul1886/cloudstack-1 CLOUDSTACK-6900 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cloudstack/pull/68.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #68 ---- commit 91e1881be82b06963903b7ee6aa15cdbcc04705f Author: Anshul Gangwar <anshul.gang...@citrix.com> Date: 2015-01-13T11:05:10Z CLOUDSTACK-6900: This fixes volume migration failing after that volume is downloaded. When we download volume then we create entry in volume_store_ref table. We mark the volume entry to ready state once download_url gets generated. When we migrate that volume, then again one more entry is created with same volume id. Its state is marked as allocated. 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 migration passes otherwise it fails. Below fix will remove the randomness and give priority to volume entry which is made for migration (download_url/extracturl will be null in case of migration). Giving priority to download volume case is not needed as there will be only one entry in that case so no randomness. ---- --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---