@@ -482,11 +482,13 @@ private static void checkObjectStorageConfiguration(SwiftTO swift, S3TO s3) {
482482 public void deleteSnapshotsForVolume (String secondaryStoragePoolUrl , Long dcId , Long accountId , Long volumeId ){
483483 SwiftTO swift = _swiftMgr .getSwiftTO ();
484484 S3TO s3 = _s3Mgr .getS3TO ();
485+ VolumeVO volume = _volumeDao .findById (volumeId );
486+ StoragePoolVO pool = _storagePoolDao .findById (volume .getPoolId ());
485487
486488 checkObjectStorageConfiguration (swift , s3 );
487489
488490 DeleteSnapshotBackupCommand cmd = new DeleteSnapshotBackupCommand (
489- swift , s3 , secondaryStoragePoolUrl , dcId , accountId , volumeId ,
491+ pool , swift , s3 , secondaryStoragePoolUrl , dcId , accountId , volumeId ,
490492 null , true );
491493 try {
492494 Answer ans = _agentMgr .sendToSSVM (dcId , cmd );
@@ -909,8 +911,11 @@ public boolean destroySnapshotBackUp(long snapshotId) {
909911
910912 checkObjectStorageConfiguration (swift , s3 );
911913
914+ VolumeVO volume = _volumeDao .findById (volumeId );
915+ StoragePoolVO pool = _storagePoolDao .findById (volume .getPoolId ());
916+
912917 DeleteSnapshotBackupCommand cmd = new DeleteSnapshotBackupCommand (
913- swift , s3 , secondaryStoragePoolUrl , dcId , accountId , volumeId ,
918+ pool , swift , s3 , secondaryStoragePoolUrl , dcId , accountId , volumeId ,
914919 backupOfSnapshot , false );
915920 Answer answer = _agentMgr .sendToSSVM (dcId , cmd );
916921
@@ -1062,10 +1067,12 @@ public boolean deleteSnapshotDirsForAccount(long accountId) {
10621067
10631068 checkObjectStorageConfiguration (swift , s3 );
10641069
1070+ StoragePoolVO pool = _storagePoolDao .findById (volume .getPoolId ());
1071+
10651072 if (swift == null && s3 == null ) {
10661073 for (HostVO ssHost : ssHosts ) {
10671074 DeleteSnapshotBackupCommand cmd = new DeleteSnapshotBackupCommand (
1068- null , null , ssHost .getStorageUrl (), dcId ,
1075+ pool , null , null , ssHost .getStorageUrl (), dcId ,
10691076 accountId , volumeId , "" , true );
10701077 Answer answer = null ;
10711078 try {
@@ -1084,7 +1091,7 @@ public boolean deleteSnapshotDirsForAccount(long accountId) {
10841091 }
10851092 } else {
10861093 DeleteSnapshotBackupCommand cmd = new DeleteSnapshotBackupCommand (
1087- swift , s3 , "" , dcId , accountId , volumeId , "" , true );
1094+ pool , swift , s3 , "" , dcId , accountId , volumeId , "" , true );
10881095 Answer answer = null ;
10891096 try {
10901097 answer = _agentMgr .sendToSSVM (dcId , cmd );
0 commit comments