[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-8833?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14742934#comment-14742934
 ] 

ASF GitHub Bot commented on CLOUDSTACK-8833:
--------------------------------------------

Github user anshul1886 commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/803#discussion_r39361975
  
    --- Diff: 
engine/storage/src/org/apache/cloudstack/storage/image/db/VolumeDataStoreDaoImpl.java
 ---
    @@ -350,4 +351,20 @@ public void expireDnldUrlsForZone(Long dcId){
             return listIncludingRemovedBy(sc);
         }
     
    +    @Override
    +    public boolean updateVolumeId(long srcVolId, long destVolId) {
    +        TransactionLegacy txn = TransactionLegacy.currentTxn();
    +        try {
    +            VolumeDataStoreVO volumeDataStoreVO = findByVolume(srcVolId);
    +            if(volumeDataStoreVO != null) {
    +                txn.start();
    +                volumeDataStoreVO.setVolumeId(destVolId);
    +                update(volumeDataStoreVO.getId(), volumeDataStoreVO);
    +                txn.commit();
    +            }
    +        } catch (Exception e) {
    --- End diff --
    
    Updated the code to embed the exception in CloudRuntimeException.


> Generating url and migrate volume to another storage , resulting two entry in 
> UI and listvolume is not working for that volume
> ------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CLOUDSTACK-8833
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8833
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the 
> default.) 
>            Reporter: Anshul Gangwar
>            Assignee: Anshul Gangwar
>
> steps to rep
> ----------------
> 1-Generate URL for a volume
> 2-Migrate volume to another storage.
> issue
> --------
> UI shows two volume and listvolume for that particular volume does not work
> Observation :
> removed field is not getting updated
> created: 2015-05-02 09:53:13
> state: Expunged
> attached: NULL
> removed: NULL



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to