From commits-return-96506-archive-asf-public=cust-asf.ponee.io@cloudstack.apache.org Fri Jan 3 13:47:15 2020 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 40DE418061A for ; Fri, 3 Jan 2020 14:47:15 +0100 (CET) Received: (qmail 71946 invoked by uid 500); 3 Jan 2020 13:47:14 -0000 Mailing-List: contact commits-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list commits@cloudstack.apache.org Received: (qmail 71935 invoked by uid 99); 3 Jan 2020 13:47:14 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Jan 2020 13:47:14 +0000 From: GitBox To: commits@cloudstack.apache.org Subject: [GitHub] [cloudstack] DaanHoogland commented on a change in pull request #3728: server: double check host capacity when start/migrate a vm Message-ID: <157805923451.9042.3906393451812172500.gitbox@gitbox.apache.org> References: In-Reply-To: Date: Fri, 03 Jan 2020 13:47:14 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit DaanHoogland commented on a change in pull request #3728: server: double check host capacity when start/migrate a vm URL: https://github.com/apache/cloudstack/pull/3728#discussion_r362812183 ########## File path: engine/orchestration/src/main/java/com/cloud/vm/VirtualMachineManagerImpl.java ########## @@ -2349,6 +2349,17 @@ protected void migrate(final VMInstanceVO vm, final long srcHostId, final Deploy _networkMgr.rollbackNicForMigration(vmSrc, profile); s_logger.info("Migration cancelled because " + e1.getMessage()); throw new ConcurrentOperationException("Migration cancelled because " + e1.getMessage()); + } catch (final CloudRuntimeException e2) { + _networkMgr.rollbackNicForMigration(vmSrc, profile); + s_logger.info("Migration cancelled because " + e2.getMessage()); + work.setStep(Step.Done); + _workDao.update(work.getId(), work); + try { + stateTransitTo(vm, Event.OperationFailed, srcHostId); + } catch (final NoTransitionException e3) { + s_logger.warn(e3.getMessage()); + } + throw new CloudRuntimeException("Migration cancelled because " + e2.getMessage()); Review comment: can we add the cause or log its stack-trace before abandoning it here? ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: users@infra.apache.org With regards, Apache Git Services