cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sebastien Goasguen <run...@gmail.com>
Subject Re: [GSOC] NullPointerException when deployVM using GRE isolation method. Help me!
Date Mon, 10 Jun 2013 18:33:08 GMT

On Jun 10, 2013, at 10:17 AM, Nguyen Anh Tu <ng.tuna@gmail.com> wrote:

> Hi forks,
> 

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.
> 
> I found this error starting from the below code.
> 
> *NetworkManagerImpl.java*
> 
> *NicProfile profile = guru.allocate(network, requested, vm);     (1)*
>        if (isDefaultNic != null) {
>            profile.setDefaultNic(
> isDefaultNic);
>        }
> 
> *ExtenalGuestNetworkGuru.java*
> 
>    @Override
>   * public NicProfile allocate(Network config, NicProfile nic,
> VirtualMachineProfile<? extends VirtualMachine> vm) throws
> InsufficientVirtualNetworkCapcityException,
>            InsufficientAddressCapacityException* {
> 
>        if
> (_networkModel.networkIsConfiguredForExternalNetworking(config.getDataCenterId(),
> config.getId()) && nic != null && nic.getRequestedIpv4() != null) {
>            throw new CloudRuntimeException("Does not support custom ip
> allocation at this time: " + nic);
>        }
> 
>        NicProfile profile = super.allocate(config, nic, vm);
> 
>        *boolean _isEnabled =
> Boolean.parseBoolean(_configDao.getValue(Config.OvsTunnelNetwork.key()));
> (2)
>        if (_isEnabled) {
>            return null;
>        }*
> 
>        if
> (_networkModel.networkIsConfiguredForExternalNetworking(config.getDataCenterId(),
> 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);
>        }
> 
>        return profile;
>    }*
> 
> *
> The return from (1) is NULL, because at (2) *sdn.ovs.controller* set to
> true. So profile = NULL and then we get NullPointerException error in the
> next step.
> 
> This error prevents me to deployVM using GRE isolation method. If I set *
> sdn.ovs.controller* = false, no error anymore but can't using GRE.
> 
> How can I fix this? Thanks for any help.
> 
> -- 
> 
> N.g.U.y.e.N.A.n.H.t.U


Mime
View raw message