----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/7660/ -----------------------------------------------------------
(Updated Feb. 21, 2013, 10:01 a.m.) Review request for cloudstack and Min Chen. Changes ------- Updated the patch for template sync during MS restart. Manually tested the following: setup: upload ISO1 and ISO 2 Attach ISO1 to VM1 and VM2 Attach ISO2 to VM3 set storage.cleanup.interval to 300 test cases: 1. delete ISO1 from UI, gets deleted 2. In VM Details of VM1 and VM2, can see detach ISO option 3. ISO1 exists in secondary storage 4. detach ISO1 from VM1, successful 5. ISO1 still exists in secondary storage. 6. Restart MS, template sync will not delete ISO1. 7. Detach ISO1 from VM2, successfull detached. 8. Wait for storage cleanup thread to execute, ISO1 gets deleted from Secondary storage. 9. Detach ISO2 from VM3 10.ISO2 exists in secondary storage, Delete ISO2 form UI, get deleted from secondary storage. Description ------- Currently no warning or confirmation is given or required to delete an iso which is attached to a virtual machine. Fixing this issue using “force” delete option. If an admin or a user deletes an ISO which is attached to a vm: 1. Without force option; gives a warning that ISO is attached to vm “Failed to delete iso. It is currently attached to virtual machine. Please detach it before deleting”. 2. With force option: first detach the ISO from all vms and then deletes the ISO. This addresses bug CLOUDSTACK-357. Diffs (updated) ----- server/src/com/cloud/storage/dao/VMTemplateHostDaoImpl.java 4d1ac02 server/src/com/cloud/storage/download/DownloadMonitorImpl.java 6d3cf2a server/src/com/cloud/template/HyervisorTemplateAdapter.java fe6bc2a server/src/com/cloud/template/TemplateAdapterBase.java fa677ac server/src/com/cloud/template/TemplateManagerImpl.java f9cf277 server/src/com/cloud/vm/dao/UserVmDao.java 9fbcde3 server/src/com/cloud/vm/dao/UserVmDaoImpl.java f2fc10b Diff: https://reviews.apache.org/r/7660/diff/ Testing ------- Verified locally. Tested for some cases: 1. Deleting iso(not attached to any vm) 2. Deleting iso(attached to multiple vms in same domain) 3. Deleting iso(attached to multiple vms in different domains) For admin/user Thanks, deepti dohare