mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-02 11:52:28 +01:00
CLOUDSTACK-4002: We should use backup_snap_id in snapshots table to
construct snapshot install_path in snapshot_store_ref for pre-4.2.0 snapshot.
This commit is contained in:
parent
a8990cffd4
commit
93814d1738
@ -1952,7 +1952,7 @@ public class Upgrade410to420 implements DbUpgrade {
|
||||
|
||||
try {
|
||||
snapshotStoreInsert = conn
|
||||
.prepareStatement("INSERT INTO `cloud`.`snapshot_store_ref` (store_id, snapshot_id, created, size, parent_snapshot_id, install_path, volume_id, update_count, ref_cnt, store_role, state) select sechost_id, id, created, size, prev_snap_id, CONCAT('snapshots', '/', account_id, '/', volume_id, '/', path), volume_id, 0, 0, 'Image', 'Ready' from `cloud`.`snapshots` where status = 'BackedUp' and sechost_id is not null and removed is null");
|
||||
.prepareStatement("INSERT INTO `cloud`.`snapshot_store_ref` (store_id, snapshot_id, created, size, parent_snapshot_id, install_path, volume_id, update_count, ref_cnt, store_role, state) select sechost_id, id, created, size, prev_snap_id, CONCAT('snapshots', '/', account_id, '/', volume_id, '/', backup_snap_id), volume_id, 0, 0, 'Image', 'Ready' from `cloud`.`snapshots` where status = 'BackedUp' and sechost_id is not null and removed is null");
|
||||
snapshotStoreInsert.executeUpdate();
|
||||
}
|
||||
catch (SQLException e) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user