mirror of https://github.com/apache/cloudstack.git
CS-16135: Create volume after upgrade from snapshot taken in 2.2.14 deletes the snapshot physically from sec. storage. Added DB upgrade sql to make swift_id NULL if they are set to 0 and also added a check in the code to check for swift not present by checking swift_id != null && !=0
Reviewed-by: Kishan
This commit is contained in:
parent
c4257acc41
commit
bc8bdf8723
|
|
@ -713,7 +713,7 @@ public class StorageManagerImpl implements StorageManager, Manager, ClusterManag
|
|||
} catch (StorageUnavailableException e) {
|
||||
s_logger.error(basicErrMsg);
|
||||
} finally {
|
||||
if (snapshot.getSwiftId() != null) {
|
||||
if (snapshot.getSwiftId() != null && snapshot.getSwiftId() != 0) {
|
||||
_snapshotMgr.deleteSnapshotsDirForVolume(secondaryStoragePoolUrl, dcId, accountId, volumeId);
|
||||
}
|
||||
_snapshotDao.unlockFromLockTable(snapshotId.toString());
|
||||
|
|
|
|||
|
|
@ -379,3 +379,5 @@ INSERT IGNORE INTO `cloud`.`configuration` VALUES ('Usage', 'DEFAULT', 'manageme
|
|||
INSERT IGNORE INTO `cloud`.`configuration` VALUES ('Usage', 'DEFAULT', 'management-server', 'traffic.sentinel.exclude.zones', '', 'Traffic going into specified list of zones is not metered');
|
||||
|
||||
DROP TABLE IF EXISTS `cloud`.`ovs_tunnel_account`;
|
||||
UPDATE `cloud`.`snapshots` set swift_id=null where swift_id=0;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue