@Override public DomainRouterVO stop(final VirtualRouter router, final boolean forced, final User user, final Account caller) throws ConcurrentOperationException, ResourceUnavailableException { s_logger.debug("Stopping router " + router); try { _itMgr.advanceStop(router.getUuid(), forced); return _routerDao.findById(router.getId()); } catch (final OperationTimedoutException e) { throw new CloudRuntimeException("Unable to stop " + router, e); } }
private DomainRouterVO stop(DomainRouterVO elbVm, boolean forced) throws ConcurrentOperationException, ResourceUnavailableException { s_logger.debug("Stopping ELB vm " + elbVm); try { _itMgr.advanceStop(elbVm.getUuid(), forced); return _routerDao.findById(elbVm.getId()); } catch (OperationTimedoutException e) { throw new CloudRuntimeException("Unable to stop " + elbVm, e); } }
private SecondaryStorageVmVO stopSecondaryStorageVm(final VMInstanceVO systemVm, final boolean isForced) throws ResourceUnavailableException, OperationTimedoutException, ConcurrentOperationException { _itMgr.advanceStop(systemVm.getUuid(), isForced); return _secStorageVmDao.findById(systemVm.getId()); }
protected VirtualRouter stopInternalLbVm(DomainRouterVO internalLbVm, boolean forced, Account caller, long callerUserId) throws ResourceUnavailableException, ConcurrentOperationException { s_logger.debug("Stopping internal lb vm " + internalLbVm); try { _itMgr.advanceStop(internalLbVm.getUuid(), forced); return _internalLbVmDao.findById(internalLbVm.getId()); } catch (OperationTimedoutException e) { throw new CloudRuntimeException("Unable to stop " + internalLbVm, e); } }
protected VirtualRouter stopInternalLbVm(final DomainRouterVO internalLbVm, final boolean forced, final Account caller, final long callerUserId) throws ResourceUnavailableException, ConcurrentOperationException { s_logger.debug("Stopping internal lb vm " + internalLbVm); try { _itMgr.advanceStop(internalLbVm.getUuid(), forced); return _internalLbVmDao.findById(internalLbVm.getId()); } catch (final OperationTimedoutException e) { throw new CloudRuntimeException("Unable to stop " + internalLbVm, e); } }
private ConsoleProxyVO stopConsoleProxy(final VMInstanceVO systemVm, final boolean isForced) throws ResourceUnavailableException, OperationTimedoutException, ConcurrentOperationException { _itMgr.advanceStop(systemVm.getUuid(), isForced); return _consoleProxyDao.findById(systemVm.getId()); }
private boolean doDisableAccount(long accountId) throws ConcurrentOperationException, ResourceUnavailableException { List<VMInstanceVO> vms = _vmDao.listByAccountId(accountId); boolean success = true; for (VMInstanceVO vm : vms) { try { try { _itMgr.advanceStop(vm.getUuid(), false); } catch (OperationTimedoutException ote) { s_logger.warn("Operation for stopping vm timed out, unable to stop vm " + vm.getHostName(), ote); success = false; } } catch (AgentUnavailableException aue) { s_logger.warn("Agent running on host " + vm.getHostId() + " is unavailable, unable to stop vm " + vm.getHostName(), aue); success = false; } } return success; }
try { if (work.getWorkType() == WorkType.Stop) { _itMgr.advanceStop(vm.getUuid(), false); s_logger.info("Successfully stopped " + vm); return null; _itMgr.advanceStop(vm.getUuid(), false); s_logger.info("Stop for " + vm + " was successful"); return null; _itMgr.advanceStop(vm.getUuid(), true); s_logger.info("Stop for " + vm + " was successful"); return null;
s_logger.debug("Stopping vm: " + vm + " as a part of deleteHost id=" + host.getId()); try { _vmMgr.advanceStop(vm.getUuid(), false); } catch (final Exception e) { final String errorMsg = "There was an error stopping the vm: " + vm + " as a part of hostDelete id=" + host.getId();
_itMgr.advanceStop(vm.getUuid(), true); } catch (ResourceUnavailableException e) { assert false : "How do we hit this when force is true?"; s_logger.debug("How come that HA step is Investigating and the host is removed? Calling forced Stop on Vm anyways"); try { _itMgr.advanceStop(vm.getUuid(), true); } catch (ResourceUnavailableException e) { assert false : "How do we hit this when force is true?";
if (userVm.getState() == VirtualMachine.State.Running && vmSnapshotVo.getType() == VMSnapshot.Type.Disk) { try { _itMgr.advanceStop(userVm.getUuid(), true); } catch (Exception e) { s_logger.error("Stop VM " + userVm.getInstanceName() + " before reverting failed due to " + e.getMessage());
try { s_logger.debug("Found a vm that is scheduled to be restarted but has no host id: " + vm); _itMgr.advanceStop(vm.getUuid(), true); } catch (ResourceUnavailableException e) { assert false : "How do we hit this when force is true?"; _itMgr.advanceStop(vm.getUuid(), true); vm = _instanceDao.findByUuid(vm.getUuid()); } catch (ResourceUnavailableException e) {
vmMgr.advanceStop(consoleProxy.getUuid(), false); vmMgr.advanceStop(userVm.getUuid(), false); vmMgr.advanceStop(secStrgVm.getUuid(), false); vmMgr.advanceStop(domR.getUuid(), false);