fix dettach iso issue: if dettach iso failed on hypervisor, mgt server still regards it as success, then you can't attach another ISO to the vm again unless your stop/start the VM

This commit is contained in:
Edison Su 2011-06-01 10:36:56 -04:00
parent 3c88f21645
commit d9b61f26da
2 changed files with 2 additions and 2 deletions

View File

@ -221,7 +221,6 @@ Requires: jpackage-utils
Requires: %{name}-daemonize
Requires: /sbin/service
Requires: /sbin/chkconfig
Requires: jnetpcap
Group: System Environment/Libraries
%package baremetal-agent
@ -304,6 +303,7 @@ The Cloud.com command line tools contain a few Python modules that can call clou
%package premium-agent
Summary: Cloud.com premium agent
Requires: cloud-agent
Requires: jnetpcap
Group: System Environment/Libraries
%description premium-agent
The Cloud.com premium agent

View File

@ -827,7 +827,7 @@ public class TemplateManagerImpl implements TemplateManager, Manager, TemplateSe
vm.setIsoId(iso.getId());
_userVmDao.update(vmId, vm);
}
if ( !attach ) {
if ( success && !attach ) {
vm.setIsoId(null);
_userVmDao.update(vmId, vm);
}