mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
SWIFT : do not sync template to swift if it is marked as destroyed in secondry stoarge
This commit is contained in:
parent
141cceacef
commit
a85864e160
@ -204,7 +204,7 @@ public class NfsSecondaryStorageResource extends ServerResourceBase implements S
|
||||
}
|
||||
String result = swiftUpload(swift, "T-" + templateId.toString(), lPath, "*");
|
||||
if (result != null) {
|
||||
String errMsg = "failed to download template from Swift to secondary storage " + lPath + " , err=" + result;
|
||||
String errMsg = "failed to upload template from secondary storage " + lPath + " to swift , err=" + result;
|
||||
s_logger.debug(errMsg);
|
||||
return new Answer(cmd, false, errMsg);
|
||||
}
|
||||
|
||||
@ -883,6 +883,9 @@ public class TemplateManagerImpl implements TemplateManager, Manager, TemplateSe
|
||||
try {
|
||||
List<VMTemplateHostVO> templtHostRefs = _tmpltHostDao.listByState(VMTemplateHostVO.Status.DOWNLOADED);
|
||||
for (VMTemplateHostVO templtHostRef : templtHostRefs) {
|
||||
if (templtHostRef.getDestroyed()) {
|
||||
continue;
|
||||
}
|
||||
if (!templateIds.contains(templtHostRef.getTemplateId())) {
|
||||
continue;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user