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 3FB411030A for ; Mon, 10 Jun 2013 18:33:40 +0000 (UTC) Received: (qmail 48879 invoked by uid 500); 10 Jun 2013 18:33:39 -0000 Delivered-To: apmail-cloudstack-dev-archive@cloudstack.apache.org Received: (qmail 48823 invoked by uid 500); 10 Jun 2013 18:33:39 -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 48815 invoked by uid 99); 10 Jun 2013 18:33:39 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 Jun 2013 18:33:39 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of runseb@gmail.com designates 209.85.160.45 as permitted sender) Received: from [209.85.160.45] (HELO mail-pb0-f45.google.com) (209.85.160.45) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 Jun 2013 18:33:31 +0000 Received: by mail-pb0-f45.google.com with SMTP id mc8so7594875pbc.4 for ; Mon, 10 Jun 2013 11:33:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; bh=/La+skL8D5TvQnaG+E3AuMGC0hXSCg/2oTpkvxYBNK0=; b=K3ZvtnQ2MZL00vDVM2m8PRVNSK/DT8Num3sLVvb8iNoGtZtyQ+RXTdgvGtJ27nzbby 7HkP+BFwtg2zbN0BYH6KBMJtIsjHsGgHjJywOpkUyjlARvcewzHActq2ehcP5jSY2Pvp +p7x6J1avorE8qJErzCt2WS4gPC7H+3nPFx5BtMr7h0U0P2ggjbjoI21U24YYMw2B3AG XX8eXTeloR0B9IqbKEX29cuspeTWbxPfthh14kqGwdenqPH9Z76hBBV+jV1Bm2xV0awq ugBmWIPAHX8kqyopNx/+LPy+SF6NY7GVYyCP9n8VLkg1hhTAoCWj+5LpUBpIEA1M+S2p OxLw== X-Received: by 10.66.27.172 with SMTP id u12mr14938538pag.209.1370889190647; Mon, 10 Jun 2013 11:33:10 -0700 (PDT) Received: from [10.0.0.3] (32-212.193-178.cust.bluewin.ch. [178.193.212.32]) by mx.google.com with ESMTPSA id vv6sm16468918pab.6.2013.06.10.11.33.07 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 10 Jun 2013 11:33:09 -0700 (PDT) Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 (Mac OS X Mail 6.3 \(1503\)) Subject: Re: [GSOC] NullPointerException when deployVM using GRE isolation method. Help me! From: Sebastien Goasguen In-Reply-To: Date: Mon, 10 Jun 2013 14:33:08 -0400 Content-Transfer-Encoding: quoted-printable Message-Id: <4FB808E4-4FD4-46C7-8860-996734201244@gmail.com> References: To: dev@cloudstack.apache.org, Chiradeep Vittal X-Mailer: Apple Mail (2.1503) X-Virus-Checked: Checked by ClamAV on apache.org On Jun 10, 2013, at 10:17 AM, Nguyen Anh Tu wrote: > Hi forks, >=20 I think we say "folks" but that's not solving the NPE error. I cc Chiradeep who might have some insight here. -sebastien > I'm trying OVS tunnel with XCP 1.6 and get error NullPointerException = when > executing deployVM. >=20 > I found this error starting from the below code. >=20 > *NetworkManagerImpl.java* >=20 > *NicProfile profile =3D guru.allocate(network, requested, vm); = (1)* > if (isDefaultNic !=3D null) { > profile.setDefaultNic( > isDefaultNic); > } >=20 > *ExtenalGuestNetworkGuru.java* >=20 > @Override > * public NicProfile allocate(Network config, NicProfile nic, > VirtualMachineProfile vm) throws > InsufficientVirtualNetworkCapcityException, > InsufficientAddressCapacityException* { >=20 > if > = (_networkModel.networkIsConfiguredForExternalNetworking(config.getDataCent= erId(), > config.getId()) && nic !=3D null && nic.getRequestedIpv4() !=3D null) = { > throw new CloudRuntimeException("Does not support custom ip > allocation at this time: " + nic); > } >=20 > NicProfile profile =3D super.allocate(config, nic, vm); >=20 > *boolean _isEnabled =3D > = Boolean.parseBoolean(_configDao.getValue(Config.OvsTunnelNetwork.key())); > (2) > if (_isEnabled) { > return null; > }* >=20 > if > = (_networkModel.networkIsConfiguredForExternalNetworking(config.getDataCent= erId(), > config.getId())) { > profile.setStrategy(ReservationStrategy.Start); > /* We won't clear IP address, because router may set = gateway as > it IP, and it would be updated properly later */ > //profile.setIp4Address(null); > profile.setGateway(null); > profile.setNetmask(null); > } >=20 > return profile; > }* >=20 > * > The return from (1) is NULL, because at (2) *sdn.ovs.controller* set = to > true. So profile =3D NULL and then we get NullPointerException error = in the > next step. >=20 > This error prevents me to deployVM using GRE isolation method. If I = set * > sdn.ovs.controller* =3D false, no error anymore but can't using GRE. >=20 > How can I fix this? Thanks for any help. >=20 > --=20 >=20 > N.g.U.y.e.N.A.n.H.t.U