bug 6987: root disk snapshot depends on template, if template is deleted, then you can not use the snapshot. this issue doesn't exist in 2.2. in this fix, template is not deleted from sencondary storage

test:

1. create a template
2. create a vm from this template
3. create several snapshots againg vm root dist
4. delete template
5, create vm from one of the snapshots
see if the issue is fixed

status 6987: resolved fixed
This commit is contained in:
anthony 2010-11-04 11:39:20 -07:00
parent da4c68e967
commit 3df5ec7981
1 changed files with 2 additions and 1 deletions

View File

@ -1775,7 +1775,7 @@ public class StorageManagerImpl implements StorageManager {
}
// Cleanup secondary storage hosts
List<HostVO> secondaryStorageHosts = _hostDao.listSecondaryStorageHosts();
/* List<HostVO> secondaryStorageHosts = _hostDao.listSecondaryStorageHosts();
for (HostVO secondaryStorageHost : secondaryStorageHosts) {
try {
long hostId = secondaryStorageHost.getId();
@ -1807,6 +1807,7 @@ public class StorageManagerImpl implements StorageManager {
s_logger.warn("problem cleaning up secondary storage " + secondaryStorageHost, e);
}
}
*/
List<VolumeVO> vols = _volsDao.listRemovedButNotDestroyed();
for (VolumeVO vol : vols) {