Return-Path: X-Original-To: apmail-cloudstack-dev-archive@www.apache.org Delivered-To: apmail-cloudstack-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7D41A18662 for ; Sun, 25 Oct 2015 10:59:52 +0000 (UTC) Received: (qmail 24738 invoked by uid 500); 25 Oct 2015 10:59:52 -0000 Delivered-To: apmail-cloudstack-dev-archive@cloudstack.apache.org Received: (qmail 24682 invoked by uid 500); 25 Oct 2015 10:59:52 -0000 Mailing-List: contact dev-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 dev@cloudstack.apache.org Received: (qmail 24671 invoked by uid 99); 25 Oct 2015 10:59:51 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 25 Oct 2015 10:59:51 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id B87A2DFF41; Sun, 25 Oct 2015 10:59:51 +0000 (UTC) From: DaanHoogland To: dev@cloudstack.apache.org Reply-To: dev@cloudstack.apache.org References: In-Reply-To: Subject: [GitHub] cloudstack pull request: CLOUDSTACK-8941: fix NPE when migrate vm ... Content-Type: text/plain Message-Id: <20151025105951.B87A2DFF41@git1-us-west.apache.org> Date: Sun, 25 Oct 2015 10:59:51 +0000 (UTC) Github user DaanHoogland commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/918#discussion_r42943657 --- Diff: engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java --- @@ -1763,7 +1763,7 @@ private void orchestrateStorageMigration(final String vmUuid, final StoragePool if (migrationResult) { //if the vm is migrated to different pod in basic mode, need to reallocate ip - if (!vm.getPodIdToDeployIn().equals(destPool.getPodId())) { + if (destPool.getPodId() != null && !destPool.getPodId().equals(vm.getPodIdToDeployIn())) { --- End diff -- destpool is not guaranteed to be not null either. Overlooked that detail before but maybe we want to change the condition to (destPool != null && destPool.getPodId() != null && !destPool.getPodId().equals(vm.getPodIdToDeployIn())) --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastructure@apache.org or file a JIRA ticket with INFRA. ---