mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
server: fix debug message when expunge a vm (#8374)
This PR fixes the debug message when expunge a vm
This commit is contained in:
parent
969e094419
commit
9d3a7be4dd
@ -602,7 +602,7 @@ public class VirtualMachineManagerImpl extends ManagerBase implements VirtualMac
|
|||||||
protected void advanceExpunge(VMInstanceVO vm) throws ResourceUnavailableException, OperationTimedoutException, ConcurrentOperationException {
|
protected void advanceExpunge(VMInstanceVO vm) throws ResourceUnavailableException, OperationTimedoutException, ConcurrentOperationException {
|
||||||
if (vm == null || vm.getRemoved() != null) {
|
if (vm == null || vm.getRemoved() != null) {
|
||||||
if (s_logger.isDebugEnabled()) {
|
if (s_logger.isDebugEnabled()) {
|
||||||
s_logger.debug("Unable to find vm or vm is destroyed: " + vm);
|
s_logger.debug("Unable to find vm or vm is expunged: " + vm);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -612,17 +612,17 @@ public class VirtualMachineManagerImpl extends ManagerBase implements VirtualMac
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
if (!stateTransitTo(vm, VirtualMachine.Event.ExpungeOperation, vm.getHostId())) {
|
if (!stateTransitTo(vm, VirtualMachine.Event.ExpungeOperation, vm.getHostId())) {
|
||||||
s_logger.debug("Unable to destroy the vm because it is not in the correct state: " + vm);
|
s_logger.debug("Unable to expunge the vm because it is not in the correct state: " + vm);
|
||||||
throw new CloudRuntimeException("Unable to destroy " + vm);
|
throw new CloudRuntimeException("Unable to expunge " + vm);
|
||||||
|
|
||||||
}
|
}
|
||||||
} catch (final NoTransitionException e) {
|
} catch (final NoTransitionException e) {
|
||||||
s_logger.debug("Unable to destroy the vm because it is not in the correct state: " + vm);
|
s_logger.debug("Unable to expunge the vm because it is not in the correct state: " + vm);
|
||||||
throw new CloudRuntimeException("Unable to destroy " + vm, e);
|
throw new CloudRuntimeException("Unable to expunge " + vm, e);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (s_logger.isDebugEnabled()) {
|
if (s_logger.isDebugEnabled()) {
|
||||||
s_logger.debug("Destroying vm " + vm);
|
s_logger.debug("Expunging vm " + vm);
|
||||||
}
|
}
|
||||||
|
|
||||||
final VirtualMachineProfile profile = new VirtualMachineProfileImpl(vm);
|
final VirtualMachineProfile profile = new VirtualMachineProfileImpl(vm);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user