[ https://issues.apache.org/jira/browse/CLOUDSTACK-8833?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14740711#comment-14740711 ]
ASF GitHub Bot commented on CLOUDSTACK-8833: -------------------------------------------- Github user DaanHoogland commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/803#discussion_r39266451 --- 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 -- please catch more specific/explicit exceptions > 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)