mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-02 20:02:29 +01:00
bug 7686: when detach iso, always remove is from uservm table to make sure ISO is remove after stop/start
status 7686: resolved fixed
This commit is contained in:
parent
6930bf1dce
commit
0aa24c9ebf
@ -1253,16 +1253,17 @@ public class TemplateManagerImpl implements TemplateManager, Manager, TemplateSe
|
||||
} else {
|
||||
startEventId = EventUtils.saveStartedEvent(userId, vm.getAccountId(), EventTypes.EVENT_ISO_DETACH, "Detaching ISO: "+isoId+" from Vm: "+vmId, startEventId);
|
||||
}
|
||||
|
||||
boolean success = _vmMgr.attachISOToVM(vmId, isoId, attach);
|
||||
|
||||
|
||||
if (attach) {
|
||||
vm.setIsoId(iso.getId());
|
||||
} else {
|
||||
vm.setIsoId(null);
|
||||
}
|
||||
_userVmDao.update(vmId, vm);
|
||||
|
||||
if (success) {
|
||||
if (attach) {
|
||||
vm.setIsoId(iso.getId());
|
||||
} else {
|
||||
vm.setIsoId(null);
|
||||
}
|
||||
_userVmDao.update(vmId, vm);
|
||||
|
||||
if (attach) {
|
||||
EventUtils.saveEvent(userId, vm.getAccountId(), EventVO.LEVEL_INFO, EventTypes.EVENT_ISO_ATTACH, "Successfully attached ISO: " + iso.getName() + " to VM with ID: " + vmId,
|
||||
null, startEventId);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user