Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id C1526200AE4 for ; Wed, 11 May 2016 00:20:46 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id C037E160A11; Tue, 10 May 2016 22:20:46 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 13C0316098A for ; Wed, 11 May 2016 00:20:45 +0200 (CEST) Received: (qmail 84606 invoked by uid 500); 10 May 2016 22:20:45 -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 84595 invoked by uid 99); 10 May 2016 22:20:44 -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; Tue, 10 May 2016 22:20:44 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 6FAFCDFE16; Tue, 10 May 2016 22:20:44 +0000 (UTC) From: jburwell To: dev@cloudstack.apache.org Reply-To: dev@cloudstack.apache.org References: In-Reply-To: Subject: [GitHub] cloudstack pull request: OSPF: adding dynamically routing capabili... Content-Type: text/plain Message-Id: <20160510222044.6FAFCDFE16@git1-us-west.apache.org> Date: Tue, 10 May 2016 22:20:44 +0000 (UTC) archived-at: Tue, 10 May 2016 22:20:46 -0000 Github user jburwell commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/1371#discussion_r62764350 --- Diff: engine/orchestration/src/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java --- @@ -1445,28 +1466,31 @@ public void prepareAllNicsForMigration(final VirtualMachineProfile vm, final Dep Long guestNetworkId = null; for (final NicVO nic : nics) { final NetworkVO network = _networksDao.findById(nic.getNetworkId()); - if(network.getTrafficType().equals(TrafficType.Guest) && network.getGuestType().equals(GuestType.Isolated)){ + if (network.getTrafficType().equals(TrafficType.Guest) && network.getGuestType().equals(GuestType.Isolated)) { + guestNetworkId = network.getId(); } final Integer networkRate = _networkModel.getNetworkRate(network.getId(), vm.getId()); final NetworkGuru guru = AdapterBase.getAdapterByName(networkGurus, network.getGuruName()); final NicProfile profile = new NicProfile(nic, network, nic.getBroadcastUri(), nic.getIsolationUri(), networkRate, _networkModel.isSecurityGroupSupportedInNetwork(network), _networkModel.getNetworkTag(vm.getHypervisorType(), network)); - if(guru instanceof NetworkMigrationResponder){ - if(!((NetworkMigrationResponder) guru).prepareMigration(profile, network, vm, dest, context)){ - s_logger.error("NetworkGuru "+guru+" prepareForMigration failed."); // XXX: Transaction error + if (guru instanceof NetworkMigrationResponder) { + if (!((NetworkMigrationResponder)guru).prepareMigration(profile, network, vm, dest, context)) { + s_logger.error("NetworkGuru " + guru + " prepareForMigration failed."); // XXX: Transaction error --- End diff -- Should this method continue if the ``prepareMigration`` fails? If not, should it simply return or throw an exception? --- 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. ---